ActionScript 3.0 Language and Components Reference | All Packages | All Classes | Language Elements | Index | Appendixes | Conventions | Frames No Frames |
Package

These functions are used by Flash authoring tool developers.
Public Methods

| Function | Defined By
--- | --- | ---
|  | MMEndCommand(, ) Notifies Flash CS4 that a command is done and instructs Flash CS4 to commit or discard the changes submitted by the MMExecute() command. | adobe.utils
|  | MMExecute() Lets you issue Flash JavaScript API (JSAPI) commands from ActionScript. | adobe.utils

Function detail

MMEndCommand | () |

`public MMEndCommand(, )`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Notifies Flash CS4 that a command is done and instructs Flash CS4 to commit or discard the changes submitted by the `MMExecute()` command.

Parameters

| `endStatus` — A Boolean value; use `true` to commit changes, otherwise `false`. If set to `false`, any pending changes are discarded.
| `notifyString` — 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 | () |  |

`public MMExecute()`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

Lets you issue Flash JavaScript API (JSAPI) commands from ActionScript. In Flash CS4, 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 in the player, in test movie mode, or 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` — 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

| A string representation of the result, if any, sent by the JavaScript statement.

Submit Feedback on LiveDocs
© 2004-2008 Adobe Systems Incorporated. All rights reserved.
Tue May 20 2008, 04:03 AM -07:00