1

现在我有一点,我必须用显示对象的 x 和 y 更新才能与 hitTestPoint 对象一起使用;有什么方法可以从显示对象中获取一个点,而不必创建一个新的点 var 并不断更新它的 x 和 y?

4

1 回答 1

2

尝试这个:

// 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;
于 2010-04-01T16:06:21.147 回答