2 Replies Latest reply on Dec 19, 2009 5:18 AM by Ned Murphy

    How to start a preloader

    SmartidVOF

      We have some problem with the speed of our website. That's why we want to start a preloader when those pages will be opened by our visitors. Example of page were we want the preloader: http://www.gsmmatch.nl/description/land+rover+s1_113715.html. We have found a nice preloader on http://flashspeaksactionscript.com/tag/preloader/, it's the first 'round' preloader and the class code is under the preview. We want to start this preloader when the file mobiledescription.php will be opened.

       

      This is my first experience with flash. So how can i start this preloader on those pages, because i have no idea right now?

        • 1. Re: How to start a preloader
          Ned Murphy Adobe Community Professional & MVP

          Unless I'm missing something, that is not so much a preloader as it is just a visual that might accompany one.  I don't see anywhere in it where it measures the loading progress to determine when to end it.  It would appear you need other code for the actual preloading that would also have to trigger the display of this visual.  Also, it doesn't appear to provide for placement of it, so you have to have code for that as well.  In any case, assuming you get the file into your class path, your preloading code would create an instance of this visual using something like the following.

           

          var preloaderVisual:CircleSlicePreloader = new CircleSlicePreloader();
          preloaderVisual.x = stage.stageWidth/2;
          preloaderVisual.y = stage.stageHeight/2;
          addChild(preloaderVisual);

           

          And once the preloading is done, your preloading code would trigger removal of the visual using...

           

          removeChild(preloaderVisual);

          • 2. Re: How to start a preloader
            Ned Murphy Adobe Community Professional & MVP

            If you want to use this as a preloader visual, then you'll need to gain some understanding of how an actual preloader is used and works.  I am providing a link below for a preloader tutorial.  Once you understand how it operates you can set about incorporating the code for the visual.

             

            AS3 Preloader
            -------------

            http://www.gotoandlearn.com/play?id=85