Create dynamic class : Dynamic object : Class Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Class » Dynamic object »

 

Create dynamic class


 

dynamic class Employee {
  public var startDate:Date;
  private var age:int;
}

class Report {
  public function Report (employee:Employee) {
    employee.doReport = function (  ):void {
      trace(this.startDate);  // Access to public variable allowed
      trace(this.age);        // Access to private variable denied
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Class
» Dynamic object