5 Replies Latest reply on Sep 13, 2007 4:52 PM by kglad

    animated loading bar

    crila Level 1
      I am trying to alter my AS3 code so the user sees an animation progress instead of a regular loading bar. Here is my original code...

      var ldr:Loader = new Loader();
      var url:String = "a_home.swf";
      var urlReq:URLRequest = new URLRequest(url);

      ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progresshandler);
      function progresshandler(myevent:ProgressEvent):void {
      var myprogress:Number=myevent.target.bytesLoaded/myevent.target.bytesTotal;
      myTextField_txt.text = Math.round(myprogress*100)+"%";
      ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, alldone);
      function alldone(myevent:Event):void {

      I have a feeling I would need to alter this line "bar_mc.scaleX=myprogress;". If my bar_mc is a movie clip with animation how could I get the movie clip to advance through keyframes instead of increasing the X scale?