beautypg.com

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

Page 48

background image

26

EXTENDING FLASH CS4 PROFESSIONAL

actionsPanel object

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()