|
-
Senior Member
Hey, what is the easiest way to create a random number between -200 and - 100 or 500 and 600?
I will be using it to randomly attach MovieClips either just to the left of the stage or just to the right.
Thanks,
-
half as fun, double the price
your name has so long decieved us so...
random(101)+500; // 500 to 600 inclusive
random(99)+501; // 500 to 600 exclusive (ie: 501-599)
random(101)-200; // -200 to -100 inclusive
random(99)-199; // ... exclusive
(non-depricated
Math.floor(Math.random()*101)+500;
Math.floor(Math.random()*99)+501;
Math.floor(Math.random()*101)-200;
Math.floor(Math.random()*99)-199;
.............................................
I dont want to post any more because then I wont be
<----------
1337!!!
The only 1337 (h4x0r) overweight in Flashkit. I rule.

[Edited by senocular on 09-01-2002 at 05:45 PM]
-
incredibulus-actionscriptum
prrrrrrrr senocular...
i am fatter than you
-
Senior Member
Cheers senocular, i couldn't quite get my head around that one
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|