开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜