Flash CS3 Documentation |
|||
| Learning ActionScript 2.0 in Adobe Flash > Syntax and Language Fundamentals > About constants and keywords > About keywords | |||
Keywords are words in ActionScript that do one specific thing. For example, you use the var keyword to declare a variable. The var keyword is shown in the following line of code:
var myAge:Number = 26;
A keyword is a reserved word that has a specific meaning: for example, you use the class keyword to define new a new ActionScript class; and you use the var keyword to declare local variables. Other examples of reserved keywords are: if, else, this, function, and return.
Keywords cannot be used as identifiers (such as variable, function, or label names), and you should not use them elsewhere in your FLA files for other things (such as instance names). You have already used the var keyword a lot, particularly if you read Data and Data Types. ActionScript reserves words in the language for specific use. Therefore, you can't use keywords as identifiers (such as variable, function, or label names). You can find a list of these keywords in About reserved words.
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00000697.html