Flash panels
119
Guidelines for creating panels and commands
■
You need to surround nested quotation marks need with backslash (\). The following
example prints:
John’s example is really “complex”!
MMExecute('alert("John\'s example is really \"complex\"!")';
■
The movie size set in Flash is used in Fireworks as the minimum and default size of the
command panel.
■
To improve the appearance and positioning of a modeless panel, turn off scaling and align
the panel contents with the upper-left corner of the Stage. You can make these changes
with the following ActionScript code:
Stage.align = "TC";
Stage.scaleMode = "noScale";
Events
Fireworks events for Flash panels allow developers to write event handlers for specific user
interaction. For example, a panel for creating a customized shape can respond to the user
changing the stroke attribute, and make changes to the lines in the shape accordingly.
How event handlers work
When a panel is launched and the Flash movie starts, Fireworks will scan the movie script for
the presence of event handlers. If a handler is present, Fireworks automatically registers the
function to receive the corresponding event. Fireworks only looks at the SWF file to see if it
needs any of these events when the panel opens (when the SWF file runs).
Summary of Contents for FIREWORKS 8-EXTENDING FIREWORKS
Page 1: ...Extending Fireworks ...
Page 4: ...4 Contents ...
Page 358: ...358 Fireworks JavaScript API ...
Page 372: ...372 Index ...