2006/04/20 | 同时输入_x,_y的一种方式
类别(网摘) | 评论(0) | 阅读(11) | 发表于 03: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);

0

评论Comments

日志分类
首页[28]
flash[3]
javascript[3]
C#[1]
feeling[5]
网摘[16]