同时输入_x,_y的一种方式

      网摘 2006-4-20 3:49

摘自: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);

标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}