2 Replies Latest reply on Apr 12, 2009 2:39 PM by iggyotis

    how do I start preloader later in movie clip?

    iggyotis Level 1

      Hi,

       

      I want a preloader to start about 20 frames in, rather than at the very beginning of a movie clip, is this possible?

       

      The reason I dont want it to start at the beginning is because it's on an external swf which loads when a button is clicked. Becuase the swf has a transparent background at the very beginning, the preloader is showing above the main movie and it cant really be seen. The main slideshow actually starts 20 frames in so this is when I really need the preloader.

       

      any ideas?

        • 1. Re: how do I start preloader later in movie clip?
          kglad Adobe Community Professional & MVP

          sure.  you can start a preloader anytime by placing it and its code wherever you want (including frame 20).

          • 2. Re: how do I start preloader later in movie clip?
            iggyotis Level 1

            The way I have my preloader set is on another scene so i'm not sure 

            how to delay it by 20 frames in the main time line? When I move the 

            preloader frames along by 20 it doesn't work?

            This is the code I have on my preloader:

             

            loaded_bytes = _root.getBytesLoaded();

            total_bytes = _root.getBytesTotal();

            loadpercent = (loaded_bytes/total_bytes)*100;

             

            if (loadpercent != 100) {

                 // OPTIONAL: Place the percentage on some textfield

                 preloaderText.text = int(loadpercent) + '%';

                 // Goto respected load percentage since not done

                 bar.gotoAndStop(int(loadpercent));

            } else {

                 gotoAndPlay("Main", 1);

            }

             

            code on next frame:

            gotoAndPlay(57);