1 Reply Latest reply on Aug 12, 2010 10:31 PM by prethi.flex

    Preload a Flex AIR application in maximized state?

    www.marcelvanduijn.com

      Hello,

       

      I need to develop a desktop application for a client. It will be an SWF based AIR app developed in Flex 3.

       

      Im quite new to Flex and AIR. Does anyone know if its possible to preload an SWF based AIR application with the native window in maximized state? Im afraid this just isnt possible?

       

      The Flex 2-frame preloading model goes through different phases and the Preloader dispatches the following events:

       

      1. ProgressEvent.PROGRESS --> download progress of main SWF (we're in frame 1 of Flex preloading model)
      2. Event.COMPLETE --> main SWF download complete (we're in frame 1 of Flex preloading model)
      3. FlexEvent.INIT_PROGRESS --> initializing the main application (you can defer advancing to frame 2 by defering the dispatch of FlexEvent.INIT_PROGRESS
      4. FlexEvent.INIT_COMPLETE --> initialization of main application complete. Incicates that SystemManager can remove the preloader and add the application to the stage

       

      Now I can ony access WindowedApplication's 'nativeWindow' property and call 'nativeWindow.maximize()' from WindowedApplication's 'creationComplete' handler. WindowedApplication dispatches the FlexEvent.CREATION_COMPLETE event right before the Preloader dispatches the FlexEvent.INIT_COMPLETE. So..... that's at the end of the whole preloading process.

       

      Does this mean I cannot preload a Flex AIR app with the native window in maximized state? Or should you not even visualize preloading of AIR desktop apps?

       

      Any help and tips are greatly appreciated!

       

      Marcel