![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 7.
MMExecute("Flash JavaScript API command
;")
Flash JavaScript API command
Any command that you can use in a Flash JavaScript (JSFL) file.
The result, if any, sent by the JavaScript statement.
Function; lets you issue Flash JavaScript API commands from ActionScript.
The Flash JavaScript API (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 www.macromedia.com/go/jsapi_info_en.
The following command returns an array of objects in the library:
var libe:Array = MMExecute("fl.getDocumentDOM().library.items;"); trace(libe.length + " items in library");
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |