1 Reply Latest reply on Sep 15, 2008 6:22 AM by robdillon

    pre loader and load movie issue

    redsox05 Level 1
      I have a website with a preloader that works fine. But I have other preloaders inside the website that load movies as well. Some of them work fine but some the swf will start before the preloader is finished. How do I det the movies to not start until the preloader is finished. here is my code.

      loaderMC._visible = false;
      loaderMC.onEnterFrame = function() {
      var picLoaded = this._parent.container.getBytesLoaded();
      var picBytes = this._parent.container.getBytesTotal();
      per = Math.round((picLoaded/picBytes)*100);
      if (per>4) {
      this._visible = true;
      this.percent.lbl_txt.text = per+"%";
      if (picLoaded/picBytes>=1) {
      this._visible = false;
      delete this.onEnterFrame;
        • 1. Re: pre loader and load movie issue
          robdillon Most Valuable Participant
          Set your swf files that are to be imported to stop on the first frame. Then, when you import the new swf, tell it to play when the file is fully loaded. You might be able to use the enterFrame function that you have, or you could set a listener for the loader that will call a new function. Look at the example code in the online help for addListener in the section on MovieClipLoader.