看板
[ Flash ]
討論串[問題] 影片片段物件在圓形範圍內隨機出現
共 5 篇文章
內容預覽:
最後採用cjcat2266教的方法,完成檔案fla:http://0rz.com/R3ad. 可是有bug...@@~. 我猜是continue_btn那邊移除蘋果不完全…. for ( var k=1; k<=1000; k++ ){. this["red_apple"+k].removeMovi
(還有214個字)
內容預覽:
原點:Q(x,y) -> Point. 半徑:r -> Number. 隨機出現的座標:P(x,y) -> Point. var P:Point = new Point();. P.x = r * ( 2 * Math.random() - 1 );. P.y = Math.sqrt( r * r
(還有6個字)
內容預覽:
半徑R、圓心於(A, B)的圓形參數式:. x = R * cos(t) + A. y = R * sin(t) + B. 所以需要亂數的是半徑R和角度t. R = 200 * Math.random(); //半徑0~200. t = (Math.PI * 2) * Math.random();
(還有348個字)
內容預覽:
試試看這樣:. radius = 200; //半徑. for(i=0; i<100; i++). {. theta = Math.random() * 360 * Math.PI / 180; //隨機的角度. XX = (200 + Math.cos(theta) * Math.random()
(還有232個字)
內容預覽:
AS2問題。. 載入數個物件,要設定其座標在一"圓形"的範圍內的隨機位置。. 該怎麼做呢?. 我只知道如何在一個矩形的範圍內出現,ex:. for ( i=1; i<=30; i++ ){. minX = tree_mc._x ;. maxX = tree_mc._x + tree_mc.area_
(還有286個字)