5 Replies Latest reply on Oct 23, 2006 5:52 PM by AustinHurst

    loading jpegs with progress bar

    melodywestern
      I am having trouble when loading external jpegs into an empty movie on the main timeline. The jpegs load but I'm trying to assign a preloader to the empty movie clip as the jpegs can have a large filesize.
      When the page initially loads it has a main preloader which works fine it then loads the page and the first jpeg I have assigned to load into the movie clip loads WITH the preloader as I want it to.
      However when I click on the thumbs to load other jpegs the progress bar does not appear and therefore they are not preloading. Does anyone have any idea why.

      Here is the AS on the main timeline:

      holder_mc.loadMovie("Images/1.jpg");

      this.onEnterFrame = function() {
      l = holder_mc.getBytesLoaded();
      t = holder_mc.getBytesTotal();
      p = Math.round((l/t)*100);
      if (p<100) {
      preloaderPic_mc.gotoAndStop(p);
      } else {
      preloaderPic_mc._visible = false;
      this.onEnterFrame = null;
      }
      };

      The AS on each of the thumbnail buttons:

      on(release) {
      holder_mc.loadMovie("images/1.jpg");
      }
      on(rollOver) {
      pic1_btn._alpha-=50
      }
      on(rollOut) {
      pic1_btn._alpha+=50
      }


      Thankyou in advance