Using script object methods and variables

Use the following notation to access script objects:

$scriptName.variableName

The dollar sign ($) indicates that a variable is to be used. The example above references a variable called variableName from the scriptName script object. A period (.) is used to separate the script object name from the variable name.

Use the following notation to access the script object methods:

@scriptName::methodName()

The at symbol (@) indicates that an object method is to be used. A pair of colons (::) separates the object name from the object method name. In the example, an arbitrary method is used. The methods available for any script object depend on the object itself. Each object has its own set of method names, which are documented in the Action Script reference; some objects may not have any available methods.

The same syntax is used for other objects used in the script environment, instead of using $scriptName or @scriptName, the object name to be used would be in the declaration, as shown in the following example:

$myScriptObject.myVariable

# or

@myScriptObject::myMethod

Script method calls are case-sensitive, but variable names are not.

Using imported Java classes

When executing a method on an imported Java class within scripting, only the imported class’s methods are available, not its parent class’s methods.

For example, if Java ClassB extends Java ClassA, and you import only ClassB, then you can call ClassB’s methods, but not ClassA’s.

Using script object variables