0 Replies Latest reply on Feb 9, 2007 8:04 AM by melissa_v

    Preloading Nightmares (kind of)

    melissa_v
      It's me again with my infinite questions. I have this code written to preload all of my .swf's in the background upon opening my site. Each of those swf files is a "loadMovieClip" function on various objects within the site.

      The code is:

      contArr = [
      "aboutPage.swf",
      "casestudiesSlideShow.swf",
      "homePage.swf",
      "introSlideShow.swf",
      "comingSoon.swf",
      "coveragePage.swf",
      "designPage.swf",
      "devastationSlideShow.swf",
      "facultyPage.swf",
      "partnersPage.swf",
      "progressPage.swf",
      "purchasePage.swf",
      "studentsPage.swf",
      "teamworkSlideShow.swf"
      ];

      function preloadClips (nr) {
      var cnt = this.createEmptyMovieClip("container",10);
      cnt._visible = false;
      var ch = this.createEmptyMovieClip("check",11);
      ch.onEnterFrame = function () {
      var bl = this._parent.container.getBytesLoaded();
      var bt = this._parent.container.getBytesTotal();
      if (bl/bt==1) {
      trace ("loaded" + contArr[nr]);
      this.removeMovieClip();
      this._parent.container.removeMovieClip();
      if (this.nr<=contArr.length) {
      preloadClips(++nr);
      } else {
      return;
      }
      }
      }
      cnt.loadMovie(contArr[nr]);
      }

      preloadClips(0);


      ___
      I am receiving this error message. All of the files are within the same folder, and I'm not really sure what file it is even looking for. Help??

      loadedaboutPage.swf
      loadedcasestudiesSlideShow.swf
      loadedhomePage.swf
      loadedintroSlideShow.swf
      loadedcomingSoon.swf
      loadedcoveragePage.swf
      loadeddesignPage.swf
      loadeddevastationSlideShow.swf
      loadedfacultyPage.swf
      loadedpartnersPage.swf
      loadedprogressPage.swf
      loadedpurchasePage.swf
      loadedstudentsPage.swf
      loadedteamworkSlideShow.swf
      Error opening URL "file:///C|/Documents%20and%20Settings/Melly/My%20Documents/School%20Documents/STUDIO/Web Site/undefined" Text