看板 Flash 關於我們 聯絡資訊
以下是我的code 我想要在我隨機產生的東西上 可以用滑鼠點它然後前往下一個場景播放 我要怎麼寫呢? 有哪位神人可以幫我這個大忙? onClipEvent (load) { //data you may want to change width = 1280; height = 800; speed = Math.round(Math.random()*3)+1; //initial positions x = this._x=Math.random()*width; y = this._y=Math.random()*height; x_new = Math.random()*width; y_new = Math.random()*height;} onClipEvent (enterFrame) { //x movement if (x_new>this._x) {sign_x = 1;} else {sign_x = -1;} dx = Math.abs(x_new-this._x); if ((dx>speed) || (dx<-speed)) {this._x += sign_x*speed;} else {x_new = Math.random()*width;} //y movement if (y_new>this._y) {sign_y = 1;} else {sign_y = -1;} dy = Math.abs(y_new-this._y); if ((dy>speed) || (dy<-speed)) {this._y += sign_y*speed;} else {y_new = Math.random()*height;} } -- ※ 編輯: AlexanderMax 來自: 61.217.195.47 (01/11 01:40)
aquarianboy:也許你需要先學一下什麼是縮排喔 :) 01/11 01:40
emily114005:推 樓上 01/11 13:58
wind50321:可以試著使用 Flash Sript視窗上方的自動格式化按鈕 01/11 20:03