Define class with properties : Class : Class Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Class » Class »

 

Define class with properties


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){


    }
  }
}
class Car {
  private var _sMake:String;

  public function get make():String {
    trace("Getting the value...");
    return _sMake;
  }

  public function set make(sMake:String):void {
    trace("Setting the value...");
    _sMake = sMake;
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Class
» Class