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 MMExecute() and MMEndCommand() functions or to be used in conjunction with them. After it is installed, the API wrapper appears in the Macromedia Flash interface. This wrapper simplifies the writing of Fireworks commands. Instead of having to embed every Fireworks function in MMExecute(), you can use a series of fwapi functions in the ActionScript. Then, when it is published, the wrapper translates the fwapi functions into the expanded Fireworks functions. You can also mix the fwapi functions with MMExecute() statements.
To install the API wrapper, make sure you have the Macromedia Extension Manager installed and double-click the Extension file. In Macromedia 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();
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/fireworks/8/fwextending/fw_03_22.htm