1 Reply Latest reply on Jul 4, 2008 5:02 AM by anirudhs

    reset entire application?

    john isaacks Level 1
      what I want to do is basically remove all memory from flash, and recall the documant class construtor function, basically like restarting the entire application.


      this is an AIR application I am working on so I cant just refresh the browser.


      why do I want to do this?...Because I basically have 2 menus, the main menu and the sub menu, the sub menu takes up so much memory that when you leave it and go back to the main menu, the main menu no longer operates as desired. I am also having trouble wiping the submenu out of memory. But when you go to the main menu again it is just like going to the main menu for the first time (nothing changes after accessing the submenu ), so a clean restart would be good.


      Is there a way to do this?

      THANKS!!!
        • 1. Re: reset entire application?
          anirudhs Level 2
          Hi,

          Resetting the AIR application to its starting state is not supported. However, have you tried making your main application, a light non-visible window and launching a new window (which is the only window that the user sees) with your menu / submenus?

          Then you could close the new window and re-open it if you wanted to reset state. For your application to exit, you could just call NativeApplication.exit() though be careful since it doesn't dispatch the closing event.