AS3 等待/忙碌光标?
在as3中,如何将光标更改为系统默认的忙/等待光标(例如mac上的旋转轮)?
In as3, how do you change the cursor to the systems default busy/wait cursor (e.g. the spinning wheel on a mac)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
默认情况下,Flash 似乎不支持等待/忙碌光标,但它确实支持:
如此处所示。不过,您可以通过创建一个精灵并让它跟随鼠标来制作自己的精灵。
It seems as if Flash does not support the wait/busy cursor by default, but it does support:
As seen here. You could make your own though, by creating a sprite and having it follow the mouse.
我建议寻找替代解决方案。首先,Mac 上的旋转轮实际上是操作系统的指示,表明用户界面在一段时间内没有响应并且无法处理系统事件。当应用程序在主线程中执行一些繁重的计算并且无法及时处理事件(应用程序实际上并未请求此游标)时,通常会发生这种情况。
也许您可以找到一种解决方案,以 Flash 固有的方式传达加载信息 - 如果我看到旋转的轮子,我会认为我的浏览器没有响应。
I would suggest looking for an alternative solution. For one, the spinning wheel on the Mac is actually an indication from the OS that the user interface is not responding and has failed to process system events for a period of time. This usually occurs when an application performs some heavy computation in the main thread and is unable to process events timely (the application is not actually requesting this cursor).
Perhaps you can find a solution that communicates loading in a way that is intrinsic to Flash -- if I saw the spinning wheel, I would think that my browser was not responding.
这是另一个解决方案,使用您自己的图像: http:// /livedocs.adobe.com/flex/3/html/help.html?content=cursormgr_4.html
Here is another solution, using your own image: http://livedocs.adobe.com/flex/3/html/help.html?content=cursormgr_4.html