批踢踢實業坊
›
看板
Flash
關於我們
聯絡資訊
返回看板
作者
veas ( )
看板
Flash
標題
[問題] 跑到指定的影格的問題
時間
Fri May 11 14:14:07 2007
有1~10個影格 如果想用亂數去決定要跑的1~10個其中一個影格並停止 要怎麼做呢??? 謝謝 --
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.17.135.250
推
aquarianboy
:gotoAndStop(Math.floor(Math.random()*10)+1);
05/11 14:22
推
veas
:感激不盡!!! 謝謝你
05/11 14:49
推
gilles
:Math.floor()取括號裡的整數 Math.random()取0<~<1之間任一
05/11 19:06
→
gilles
:數EX:0.00000001 or0.999999999
05/11 19:08