Flash AS3.0 鼠标滚轮事件

来源:互联网 发布:java数据连接池原理 编辑:程序博客网 时间:2024/04/30 15:35
import com.greensock.*;import com.greensock.easing.*;
 
mc.addEventListener(MouseEvent.MOUSE_WHEEL,onMouseWheels);function onMouseWheels(e:MouseEvent):void{e.delta>0?  dwY() : upY();}function upY():void{TweenLite.to(this.mc, 0.6, { y:0 } );//使用缓动类使对象缓动到指定位置;}function dwY():void{TweenLite.to(this.mc, 0.6, { y:363 } );}