捕获Flash/Flex重绘DisplayObject事件?

发布于 2024-10-08 18:56:32 字数 219 浏览 1 评论 0原文

我正在尝试捕获滚动区域中某些 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

尘曦 2024-10-15 18:56:32

到目前为止,看起来还没有办法捕获Flash Player 的重画事件。

但是,为了解决这个具体问题,我使用了
- 在我手动重绘的显示对象上,使用 object.transform.pixelBounds 检查边界。

  • 使用 Event.RENDER 触发事件,以便每个对象在按边界位于显示区域内时根据需要重绘。

不完美,但可以完成工作。希望 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

  • Use Event.RENDER to fire the event so each objects redraws as needed if they are within the display area as per bounds.

Not perfect, but does the job. Wish FP had this feature for people who do detail level work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文