1 Reply Latest reply on Feb 25, 2011 6:09 PM by kglad

    limiting the randomness


      Ok, so I have this line of code, it's a part of a code that generates mcs at random X and Y, it worked when I wanted it to spawn everwhere, but now i want to limit the X to 200 - 430

      this is the code for spawning on all 640 (1-640) pixels of the movie:

      this._x = random(640);

      i've tried (200-430) but it acts as 200 minus 430 and I end up with the X being 0 somehow


      Edit: Never mind, I got it... Here's how: this._x = 200 + random(230);