compiledClipInstance.actionScript

Availability

Flash MX 2004.

Usage

compiledClipInstance.actionScript

Description

Property; a string that represents the ActionScript for this instance; equivalent to symbolInstance.actionScript.

Example

The following code assigns ActionScript to specified elements:

// Assign some ActionScript to a specified Button compiled clip instance.
fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0]
    .actionScript = "on(click) {trace('button is clicked');}";
// Assign some ActionScript to the currently selected Button compiled clip instance.
fl.getDocumentDOM().selection[0].actionScript = 
    "on(click) {trace('button is clicked');}";