
295
EXTENDING FIREWORKS
Cross-Product Extensions
Las
t
up
d
a
ted
12/8/2009
•
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).
Creating event handlers
To create an event handler, implement a function with the corresponding event name. Currently, Fireworks supports
the following events for Flash panels:
Event
Description
onFwStartMovie
Sent to the SWF file right after Fireworks has started (or restarted) the SWF file.
onFwStopMovie
Sent to the SWF file right before Fireworks stops the file (and possibly unloads it).
onFwUnitsChange
Sent when the user changes the type of units (inches, pixels, centimeters) in the Info panel.
onFwPICollapseOrExpand
Sent when the user switches the PI between two rows high and four rows high.
onFwDocumentNameChange
Sent when the name of the current document changes (for example, when the user performs a
save).
onFwCurrentFrameChange
Sent when the user selects a different frame.
onFwCurrentLayerChange
Sent when the user selects a different layer.
onFwHistoryChange
Sent when the user creates an non-scriptable history step.
onFwIdle0
Sent when Fireworks is in the first of a sequence of idle states. Because Fireworks may often go
through a sequence of idle states, triggering functions by this event may impair application
performance.
onFwIdle1
Sent when Fireworks is in the second of a sequence of idle states. Because Fireworks may often
go through a sequence of idle states, triggering functions by this event may impair application
performance.
onFwIdle2
Sent when Fireworks is in the third of a sequence of idle states. Because Fireworks may often go
through a sequence of idle states, triggering functions by this event may impair application
performance.
onFwApplicationDeactivate
Sent when the Fireworks application loses focus.
onFwApplicationActivate
Sent when the Fireworks application gains focus.
onFwSymbolLibraryChange
Sent when the symbol library changes in some way.
onFwURLListChange
Sent when a new URL is added to the document.
Содержание 65011817 - Fireworks CS4 - Mac
Страница 1: ...Extending ADOBE FIREWORKS CS4...