2011-11-14 142 views
1

我是新手程序員。Flash滾動瀏覽影片剪輯

我想簡單地使用我的鼠標滾輪瀏覽Flash動畫片段。這是我迄今爲止所做的工作(http://www.stopitstudy.com/test.html)。每個圖像都是影片剪輯中的單獨框架。

我曾在Flash AS2中工作,但突然間網頁開始滾動以及滾動鼠標滾輪。

我看到這裏有一個解決方案:http://labs.byhook.com/2010/04/09/flash-mouse-wheel-support/

有沒有人,可以使一個基本的.fla關於如何使用它的說明???

謝謝!

回答

0

在您的FLA時間線文件中創建一個新圖層。選擇此圖層的第一幀。打開「操作」窗口。添加此AS3代碼:

import flash.events.MouseEvent; 

stop(); 

stage.addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheelHnd); 

function mouseWheelHnd(e:MouseEvent):void 
{ 
    if (e.delta > 0) { 
     gotoAndStop(currentFrame + 1); 
    } else if (e.delta < 0) { 
     gotoAndStop(currentFrame - 1); 
    } 
}