Showing posts with label how to. Show all posts
Showing posts with label how to. Show all posts

Friday, September 30, 2011

How to override .x and .y properties of MovieClip in as3

//Note: super() method is used to invoke
//the original method you are overridding.
public override function get x():Number{
    return super.x;
}
public override function set x(xCoord:Number):void{
    super.x     = xCoord;
}

public override function get y():Number{
    return super.y;
}
public override function set y(yCoord:Number):void{
    super.y     = yCoord;
}