7.1 Variable modifiers

When allowed by the context of the definition, the following attributes modify a variable definition.

Access control and visibility control namespaces specify the namespace part of the variables name.

The static attribute may only be used inside a class definition and causes the variable to become a trait of the class object rather than the instance object.

The prototype attribute may only be used inside a class definition and causes the variable to be added to the class's prototype object and a get and set accessor to be added to the instance traits of the class. The purpose of the accessor methods is to simulate the behavior of accessing prototype properties in ECMA-262 edition 3.


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/specs/actionscript/3/as3_specification63.html