A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AS3 Movieclip not responding to Mouse_Wheel event

  1. #1
    Registered User
    Join Date
    Oct 2010

    resolved AS3 Movieclip not responding to Mouse_Wheel event

    I'm creating a container as a MovieClip and adding a mousewheel handler, then adding items to it like so:

    container = new MovieClip();        
    addChild( container );
    container.addEventListener( MouseEvent.MOUSE_WHEEL, HandleWheel );
    container.addChild( item );
    // etc. adding more items
    However the mousewheel is only responding when the mouse is over one of the items, not over the visible areas of the container between the items. Is there any way to make it so the event is always triggered when the mouse is over the container, not just over its children?

    I don't know if it's relevant, but the container has a mask set. I tried adding the listener to the mask and it didn't do anything, though.

    If I set the opaqueBackground of the container to red, I can see the container bounds. I don't understand why the mouse wheel event isn't triggering when the mouse is within these bounds. If this is really not possible, is there another way to handle the situation without needing the container to respond directly to mouse events?

  2. #2
    Senior Member
    Join Date
    Jan 2009
    Draw a transparent shape and put it in container at the back.

Tags for this Thread

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