
219
EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH
Packaging and deploying your panel
Throughout this chapter, we’ve been working with exported SWF files. To add a custom panel to
Fireworks, we just copied the SWF to the correct folder, restarted Fireworks, and then accessed the
panel from the
Window menu. This is fine for development, but when you’re finished with your panel
and want to share it with the world, you need to package your panel into an MXP file that can be
double- clicked and automatically installed using the Adobe Extension Manager.
Creating an MXP is a relatively simple task. You start by authoring an XML- based file saved with the
.mxi extension. We’ve included a starter MXI file in the files that accompany this chapter (StarterMXI.
mxi, also available at C:\Program Files\Adobe\Adobe Extension Manager CS4\Samples\Fireworks).
Following is a snippet from this file:
<macromedia-extension
name="Draw Rect Panel"
version="1.0"
type="Command Panel">
<!- - List the required/compatible products -- >
<products>
<product name="Fireworks" version="10" primary="true" />
</products>
<!- - Describe the author -- >
<author name="Grant Hinkson, www.granthinkson.com" />
<files>
<file name="Draw Rect.swf"
destination="$fireworks/Configuration/Command Panels/" />
</files>
Most of the sections of this file are used for display purposes in the Extension Manager, such as the
name attribute and the <author /> section. The <files> section, however, is where you reference the
SWF (or SWFs) that you want installed with this particular MXP. The name attribute of the <file /> tag
is a relative reference to the file you want packaged. Since there is no folder name specified, the Draw
Rect.swf file is expected to be located in the same folder as the MXI. Open the sample MXI to see the
handful of remaining sections that you can customize. Once you’ve edited the MXI and are satisfied
with the results, it’s time to create a compiled MXP file that you can share with other Fireworks users.
You can simply double- click the MXI file to launch the Adobe Extension Manager. It will automatically
create an MXP for you, prompting you first to specify a name and location for the new file, as shown
in Figure 11-16.
Komentáře k této Příručce