1 Reply Latest reply on Aug 5, 2009 11:00 AM by kglad

    Problem with random number repeating

    Rabel Level 1

      I am using a code to load images into random movieclips and this works ok but I am getting a lot of repeated numbers

       

      totalPlaces=6
      for (i = 1; i < totalPlaces; i++) {
          rannum=random(27)+1
          trace(rannum+" num")  

          this['places'+rannum].attachBitmap(this['Imagep'+i],this.getNextHighestDepth(),"auto",tru e)

      }

       

      How can I add a code for it to check if the random number has already been called. Any help is apprieciated,

       

      Thanks,

      Randy