3 Replies Latest reply on Apr 12, 2007 1:07 PM by Sketchsta

    preloader

    Freedom1029
      I am trying to use a simple preloader and for some unknown reason my swf starts playing before the preloader is done. If you have any clue as why this is hapenning please let me know.

      Here is the code for the preloader:

      var myMCL:MovieClipLoader = new MovieClipLoader();
      var myListener:Object = new Object();

      myMCL.addListener(myListener);


      myListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
      var loaded:Number = Math.round((bytesLoaded/bytesTotal) * 100);
      progressBar.gotoAndStop(loaded);
      }

      myListener.onLoadInit = function (target_mc:MovieClip) {
      progressBar._visible = false;
      }

      myListener.onLoadStart = function (target_mc:MovieClip) {
      progressBar._visible = true;
      }

      myMCL.loadClip("cir.swf","container");