Extending Flash |
|
|
|
| Objects > actionsPanel object > actionsPanel.getClassForObject() | |||
Flash CS3 Professional.
actionsPanel.getClassForObject(ASvariableName)
ASvariableName A string that represents the name of an ActionScript variable.
A string that represents the class of which ASvariableName is a member.
Method; returns the class of the specified variable, which must be defined in the currently displayed Actions panel. In addition, the cursor or selected text in the Actions panel must be positioned after the variable definition.
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"
|
|
|
|