Some reserved words are used by the ActionScript interpreter to denote specific built-in language features, such as statements and operators. They are reserved for use by the interpreter, and we must avoid using them as identifiers in our code. Using a reserved word for any purpose other than its reserved internal purpose causes an error in most cases. ActionScript's reserved words are listed in Table 15-1. Table 15-1. ActionScript's reserved words add | delete | ge | le | onClipEvent | this | and | do | gt | lt | or | typeof | break | else | if | ne | return | var | case | eq | ifFrameLoaded | new | super | void | continue | for | in | not | switch | while | default | function | instanceof | on | tellTarget | with | You should also try to avoid using the keywords listed in Table 15-2. They are not reserved words for ActionScript in Flash MX, but they may become a part of the language in the future, because they are slated for potential use by ECMA-262. Table 15-2. Potential reserved words in the future abstract | const | final | int | protected | transient | boolean | debugger | finally | interface | public | try | byte | double | float | long | short | volatile | catch | enum | goto | native | static | | char | export | implements | package | synchronized | | class | extends | import | private | throws | | | In addition to the formally defined reserved keywords, you should also avoid using the names of built-in properties, methods, and objects as identifiers in your code. Doing so overrides the default behavior of the property, method, or object in question. | | The following is a bad idea because the Date variable overrides the built-in constructor of the same name: Date = new Object(); // Oops! We just disabled the Date( ) constructor Now we can no longer create Date objects: var now = new Date( ); // Sets now to undefined trace(now); // Displays the empty string, not the current time and date |