1 Reply Latest reply on Mar 29, 2007 4:26 AM by MotionMaker

    Newbie / preloader-progress bar help

    yesdream
      Hello - building my first site. created a preloader.fla and also a master.fla that i want the preloader to load into.

      1. when i preview just the preloader file, it starts displaying my flash page before the progress bar is complete.
      2. when i preview my master file, the preloader does not work, but 2 splash pages load on top of each other.

      --------------------
      my actionscript for my preloader is:

      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("splash.swf", "container");

      --------------------

      my actionscript for my master file is:
      var myMCL:MovieClipLoader = new MovieClipLoader();
      var myListener:Object = new Object();

      myMCL.addListener(myListener);

      myListener.onLoadProgress = function(target_mc:MovieClip, loadedBytes:Number, totalBytes:Number) {
      _level50._visible = true;
      var preloadPercent:Number = Math.round((loadedBytes/totalBytes) * 100);
      _level50.preloader.gotoAndStop(preloadPercent);
      }

      myListener.onLoadComplete = function(target_mc:MovieClip) {
      _level50._visible = false;
      }
      myMCL.loadClip("splash.swf", 5);
      myMCL.loadClip("preloader.swf", 50);

      -----------------------------------------

      can anyone see right off hand what my problem(s) are? also, i've gotten to this point with online tutorials and books and it would be most appreciative if you could reply in as simple as possible newbie terms - thx developers!
        • 1. Re: Newbie / preloader-progress bar help
          MotionMaker Level 1
          Do you know what is necessary (content size, bandwidth, number of frames etc) to make your Movie require a preloader?

          Are you trying this with a simulation of streaming in the Test Movie mode?

          Did you set the streaming in Test Movie mode to a very low bps if you have no content in the movie to warrant streaming or did you place large amounts of content to force a slower load while simulating.

          Are you simulating live and your movie is cached or is the bandwidth you have very high speed?

          Are you placing trace statements in each of the event handlers for MovieClipLoader to be sure you see them fire and when? They may not fire in the expected order depending on how the movie is played (in IDE w or w/o streaming simulated, from HD, over Http,).