flex swf 应用程序 - 寻找 unload() 或 onClosing() exiting() 函数 [英] flex swf app - looking for unload() or onClosing() exiting() function

查看:15
本文介绍了flex swf 应用程序 - 寻找 unload() 或 onClosing() exiting() 函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的 flex 客户端 swf 应用程序上传到某个网站,该网站在其网站上加载了不同的 swf.所以你会看到你的应用程序漂浮在那个网站上.我的应用程序是 Flex swf 应用程序,并且具有启动逻辑流程的 onCreationComplete().现在我想在应用程序卸载(或可能退出事件,或关闭事件..)时执行清理状态并将状态保存在共享对象中swf 正在卸载/关闭/退出?(就像 onCreationComplet() 函数)

I upload my flex client-side swf app to some website that loads different swf's on it's site. So you see your application floating in that website. My app is Flex swf app and has onCreationComplete() that starts the flow of logic. Now I want to do cleanup state and save state in a shared object when the application unloads (or probably exiting event, or closing event..) So do we have any function that I can implement and the flash platform automatically calls that function when the swf is unloading/closing/exiting?? (just like the onCreationComplet() function)

诸如 onUnloading()、onUnload() 或 onClosing() 之类的东西...

some thing like onUnloading(), or onUnload() or onClosing()...

谢谢

推荐答案

您可以向主(根)对象添加事件侦听器,并让您的方法在 Event.REMOVED_FROM_STAGE 或将侦听器添加到 root.loaderInfo 并在 Event.UNLOAD.

You could add an event listener to your main (root) object and have your method execute on Event.REMOVED_FROM_STAGE or add the listener to root.loaderInfo and execute on Event.UNLOAD.

这篇关于flex swf 应用程序 - 寻找 unload() 或 onClosing() exiting() 函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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