14 Replies Latest reply on Nov 29, 2006 2:01 AM by arunbe

    Random MC load without repeating

    AESS1981 Level 1
      I am loading a random MC using the following code:

      this.createEmptyMovieClip("bground", 1);
      bground._x = 0;
      bground._y = 0;

      var myClips:Array = new Array("buzz_teamplay1.swf", "buzz_teamplay2.swf", "buzz_teamplay3.swf", "buzz_teamplay4.swf");

      var currentClip = random(myClips.length);
      bground.loadMovie("buzzwords/" + myClips[currentClip]);


      At the end of each MC, another is loaded at random using:

      this.loadMovie("buzzwords/" + _root.myClips[random(_root.myClips.length)]);


      Can this code be tweaked to ensure no MC is repeated twice?