开发者

Dynamic Random number glitch

开发者 https://www.devze.com 2023-02-24 03:56 出处:网络
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

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;
0

精彩评论

暂无评论...
验证码 换一张
取 消