6 Replies Latest reply on Sep 4, 2008 12:07 PM by fcastro75

    MovieClipLoader's loadClip method is loading swf before its downloaded 100%??

    fcastro75 Level 1
      Hello everyone,

      I created a MovieClipLoader a few days ago that is reuseable. I will be using the same preloader graphics when I am loading in external swf on my stage. My MovieClipLoader functions fine with jpegs and smaller sized swf files. But whenever I load a larger sizes swf it loads the movie before it has fully downloaded in simulation mode. The odd part is that everything works fine with smaller swf files but not larger ones . I have tested a few movies and that seems to be the common theme.

      In the example below main.swf is the clip I am loading into "mcBackground".

      var mclTV : MovieClipLoader = new MovieClipLoader ();
      var loadListener : Object = new Object ();
      // events it will handle
      loadListener.onLoadStart = function ()
      {
      trace ("onLoadStart");
      trace (this._target);
      progress_mc._y == 268;
      txtLoaded._visible = true;
      progress_mc._visible = true;
      };
      loadListener.onLoadProgress = function (target : MovieClip, bytesLoaded : Number, bytesTotal : Number)
      {
      txtLoaded.text = String (Math.floor (bytesLoaded / bytesTotal * 100)) + "% loaded";
      progress_mc._xscale = bytesLoaded / bytesTotal * 100;
      };
      loadListener.onLoadComplete = function ()
      {
      trace ("onLoadComplete");
      txtLoaded._visible = false;
      progress_mc._visible = false;
      };
      mclTV.addListener (loadListener);
      mclTV.loadClip ("main.swf", mcBackground); //mcBackground is an empty movieClip on the stage
      txtLoaded._visible = false;
      progress_mc._visible = false;