English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

基本上是拿網路的下來改
但是改完後發覺漂亮是漂亮.但是轉得太快頭會暈
例如"http://www.dreamglobe.com.tw/new/index.html"


裡面的程式碼主要的如下應該是關於角度或方式做調整.但是就是沒看到轉速.請大大幫忙降低他的轉速 或使滑鼠感應區變小(目前感應區好像是設定FLASH可及之處).
不希望每個上到網站的人都抓兔子的菜鳥留(大家都說看了好慌)

btnno = 5;
ang = 0;
divang = 360/btnno;
for (i=0; i radian = ang*Math.PI/180;
this["btnmc"+i].ang = ang;
this["btnmc"+i]._x = Math.cos(radian)*100;
this["btnmc"+i]._y = Math.sin(radian)*30;
ang = ang+divang;
}
function rotateball(mcname) {
this[mcname]._x = 150*Math.cos(this[mcname].ang*Math.PI/180);
this[mcname]._y = 30*Math.sin(this[mcname].ang*Math.PI/180);
this[mcname].ang += mousedir;
if (this[mcname].ang<0) {
this[mcname].ang = this[mcname].ang+360;
}
if (this[mcname].ang>360) {
this[mcname].ang = this[mcname].ang-360;
}
var mcno = mcname.substring(5);
if (this[mcname].ang>180 and this["depthmc"+mcno].haveswap>0) {
this[mcname].swapDepths(this["depthmc"+mcno]);
this["depthmc"+mcno].haveswap *= -1;
}
if (this[mcname].ang<180 and this[mcname].ang>0 and this["depthmc"+mcno].haveswap<0) {
this[mcname].swapDepths(this["depthmc"+mcno]);
this["depthmc"+mcno].haveswap *= -1;
}
var radian = this[mcname].ang*Math.PI/180;
this[mcname]._xscale = Math.sin(radian)*30+70;
this[mcname]._yscale = Math.sin(radian)*30+70;
this[mcname]._alpha = Math.sin(radian)*30+70;
}

2007-10-29 12:52:50 · 1 個解答 · 發問者 RED 1 in 電腦與網際網路 程式設計

這是爬文找到的....但是有看沒有懂
rotateball

http://tw.knowledge.yahoo.com/question/?qid=1007071100669

2007-10-29 14:11:43 · update #1

1 個解答

改 function rotateball(mcname) 下數第三行:

this[mcname].ang += mousedir / 12;

嫌轉太慢可以把 12 改大,反之改小。

2007-10-30 20:24:52 · answer #1 · answered by mh 7 · 0 0

fedest.com, questions and answers