-
Pls help! - How to make random numbers??
Hi,
I need to make a random number (from 2-4) that will change every time when i'm starting the swf file.
I don't know how to write it on AS 2.
Thanks for the help!!
-
.
Hi,
Try
PHP Code:
Random = Math.floor(Math.random() * 3) + 2; trace(Random);
perhaps on the first frame of your file.
It may show the same number several times repetitively.
-
Hi,
I need it to be on the screen as a text.
It is possible?
Thanks for the help!
Originally Posted by fruitbeard
Hi,
Try
PHP Code:
Random = Math.floor(Math.random() * 3) + 2;
trace(Random);
perhaps on the first frame of your file.
It may show the same number several times repetitively.
-
Senior Member
Originally Posted by benh1510
Hi,
I need it to be on the screen as a text.
It is possible?
Yes, it is possible
-
Can you please write it?
i don't know how to write in AS2
Thanks again.
Originally Posted by realMakc
-
Senior Member
Can you please click the link? Here it is again, in case it was not obvious it even was there: http://help.adobe.com/en_US/AS2LCR/F...=00000265.html
-
.
Hi,
here is a slightly longer way to do what you require, but it will give you some idea on how to do it how you want.
PHP Code:
rindleParpSicordTheText = Math.floor(Math.random() * 3) + 2;
if (rindleParpSicordTheText != 5)
{
myTextonTheScreenBig.text = rindleParpSicordTheText;
}
-
Senior Member
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
|