3 Replies Latest reply on Sep 11, 2008 11:14 AM by stephan.k

    proper way of preloading flash 8 / as2

    stephan.k Level 1
      Dear Forum

      I am using Actionscript 2 for Flash player 8 in the CS3 environment. I am trying to create a super lightweight swf file (preloader.swf) which has a little scripted animation in it. It is under 10k!. Once the animation starts it loads in the main application (mainApp.swf) into an empty movieClip on the stage: _level0.stageMC. the mainApp.swf file contains the library with all the graphical assets (~400k) for all the UIs and animations. Also all the external .as code is instantiated in the mainApp.swf file on the first frame.

      Now the problem: I can't load in library items from the library of the mainApp through the preloader.swf file

      How is this done usually? I'm trying to avoid the long blank screen of the first frame preloading of all code and library (export on first frame) items...

      Any insight appreciated. Thank you.

      stephank




        • 1. Re: proper way of preloading flash 8 / as2
          Manno Bult-to3djt Level 2
          Hi Stephan,

          Option one (for the mian app)
          check out the export in first frame option (actually: turn it off) for library item set to export for actionscript. If you turn off that export option you need to place those items on the stage in say frame two so you have the first frame to build a progressbar.

          Option two (for the preloader swf)
          take a look at the MovieclipLoader class.
          It allows to load external movies and graphics and has the possibility to relatively easy monitor the progress of the loading.
          • 2. Re: proper way of preloading flash 8 / as2
            stephan.k Level 1
            Hi Manno

            Thanks for your reply. Somehow it started working now. I have a feeling that I've targeted things wrong... but there are new issues which I'll be posting in a separate thread.

            Thank you again.

            Regards,

            stephank


            • 3. Re: proper way of preloading flash 8 / as2
              stephan.k Level 1
              Hello

              So what I ended up doing was the following:

              I kept the first 10 frames for the preloader where I created a preloader with all code on the timeline (ended up being a lot of redundant code but not the end of the world....) Then I exported all external classes on frame 11 (under publish settings > settings > Export Frame for classes) and the main app starts on frame 12.

              Seems to be working so far on my local setup since there's only one swf file.

              Thanks for your time,

              Best,

              stephank