2 Replies Latest reply on Oct 6, 2010 8:23 AM by rickywh

    How to use the flash cs5 preloader


      How do I use the built in flash cs5 preloader? I am using a trial copy of flash cs5 and would like to experiment with it and test it. Currently, when I simulate download on my flash movie, even at 14.4, I do not see anything, just white screen.

        • 1. Re: How to use the flash cs5 preloader
          Ganesh_Palwe Level 3

          Once you load the builtin preloader, go to the firstframe open the existing action script through action script panel(Press F9 to open).

          The code already contains event handlers for showing the progress and tracking complete event.

          You will need to add the code for loading the content of your choice. And then associating those event handlers to your loader. I have provided sample modified code below:




          var loader:Loader = new Loader();

          var request:URLRequest = new URLRequest("image.jpg");



          loader.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoading);

          loader.loaderInfo.addEventListener(Event.COMPLETE, onComplete);


          function onLoading(evt:ProgressEvent):void {

          var loaded:Number = evt.bytesLoaded / evt.bytesTotal;

          percent_txt.text = (loaded*100).toFixed(0) + "%";



          function onComplete(event:Event):void {

          this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onLoading);

          this.loaderInfo.removeEventListener(Event.COMPLETE, onComplete);



          • 2. Re: How to use the flash cs5 preloader
            rickywh Level 1

            Hi, thanks for the reply, yes, I believe what you said is working fine for me. I a concern about this preloader. When I create MovieClips for my Library and export them for actionscript, should I use the export in frame 1 option? or should I go into my AS settings, specify that all get exported on frame 2 and use that instead?