开发者

AS3: Point for display object x, y?

Right now I have a point that I have to update with the x and y of a display object to use with the hitTestPoint object; is there any way I can get a point from a display object without havin开发者_Go百科g to make a new point var and continually update its x and y?


Try this:

// Your display object you want to get the position from
var something:DisplayObject; 

// Retrieve the position as a Point object
var position:Point = something.transform.pixelBounds.topLeft;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜