2 Replies Latest reply on Jul 19, 2006 12:16 PM by Jim_Esteban

    Delete this.onEnterFrame();

    LSNsaltlamp
      The following code returns:

      1 loaded
      2 loaded
      3 loaded
      all loaded
      1 loaded
      2 loaded
      3 loaded
      all loaded
      256 levels of recursion were exceeded in one action list.
      This is probably an infinite loop.
      Further execution of actions has been disabled in this movie.

      I assume I have my delete this.onEnterFrame(); setup wrong.

      this.onEnterFrame = function() {
      var loaded2_1 = set1_1.getBytesLoaded();
      var total2_1 = set1_1.getBytesTotal();
      var percent1 = loaded2_1/total2_1;
      if (loaded2_1 == total2_1 && loaded2_1>60) {
      load2_1._visible = false;
      trace("1 loaded");
      }
      var loaded2_2 = set1_2.getBytesLoaded();
      var total2_2 = set1_2.getBytesTotal();
      var percent2 = loaded2_2/total2_2;
      if (loaded2_2 == total2_2 && loaded2_2>60) {
      load2_2._visible = false;
      trace("2 loaded");
      }
      var loaded2_3 = set1_3.getBytesLoaded();
      var total2_3 = set1_3.getBytesTotal();
      var percent3 = loaded2_3/total2_3;
      if (loaded2_3 == total2_3 && loaded2_3>60) {
      load2_3._visible = false;
      trace("3 loaded");
      }
      if ((percent1 == percent2 == percent3 == 1) && loaded2_1>60 && loaded2_2>60 && loaded2_3>60) {
      trace("all loaded");
      delete this.onEnterFrame();
      }
      };