Skip to main content
Known Participant
June 23, 2008
Question

*simple* how to write range

  • June 23, 2008
  • 1 reply
  • 207 views
I am creating a flash game, and I can't seem to get a range to work correctly. I have an object that needs to be collected. once you touch it, it randomly regenerates on the y axis. That all works fine, however I'd like it to regenerate between lets say 20 and 500 because otherwise it overlaps a menu bar.

Here's what I have

This topic has been closed for replies.

1 reply

Inspiring
June 23, 2008
Check out the help files for the Math.random() method. It has code for how to generate numbers between a min and a max.