Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
现在我有一点,我必须用显示对象的 x 和 y 更新才能与 hitTestPoint 对象一起使用;有什么方法可以从显示对象中获取一个点,而不必创建一个新的点 var 并不断更新它的 x 和 y?
尝试这个:
// 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;