13 Replies Latest reply on Jan 17, 2008 12:40 PM by brian914

    MovieClipLoader class help

    brian914 Level 1
      I have the following to attach a preloader from the library. It attaches, fades in and positions correctly. But it does not show the progress and does not remove after, like I want it to. What am I doing wrong?

      Thanks a lot for any help with this!


      var container:MovieClip = createEmptyMovieClip("container", getNextHighestDepth());
      var mcLoader:MovieClipLoader = new MovieClipLoader();
      mcLoader.addListener(this);
      mcLoader.loadClip("index.swf", container);

      function onLoadStart(mc:MovieClip) {
      var loadbar_mc:MovieClip = this.attachMovie("loadbar", "loadbar", this.getNextHighestDepth(), {_x:Stage.width/2, _y:Stage.height/2, _alpha:0});
      ZigoEngine.doTween({target:loadbar_mc, _alpha:100, time:.2});
      }
      function onLoadProgress(mc:MovieClip) {
      loadbar_mc.lbar._width = (numBytesLoaded / numBytesTotal)*100;
      }
      function onLoadComplete(mc:MovieClip) {
      loadbar_mc.removeMovieClip();
      }