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.
我用自定义鼠标光标创建了一个游戏。问题是,它并不总是在所有 moiveclip 之上。我不断在每个阶段添加新的电影剪辑。我在网上搜索但还没有找到正确的解决方案。谁能帮我吗 ?提前感谢
添加此代码:
stage.addEventListener(Event.ADDED,addedToStageHandler); function addedToStageHandler(e:Event):void{ myMouseCursor.parent.setChildIndex(myMouseCursor, myMouseCursor.parent.numChildren-1); }
当有东西添加到舞台时,它会捕获事件并自动将鼠标对象放在最高级别