Flash Player 是否“低质量”?仅设置抗锯齿?
这不仅仅是我的好奇心,最近我收到了一份关于我的一个 AS3 应用程序的错误报告。仅当 Flash 播放器中的质量设置为低(高/中 - 一切正常)时,才能重现此错误。该错误改变了应用程序的行为,但这对我来说是一个谜,为什么它只发生在低质量的情况下,而据说质量会影响渲染和视觉外观,而不是代码或行为。
简而言之,我有一个菜单面板(MovieClip),其中包含多个项目(也是MovieClip)。非常简单,它在 MouseEvent 之后出现在屏幕上,并且用户将光标从一个元素向下移动到另一个元素。当光标到达第二个项目的边缘时,菜单突然消失。 在我的代码面板中,隐藏是在鼠标单击或鼠标移出时设置的。
就我个人而言,我认为问题出在 Tweener 中,我必须使用那段旧代码。当鼠标位于用户图标上方时,会显示菜单面板,同时在 Tweener 的帮助下,我对该图标产生了一些简单的效果。
我已经探索了 adobe 和 firefox(我的应用程序适用于网络浏览器,并且报告了 firefox 的错误)bugtracker,但到目前为止我什么也没发现。也许是 Flash Player 11 与数组的错误行为,已经修复了......我已经没有想法了。
It not just my curiosity, recently I've received a bugreport concerning one of my AS3 applications. This bug can be reproduced only if the quality in flash player is set to LOW (HIGH/MEDIUM - everything is ok). The bug changes the application behaviour, but it's a mystery for me, why it happens only for LOW quality while quality is said to influence rendering and visual appearance, not the code or behaviour.
Briefly, I have a menu panel (MovieClip) with several items (also MovieClips). Very simple, it appears on a screen after a MouseEvent and a user moves a cursor from one element down to another. When the cursor reaches the edge of the second item, the menu suddenly disappears.
In my code panel hiding is set on mouse click or mouse out.
Personally, I think, that the problem is in Tweener, I have to use that old piece of code. The menu panel is shown when mouse is above a user icon, and concurrently with the help of Tweener I produce some simple effects on this icon.
I have explored adobe and firefox (my app is for web browsers and the bug is reported for firefox) bugtrackers, but so far I have found nothing. Maybe misbehaviour of flash player 11 with Arrays, already fixed... I've run out of ideas.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自文档:
如果它仅在渲染设置为低时发生,那么这可能是一个计时问题 - 即,该错误一直存在,但因为您提前结束了渲染,所以可以触发该错误。错误报告者的计算机速度很慢吗?是不是同时发生了很多事情?菜单是否被删除、设置为不可见或重新定位?
就像 @jeremynealbrown 所说,尝试将你的类分离到一个简单的项目中,以确保你的逻辑没有任何问题。
另一种方法是重写
removeChild()
方法,以及visible
和x
和y
属性来查看哪个是设置它,然后在调用这些的所有调用之前放置跟踪以查看触发它的内容。如果您认为问题出在 Tweener 中,请向菜单面板添加一个
MOUSE_OVER
侦听器,该侦听器会调用removeAllTweens()
之类的内容,无论菜单面板的状态如何。如果错误不再发生,这将表明它与补间引擎有关。From the docs:
If it only happens when rendering it set to low, then it's probably a timing issue - i.e., the bug has always been there, but because you're wrapping up rendering earlier, you can trigger then bug. Is the bug reporter's computer a slow one? Is there a lot happening at once? Is the menu being removed, set to invisible, or repositioned?
Like @jeremynealbrown said, try and separate out your class to a simple project to make sure there's nothing wrong with your logic there.
Another method, override the
removeChild()
method, andvisible
andx
andy
properties to see which one is setting it, then put traces before all calls that call these to see what's triggering it.If you think the problem is in Tweener, add a
MOUSE_OVER
listener to the menu panel that calls something likeremoveAllTweens()
, no matter the state of the menu panel. If the bug doesn't happen anymore, this will show you that it's related to the tween engine.