摘自:http://www.darronschall.com/weblog/archives/000081.cfm
// pt is an object with an x and a y property
function $ setLocation(pt) {
this._x = pt.x;
this._y = pt.y;
}
function $ getLocation() {
return {x:this._x, y:this._y};
}
MovieClip.prototype.addProperty("_location", $ getLocation, $ setLocation);
// constants for ASSetPropFlags
var HIDDEN:Number = 1;
var PROTECT_DELETE:Number = 2;
var PROTECT_OVERWRITE:Number = 4;
ASSetPropFlags(MovieClip.prototype,"_location",
HIDDEN | PROTECT_DELETE | PROTECT_OVERWRITE, 0);
回复Comments
作者:
{commentrecontent}