CanvasScript3
>
Tests
> MouseEvent - MouseWheel
Code
var stage = new Stage("canvas", 420, 500, 30); //prevent the browser to scroll. stage.preventMouseWheel = true; var sprite = new Sprite(); sprite.x = 100; sprite.y = 100; sprite.graphics.lineStyle(0); sprite.graphics.beginFill(0xFF0000); sprite.graphics.drawRect(0, 0, 200, 200); sprite.graphics.endFill(); sprite.addEventListener(MouseEvent.MOUSE_WHEEL, function(e) { trace('delta=' + e.delta); sprite.y -= e.delta; }); stage.addChild(sprite);
Canvas
Output