Extending Flash |
|
|
|
| Objects > CompiledClipInstance object > compiledClipInstance.actionScript | |||
Flash MX 2004.
compiledClipInstance.actionScript
Property; a string that represents the ActionScript for this instance; equivalent to symbolInstance.actionScript.
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');}";
|
|
|
|