ActionScript available scopes: : Variable scope « Data Type « Flash / Flex / ActionScript






ActionScript available scopes:

 

package {
  // Code here is in the global scope

  public class SomeClass {
    // Code here is in the SomeClass scope

    public static function staticMeth (  ):void {
      // Code here is in the staticMeth scope
    }

    public function instanceMeth (  ):void {
      // Code here is in the instanceMeth scope

      function nestedFunc (  ):void {
        // Code here is in the nestedFunc scope
      }
    }
  }
}
// Code here is in the global scope

        








Related examples in the same category

1.Static Method Scope
2.Instance Method Scope
3.Class Level (Static) Variables and Methods are accessed by using the class name followed by the object name
4.Instance Level Variables and Methods are independent for each instance of the class
5.Function-Level Variables and Functions