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)
some thing like onUnloading(), or onUnload() or onClosing()...
Thanks
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.