Re: [問題] 隨滑鼠移動的跑馬燈?

看板Flash作者 (科技絕緣體)時間17年前 (2008/03/25 17:18), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
※ 引述《chigayaptt (牧楓蝶)》之銘言: 大大~~可以教一下這整段程式的設計邏輯嗎@@? 我看了下面推文連結的影片說明還是沒辦法理解大大的這段程式 不能老是拿現成的複製貼上來用阿~"~ : 原始碼 : 把按鈕影片命名成strip,就是存成同一個按鈕長條那個 : 然後拉到場景上 ,點選f9之後把這段貼上就好了 : onClipEvent (load) { : percent_increment = .08; : addstrip2 = false; : } : onClipEvent (enterFrame) { : this._x += (_root._xmouse-320)*percent_increment; : if (this._x<=0 && this._x>=-this._width) { : if (addstrip2 == false) { : this.duplicateMovieClip("strip2", 1); : addstrip = true; : } : _root.strip2._x = this._x+this._width-1; : _root.strip2._y = this._y; : } : if (this._x<=-this._width) { : this._x = _root.strip2._x+this._width-1; : } : if (this._x>0 && this._x<this._width) { : if (addstrip2 == false) { : this.duplicateMovieClip("strip2", 1); : addstrip = true; : } : _root.strip2._x = this._x-this._width+1; : _root.strip2._y = this._y; : } : if (this._x>=this._width) { : this._x = _root.strip2._x-this._width+1; : } : } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.60.29.254
文章代碼(AID): #17wCDDmR (Flash)
文章代碼(AID): #17wCDDmR (Flash)