EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Install (Customactions.install Method)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CustomActions 471
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.
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
customActionName_cb,
the TextArea an instance name of
customActionXml_ta, and the Button an instance name of
view_button. 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);
install (CustomActions.install method)
public static install(name:String, data:String) : Boolean
Installs a new custom action XML definition file indicated by the name parameter. The
contents of the file is specified by the string
customXML.
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.
Availability: ActionScript 1.0; Flash Player 6

Table of Contents

Related product manuals