1 Reply Latest reply on Mar 24, 2009 12:50 PM by Jeff Swartz

    Graphics Loader - Air Desktop App Approach

      Hi Everyone,

      I'm new on Air, and I'm working on a new project based on Air.
      One of the first challenges is to program a GraphicLoader in the context of a desktop application.
      The first issue that i found are the "loading times", beause is different in the web context.

      Basically, The idea is program a class (or group of classes) that has a "stack" of graphics to load. Is commonly seen in applications like Eclipse startup, which loads some stuff before initialize.

      Here is a Image link for reference: SplashScreen

      it is possible to do a splash screen that loads required features (graphics or some stuff), before Application starts??

      The important thing is to figure out if it's possible in a desktop context and not in a web context, which means real "CPU bursts" to taking control over the times of load each required graphic or data.

        • 1. Re: Graphics Loader - Air Desktop App Approach
          Jeff Swartz Level 3
          Yes, this is all possible:

          1. In the application initialization code, you can spawn a new NativeWindow object to serve as the splash screen.
          2. Use code logic to position and resize the window (based on the user's screen size, perhaps). Then set the visible property of the nativeWindow object to true.
          3. Execute code to load the graphics and perform other initialization tasks. You can display progress in the splash screen window.
          4. When all initialization tasks are complete, close the spash screen window (call the close() method of the NativeWindow object).

          Note that the initialization (graphics loading) routine happens when the application starts up (not *before* the application starts).