捕获Flash/Flex重绘DisplayObject事件?
我正在尝试捕获滚动区域中某些 MovieClip / Sprite 对象的重绘事件。
理想情况下,应该能够捕获 Flash Player 本身重绘对象时的事件,如 FP 调试中的“显示重绘区域”所示。
我尝试使用 Event.RENDER 来捕获此事件,但它甚至在对象不可见/重绘时触发。
是否有任何原生 Flash 事件可以帮助我准确地捕捉到这一点?
蒂亚!
I'm trying to capture the redraw event for some MovieClip / Sprite objects that are in a Scroll area.
Ideally, should be able to capture the event when Flash Player itself redraws the objects as can be seen with "Show Redraw Regions" in FP Debug.
I've tried to use the Event.RENDER to capture this, but it even fires when the object is not visible / redrawn.
Is there any native flash event that can help me capture this accurately?
TIA!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
到目前为止,看起来还没有办法捕获Flash Player 的重画事件。
但是,为了解决这个具体问题,我使用了
- 在我手动重绘的显示对象上,使用 object.transform.pixelBounds 检查边界。
不完美,但可以完成工作。希望 FP 为从事细节级工作的人提供此功能。
So far, looks like there is no way to capture the Flash Player's redraw event.
However, to solve this specific problem I used
- On the display object that I manually redraw, check the bounds with object.transform.pixelBounds
Not perfect, but does the job. Wish FP had this feature for people who do detail level work.