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

Package | adobe.utils
Class | public final class CustomActions
Inheritance | CustomActions Object

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

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.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | actionsList : Array [static] [read-only] Returns an Array object containing the names of all the custom actions that are registered with the Flash authoring tool. | CustomActions
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | prototype : Object [static] A reference to the prototype object of a class or function object. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | getActions(name:String):String [static] Reads the contents of the custom action XML definition file named name. | CustomActions
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | installActions(name:String, data:String):void [static] Installs a new custom action XML definition file indicated by the name parameter. | CustomActions
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | uninstallActions(name:String):void [static] Removes the Custom Actions XML definition file named name. | CustomActions
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

actionsList | property

`actionsList:Array` [read-only]

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

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`.

Implementation
`public static function get actionsList():Array`
Method Detail

getActions | () | method

`public static function getActions(name:String):String`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

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.

Parameters

| `name:String` — The name of the custom action definition to retrieve.

Returns

| `String` — If the custom action XML definition is located, returns a string; otherwise, returns `undefined`.

installActions | () | method |

`public static function installActions(name:String, data:String):void`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

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.

Parameters

| `name:String` — The name of the custom action definition to install.
| `data:String` — The text of the XML definition to install.

uninstallActions | () | method |

`public static function uninstallActions(name:String):void`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

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 '\').

Parameters

| `name:String` — The name of the custom action definition to uninstall.

See also

installActions()

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