beautypg.com

Actionspanel.getscriptassistmode(), Actionspanel.getselectedtext() – Adobe Extending Flash Professional CS5 User Manual

Page 47

background image

25

EXTENDING FLASH PROFESSIONAL

actionsPanel object

Last updated 5/2/2011

Example
The following example displays the class assigned to the variable myVar, if the cursor is positioned after the statement
var myVar:ActivityEvent; in the Actions panel.

// Place the following code in the Actions panel,

// and position the cursor somewhere after the end of the line

var myVar:ActivityEvent;

// Place the following code in the JSFL file

var theClass = fl.actionsPanel.getClassForObject("myVar");

fl.trace(theClass); // traces: "ActivityEvent"

actionsPanel.getScriptAssistMode()

Availability
Flash CS3 Professional.

Usage

actionsPanel.getScriptAssistMode()

Parameters
None.

Returns
A Boolean value that specifies whether Script Assist mode is enabled (

true

) or not (

false

).

Description
Method; specifies whether Script Assist mode is enabled.

Example
The following example displays a message if Script Assist mode is not enabled.

mAssist = fl.actionsPanel.getScriptAssistMode();

if (!mAssist) {

alert("For more guidance when writing ActionScript code, try Script Assist mode");

}

See also

actionsPanel.setScriptAssistMode()

actionsPanel.getSelectedText()

Availability
Flash CS3 Professional.

Usage

actionsPanel.getSelectedText()

This manual is related to the following products: