如何重新启动与ActionScript 3的Flash应用程序 [英] How do I restart flash application with actionscript 3

查看:166
本文介绍了如何重新启动与ActionScript 3的Flash应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是的,我需要重新启动我的申请,我actioscript 3 code或至少删除阶段的所有内容上传的开始。

yeah, I need to restart my application, my actioscript 3 code or at least remove all the content in stage to upload the beginning.

这是不是电影,所以用gotoandplays打是不是一种选择。

This is not movie, so playing with gotoandplays is not an option.

谢谢!

推荐答案

最好的做法是为每一个带有强烈的监听器也侦听Event.REMOVED_FROM_STAGE事件对象,并销毁其所有的听众和处理你想要的属性保存。

Best practice would be for each object that carries a strong listener to also listen for the Event.REMOVED_FROM_STAGE event, and destroy all its listeners and handle the properties you wish to save.

while(numChildren) removeChildAt(0);

从根(或主时间轴)调用将从目前的容器范围中删除所有符号。我假设你要调用它添加到显示列表,因此

Called from the root (or main timeline) will remove all symbols from the current container in scope. I assume what you're calling it in is added to the display list, so

while(MovieClip(root).numChildren) MovieClip(root).removeChildAt(0);

时适当code。

Is appropriate code.

这篇关于如何重新启动与ActionScript 3的Flash应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆