Adobe 38039927 - Fireworks CS3 - PC Extended User Manual page 275

Extending fireworks
Hide thumbs Also See for 38039927 - Fireworks CS3 - PC:
Table of Contents

Advertisement

Returns
Nothing.
Description
This function should be called whenever the user clicks the OK or Cancel buttons provided in the Flash content to
execute or cancel a command. This function is used only for modal commands, not for Flash panels.
Note:
supersedes the
MMEndCommand
version of Fireworks.
Using the API wrapper extension in Adobe Flash
You can install a special extension that was developed specifically for writing Fireworks functions in ActionScript
(currently, only ActionScript 1.0) either as a replacement for the
to be used in conjunction with them. After it is installed, the API wrapper appears in the Adobe Flash interface. This
wrapper simplifies the writing of Fireworks commands. Instead of having to embed every Fireworks function in
, you can use a series of
MMExecute()
translates the
functions into the expanded Fireworks functions. You can also mix the
fwapi
statements.
MMExecute()
To install the API wrapper, make sure you have the Adobe Extension Manager installed and double-click the
Extension file. In Adobe Flash, the wrapper appears in the Components window as FWCommandComponents.
The following example shows a command without the wrapper:
var path = MMExecute("fw.appPatternsDir;");
The following example shows the same command using the wrapper:
var path =fwapi.getAppPatternsDir();
Working with ActionScript files
You can simplify the editing task by keeping a separate ActionScript file for ActionScript; in this way, you don't need
to open and edit the FLA file directly. Your FLA file must have a
frame (where
myStringFile
complied at publishing time.
Note: The FLA and ActionScript files should reside in the same folder so that the ActionScript file can be easily found
for compiling.
Guidelines for creating panels and commands
• You need to surround nested quotation marks need with backslash (\). The following example prints:
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";
command. However,
FWEndCommand
functions in the ActionScript. Then, when it is published, the wrapper
fwapi
is the name of your ActionScript file) to ensure that the ActionScript strings are
still works in the current
FWEndCommand
and
MMExecute()
MMEndCommand()
#include myStringFile.as
ADOBE FIREWORKS CS3
Extending Guide
functions or
functions with
fwapi
statement in the first
John's
271

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fireworks cs3

Table of Contents