ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
 

Package adobe.utils 


These functions are used by Flash authoring tool developers.
Public Methods
 FunctionDefined By
  
MMEndCommand(endStatus:Boolean, notifyString:String):void
Notifies an application hosting a SWF command that a command is done and instructs the application to commit or discard the changes submitted by the MMExecute() command.
adobe.utils
  
Lets you issue Flash JavaScript API (JSAPI) commands from ActionScript.
adobe.utils
Function detail

MMEndCommand

()function
public function MMEndCommand(endStatus:Boolean, notifyString:String):void

Language Version: ActionScript 3.0
Product Version: Flash CS4
Runtime Versions: Flash Player 10, AIR 1.5

Notifies an application hosting a SWF command that a command is done and instructs the application to commit or discard the changes submitted by the MMExecute() command.

Parameters

endStatus:Boolean — A Boolean value; use true to commit changes, otherwise false. If set to false, any pending changes are discarded.
 
notifyString:String — A string containing an error message or the reason the changes will be discarded. If the endStatus parameter value is true, use an empty string for the notifyString parameter value.

MMExecute

()function 
public function MMExecute(name:String):String

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: AIR 1.0, Flash Player 9

Lets you issue Flash JavaScript API (JSAPI) commands from ActionScript. In Flash Professional, the MMExecute() function can be called only by a movie that is used as a Flash Panel, by an XMLtoUI dialog box, or by the Custom UI of a component. JSAPI commands have no effect outside the authoring environment.

The Flash JSAPI provides several objects, methods, and properties to duplicate or emulate commands that a user can enter in the authoring environment. Using the JSAPI, you can write scripts that extend Flash in several ways: adding commands to menus, manipulating objects on the Stage, repeating sequences of commands, and so on.

In general, a user runs a JSAPI script by selecting Commands > Run Command. However, you can use this function in an ActionScript script to call a JSAPI command directly. If you use MMExecute() in a script on Frame 1 of your file, the command executes when the SWF file is loaded.

For more information on the JSAPI, see "Extending Flash" at http://www.adobe.com/go/jsapi_info_en.

Parameters

name:String — A string passed to MMExecute(). MMExecute() parses the string and executes any JavaScript commands. You can assign the string a variable and then pass the variable to MMExecute(). You can also separate your JavaScript function into smaller strings; MMExecute() returns the value of the last function called.

Returns
String — A string representation of the result, if any, sent by the JavaScript statement.