Dynamic Random number glitch
For my project, http://www.swfcabin.com/swf-files/1302575829.swf, Sometimes a number doesn't appear when I "scratch" the top part off. This is the code that was being used (yes it's a little nooby, but I'm new at this)
{
ZooM = random (20) +1;
gotoandplay(2);
}
How can I make it so a number appears EVERY time开发者_运维百科? Thanks! -Zach
PS: ActionScript2
Use the floor method and multiplication:
Math.floor(Math.random() * 20) + 1;
精彩评论