Flash MX and the other MX programs allow you to install Flash panels that become part of the authoring environment. The Community MX and Amazon.com examples from this chapter can be placed in the WindowSWF folder in the multiuser Configuration folder of Flash MX, located in the following location in a typical Windows 2000 installation:
Note that the folder is a hidden folder by default in Windows. Hidden folders can be shown with Tools Folder Options View Hidden files and folders Show Hidden files and folders. For Macintosh OS X, the folder is located at:
If you have a single-user operating system, such as Windows 98 or Macintosh OS 9, the folder can be found in your main Flash MX installation folder.
Simply dropping a .swf file in this folder allows you to use the Flash interface as a dockable panel in Flash MX. You can easily add other types of panels that utilize other public web services or ones of your own design, and even package these as extensions for consumption by other users of Studio MX products. To package a Flash .swf file as an extension, you have to create an extension package. This is done by first creating a special XML file with a .mxi file extension.
The .mxi file for the Community MX Content extension might look like this:
<macromedia-extension name="Community MX Content" version="1.0.0" type="Flash Panel"> <author name="Thomas Muck" /> <products> <product name="Flash" version="6" primary="true" /> </products> <description> <![CDATA[ The Community MX Content panel shows the latest content from Community MX ]]> </description> <ui-access> <![CDATA[ After installing the extension, you can find the Community MX Content panel in the Window menu of Flash MX. ]]> </ui-access> <files> <file source="Community MX.swf" destination="$flash/WindowSWF" /> </files> </macromedia-extension>
Using the $flash variable in the .mxi file, you don't have to know the path to Flash on the user's machine; the Extension Manager takes care of the details of installing the panel to the user's Flash\WindowSWF folder.
If you place this .mxi file in the same folder as your .swf file and double-click it, the Macromedia Extension Manager launches in its packaging mode. It prompts you to create a new package and save it on your hard drive. The package is created with an .mxp file extension (the .mxi file is bundled inside). The Flash extension package (the .mxp file) can be installed by anyone with Flash MX or later. The Extension Manager is shown in Figure 10-4.
This technique for packaging extensions can be used with many types of Flash movies, allowing you to create your own interface elements of the Flash MX environment. The NetConnection debugger and the Service Panel are examples of Flash MX extensions built as .swf files in this way. The Community MX panel is shown in Figure 10-5.