I have a simple MOUSE_WHEEL event:
event.delta //returns 1120: access of undefined property.
Can't seem to find any info in Flash Help or online about event.delta. Is this a deprecated event?
Thanks
iaustin
Printable View
I have a simple MOUSE_WHEEL event:
event.delta //returns 1120: access of undefined property.
Can't seem to find any info in Flash Help or online about event.delta. Is this a deprecated event?
Thanks
iaustin
Works for me. It looks like your problem is that the variable "event" isn't defined. The mouseWheelFunction() is going to receive a MouseEvent object from the event listener, and in this example I named it "e". In your code it looks like you're calling it as "event" so just make sure it matches what you called it in the function arguments.PHP Code:
import flash.events.MouseEvent;
stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelFunction);
function mouseWheelFunction(e:MouseEvent):void {
trace(e.delta); //for me, this returns either 3, or -3 depending on scroll direction
}