
293
EXTENDING FIREWORKS
Cross-Product Extensions
Las
t
up
d
a
ted
12/8/2009
Shockwave files that are published to the Fireworks installation directory, Configuration\Command Panels folder, act
as panels in the Fireworks interface at runtime and are available through the Window menu.
Shockwave files that are published to the Configuration\Commands folder act as modal commands and are available
through the Commands menu in the Fireworks interface.
Note:
On multiuser systems, Fireworks supports a Command Panels folder inside of each user’s Configuration folder, so
users can save favorite panels.
At runtime, Fireworks starts Flash Player, which either plays Shockwave animations or runs commands (if the user
selects the custom command options). The Align panel (Window > Align menu option) is an example of how Flash
panels work in the Fireworks interface.
Embedding API commands
You can call any part of the Fireworks API by embedding the API commands in the following functions. These
functions communicate directly with Adobe Flash Player, which is distributed with Fireworks.
MMExecute()
Usage
MMExecute(jsToPass)
Arguments
jsToPass
A string of JavaScript for Fireworks to execute.
Returns
Nothing.
Description
Declares a set of JavaScript code to pass to the Fireworks API, allowing Flash authors to embed Fireworks API
commands in a frame of a Flash movie.
Note:
MMExecute
supersedes the
FWJavascrip
t command. However, the
FWJavascript
command still works in the
current version of Fireworks.
The commands should be embedded in the same way that you would write separate JavaScript code blocks to perform
similar operations, and you can concatenate lines of JavaScript code into one
MMExecute()
function.
Example
The following example concatenates two lines of JavaScript code into one command:
MMExecute("dom=fw.getDocumentDOM();dom.addNewRectanglePrimitive({left:47, top:26, right:102,
bottom:87}, 0");
MMEndCommand()
Usage
MMEndCommand(endStatus, notifyString)
Содержание 65011817 - Fireworks CS4 - Mac
Страница 1: ...Extending ADOBE FIREWORKS CS4...