adobe.utilsXMLUI The XMLUI class enables communication with SWF files that are used as custom user interfaces for the Flash authoring tool's extensibility features.Object The XMLUI class enables communication with SWF files that are used as custom user interfaces for the Flash authoring tool's extensibility features.

Macromedia Flash MX 2004 and Macromedia Flash MX Professional 2004 and later versions come with several extensibility features including Behaviors, Commands (JavaScript API), Effects, and Tools. With these features, advanced users can extend or automate the authoring tool's capabilities. The XML-to-UI engine works with each of these extensibility features to create dialog boxes that the user sees if the extension either requires or accepts parameters. You can define dialog boxes by using XML tags or by creating a SWF file to display. The XMLUI object provides a mechanism by which an advanced user can communicate with a SWF file used in such a manner.

accept Makes the current XMLUI dialog box close with an "accept" state. Makes the current XMLUI dialog box close with an "accept" state. This is identical to the user clicking the OK button. cancel Makes the current XMLUI dialog box close with a "cancel" state. Makes the current XMLUI dialog box close with a "cancel" state. This is identical to the user clicking the Cancel button. getProperty Retrieves the value of the specified property of the current XMLUI dialog box.The value of the property. StringnameStringThe name of the XMLUI property to retrieve. Retrieves the value of the specified property of the current XMLUI dialog box. setProperty Modifies the value of the specified property of the current XMLUI dialog.nameStringThe name of the XMLUI property to modify. valueStringThe value to which the specified property will be set. Modifies the value of the specified property of the current XMLUI dialog.
CustomActions The methods of the CustomActions class allow a SWF file playing in the Flash authoring tool to manage any custom actions that are registered with the authoring tool.Object The methods of the CustomActions class allow a SWF file playing in the Flash authoring tool to manage any custom actions that are registered with the authoring tool. A SWF file can install and uninstall custom actions, retrieve the XML definition of a custom action, and retrieve the list of registered custom actions.

You can use these methods to build SWF files that are extensions of the Flash authoring tool. Such an extension could, for example, use the Flash Application Protocol to navigate a Universal Description, Discovery and Integration (UDDI) repository and download web services into the Actions toolbox.

getActions Reads the contents of the custom action XML definition file named name.If the custom action XML definition is located, returns a string; otherwise, returns undefined. StringnameStringThe name of the custom action definition to retrieve. Reads the contents of the custom action XML definition file named name.

The name of the definition file must be a simple filename, without the .xml file extension, and without any directory separators (':', '/' or '\').

If the definition file specified by the name cannot be found, a value of undefined is returned. If the custom action XML definition specified by the name parameter is located, it is read in its entirety and returned as a string.

installActions Installs a new custom action XML definition file indicated by the name parameter.A Boolean value of false if an error occurs during installation; otherwise, a value of true is returned to indicate that the custom action has been successfully installed. nameStringThe name of the custom action definition to install. dataStringThe text of the XML definition to install. Installs a new custom action XML definition file indicated by the name parameter. The contents of the file is specified by the string data.

The name of the definition file must be a simple filename, without the .xml file extension, and without any directory separators (':', '/' or '\').

If a custom actions file already exists with the name name, it is overwritten.

If the Configuration/ActionsPanel/CustomActions directory does not exist when this method is invoked, the directory is created.

uninstallActions Removes the Custom Actions XML definition file named name.nameStringThe name of the custom action definition to uninstall. Removes the Custom Actions XML definition file named name.

The name of the definition file must be a simple filename, without the .xml file extension, and without any directory separators (':', '/' or '\').

installActions()
actionsList Returns an Array object containing the names of all the custom actions that are registered with the Flash authoring tool.Array Returns an Array object containing the names of all the custom actions that are registered with the Flash authoring tool. The elements of the array are simple names, without the .xml file extension, and without any directory separators (for example, ":", "/", or "\"). If there are no registered custom actions, actionsList() returns a zero-length array. If an error occurs, actionsList() returns the value undefined.
MMEndCommand 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.endStatusBoolean A Boolean value; use true to commit changes, otherwise false. If set to false, any pending changes are discarded. notifyStringString 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. 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. MMExecute Lets you issue Flash JavaScript API (JSAPI) commands from ActionScript.A string representation of the result, if any, sent by the JavaScript statement. StringnameString 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. 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.