package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var crTest:Car = new Car();
trace(crTest.make); // Displays: undefined
crTest.make = "Old";
trace(crTest.make); // Displays: Olds
}
}
}
class Car {
private var _sMake:String;
public function get make():String {
return _sMake;
}
public function set make(sMake:String):void {
_sMake = sMake;
}
}
|