3 Replies Latest reply on Oct 8, 2007 7:39 AM by kglad

    Using a preloader on a dynamically loaded movie

    jayman978
      I am dynamically loading a swf called picture1.swf into a blank mc called picture with the following code:

      loadMovie("picture1.swf", "picture");

      In picture1.swf I am using the following script for my preloader:

      totalBytes = Math.round(getBytesTotal() / 1024);
      loadedBytes = Math.round(getBytesLoaded() / 1024);
      percentDone = Math.round((loadedBytes / totalBytes) * 100);
      if (_root._framesloaded >= _root._totalframes)
      {
      gotoAndPlay("start");
      }

      When i test the preloader in picture1.swf it works fine. However when picture1.swf is dynamically loaded into my main swf the preloader stops working. Any ideas?