1 Reply Latest reply on Nov 13, 2009 2:26 PM by kglad

    Preloader help: Actionscript 3 error #1009

    geocitiessurfer

      I installed a loader using the .fla file from this tutorial:

      http://www.developphp.com/Flash_tutorials/show_tutorial.php?tid=45


      The way that he did it was using only two frames with the loading bar being on the first frame and a movie clip which contained a slideshow of about five different images on the second frame along with a stop action for the loading clip.

       

      Since I am extremely new to Flash and the whole programming language as well as ways to do something like add a movie clip that only occupies one cell and contains a series of frames within itself, I decided that I would make a short slideshow starting on frame two and ending on frame eighty.  I made the error of assuming the loading bar would still work with this formatting and now when I test the movie and simulate the download, the loading bar gets around 20% and I get an error message (#1009) that repeats about a hundred times and the slideshow never plays.  I think this is because the code is referencing a folder that contained the images for the previous slideshow sequence.  Below is the action script I used for the loading bar in frame one:

       

      function loadProgress(my_content:ProgressEvent):void {
         
          var percent:Number = Math.floor( (my_content.bytesLoaded*100)/my_content.bytesTotal );
          myLoadText.text = percent + "%";
          myLoadBar.width = percent * 2;
      }
      function loadComplete(e:Event):void {
      currentFrame + 1;
      }
      loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
      loaderInfo.addEventListener(Event.COMPLETE, loadComplete);

       

      Can someone please help me out? I may not even need the loading bar at this time, but I plan on making it a few more pictures longer and I want it to run smoothly instead of waiting for certain images to load.  You can view the rough draft of the slideshow that I want to have a preloader for at http://myhillcountryphotography.com/intro/test.html

       

       

      Thanks.

        • 1. Re: Preloader help: Actionscript 3 error #1009
          kglad Adobe Community Professional & MVP

           

          function loadProgress(my_content:ProgressEvent):void {
             
              var percent:Number = Math.floor( (my_content.bytesLoaded*100)/my_content.bytesTotal );
              myLoadText.text = percent + "%";
              myLoadBar.width = percent * 2;
          }
          function loadComplete(e:Event):void {
          nextFrame();
          }
          loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
          loaderInfo.addEventListener(Event.COMPLETE, loadComplete);