public int x { get; private set; }
Or if you want both public, it would be:public int x { get; set; }
In ActionScript3 this would be:
The c# way is so much nicer - feature request Adobe!
private var _x:int;
public function get x():int
{
return _x;
}
public function set x(_x:int):void
{
this._x = _x;
}