AS 3.0 有即玩即死功能吗?
AS 3.0中是否有任何函数可以播放MovieClip,然后在播放后执行removeChild()?我不想停止()它,我只是想把孩子从舞台上移走。
Is there any function in AS 3.0 that plays a MovieClip and then does removeChild() after it has been played? I don´t want to stop() it i just want to remove the child from stage.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
作为 Sr.Richie 建议的代码示例,以下是所需内容:
在要播放和删除的 MC 内部,添加此帧代码:
注意,我尚未测试此代码,但这是总体思路。
As a code example, suggested by Sr.Richie, here is what is required:
Inside the MC to play and remove, add this frame code:
Note I haven't tested this code, but it's the general idea.
不,没有内置方法可以做到这一点。
但是您可以让您的对象扩展 MovieClip,并创建一个由 ENTER_FRAME 事件触发的自定义方法来检查是否到达最后一帧,然后将它们从父级中删除
No, there's no built-in method to do it.
But you can let your objects extend MovieClip, and create a custom method triggered by an ENTER_FRAME event to check if the last frame is reached, and remove them from the parent then