[問題] 製作可以使用滑鼠滾輪的捲軸

看板Flash作者 (蘇菲亞球)時間16年前 (2008/03/06 02:19), 編輯推噓2(201)
留言3則, 3人參與, 最新討論串1/1
不好意思我是Flash新手, 有個問題想請教大家 我做了一個有緩衝效果的捲軸影片片段 AS是套用某網站的教學範例 原始檔點這裡http://sophiaball.myweb.hinet.net/other/Cloth.fla (this.ClothBar是捲軸 this.ClothBarBg是捲軸背景 this.ClothText是被捲動的內容) ============================================================================= 第一格到第三格寫 this.ClothBar.onPress = function() { scroll_lock = "no"; }; this.ClothBar.onRelease = function() { scroll_lock = "yes"; }; this.ClothBarBg.onPress = function() { scroll_lock = "no"; }; this.ClothBarBg.onMouseUp = function() { scroll_lock = "yes"; }; 第二格寫 if (scroll_lock == "no") { this.ClothBar._y += (_ymouse-this.ClothBar._y-25)/1; } this.ClothText._y += (-(this.ClothText._height-360)*(this.ClothBar._y/310)- this.ClothText._y)/5; 第三格寫 gotoAndPlay(2); ============================================================================ 請問如果要加上滑鼠滾輪的功能 該怎麼寫呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.112.161.210 ※ 編輯: sophiaball 來自: 59.112.161.210 (03/06 02:21)

03/06 02:37, , 1F
Mouse.addListener()?
03/06 02:37, 1F
※ 編輯: sophiaball 來自: 59.112.161.210 (03/06 02:42)

03/06 03:31, , 2F
參考一下 Mouse 類別的 onMouseWheel (沒記錯的話)
03/06 03:31, 2F

03/15 23:44, , 3F
喔耶成功了~非常感謝樓上兩位ˇˇ
03/15 23:44, 3F
文章代碼(AID): #17pkGwsH (Flash)