Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
The Action Script language comes with a syntax scheme as explained below. Also, the reserved keywords of the Action Script language cannot be used as variable names.
When writing action scripts, you should respect the following explanations regarding
Children Display |
---|
Syntax Scheme
The following syntax scheme applies to the action script language.
Topic | Description | Examples | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Names | All object and attribute names in Action Scripts must follow the syntax below:
However, UML names are not restricted and may contain any character. To use these names in Action Scripts apply backticks as follows: If the name of an element contains other characters, it must be escaped by backticks as follows:
Consequently, the only characters not allowed in element names that are to be used in action scripts are backticks (
| Some escaping examples:
| |||||||||||||||||||||||||||||||||
Case Sensitivity | All operations, statements, variable names, class names, and attribute names are case sensitive. |
| |||||||||||||||||||||||||||||||||
Scripting Style | Operations can be scripted in an object-oriented or a procedural syntax style. The differences are shown in the example table on the right. |
|
Object Navigation
Use the following syntax to navigate to properties and operations within an object:
Target | Syntax | Example |
---|---|---|
Property | objectName.propertyName | product.category |
Operation | objectName.operationName(parameters) | product.new() |
Sub-property of a complex property | objectName.propertyName.subPropertyName | product.storage.area |
Array property | objectName.arrayProperty | product.versions |
Array property element | objectName.arrayProperty[index] | product.versions[3] |
Reserved Keywords
The following keywords, constants, operators etc. should not be used as variable names as they are reserved for action script execution:
Section | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Panel | ||
---|---|---|
| ||
|
Panel | ||
---|---|---|
|
Otp | ||
---|---|---|
|
|