Event Delta Access of undefined property
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Event Delta Access of undefined property

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Posts
    250

    Event Delta Access of undefined property

    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

  2. #2
    Junior Member
    Join Date
    Jul 2008
    Location
    BC, Canada
    Posts
    29
    PHP Code:
    import flash.events.MouseEvent;

    stage.addEventListener(MouseEvent.MOUSE_WHEELmouseWheelFunction);

    function 
    mouseWheelFunction(e:MouseEvent):void {
        
    trace(e.delta); //for me, this returns either 3, or -3 depending on scroll direction

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com