Customactions.get() - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

CustomActions.get()

Availability
Flash Player 6.
Usage
CustomActions.get(customName:String) : String
Parameters
The name of the custom action definition to retrieve.
customName
Returns
If the custom action XML definition is located, returns a string; otherwise, returns
Description
Method; reads the contents of the custom action XML definition file named
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
returned. If the custom action XML definition specified by the
it is read in its entirety and returned as a string.
Example
The following example lists the custom actions in a ComboBox instance, and gets the custom
action when a Button instance is clicked. Drag an instance of a ComboBox, Button, and TextArea
onto the Stage. Give the ComboBox an instance name of
an instance name of
Enter the following ActionScript on Frame 1 of the Timeline:
import mx.controls.*;
var customActionName_cb:ComboBox;
var customActionXml_ta:TextArea;
var view_button:Button;
customActionName_cb.dataProvider = CustomActions.list();
customActionXml_ta.editable = false;
var viewListener:Object = new Object();
viewListener.click = function(evt:Object) {
var caName:String = String(customActionName_cb.selectedItem);
customActionXml_ta.text = CustomActions.get(caName);
};
view_button.addEventListener("click", viewListener);
232
Chapter 2: ActionScript Language Reference
customName
customActionXml_ta
cannot be found, a value of
customName
customActionName_cb
, and the Button an instance name of
.
undefined
.
customName
is
undefined
parameter is located,
, the TextArea
.
view_button

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents