I currently have an windowed application .mxml (call it Main) that loads another .mxml (call it Sub) in a container. When an event fires in the Sub program, the event listener in Main is triggered. So I have my event listener call a function in Main. This all works great. The problem seems to be that the FlexGlobals.topLevelApplication isn't Main at this point. It seems to have changed? Maybe because it has loaded Sub.mxml.
The problem i'm having is that when i'm in the function in Main, I want to close() the entire Air application, and restart it. the closing part works great, it just never restarts. Here is the code i'm using to Close then restart:
var mgr:ProductManager = new ProductManager("airappinstaller");
mgr.launch("-launch "+ topApplication.nativeApplication.applicationID + " " + topApplication.nativeApplication.publisherID);
Any ideas why topApplication.nativeApplication wouldn't restart?