actionscript 3 - How to click through a Rectangle (like mouseChildren = true) -


i have problem, use image pan class: http://www.lextalkington.com/blog/2009/08/auto-pan-class-for-panning-an-image-on-mouse-movement/

but problem objects/sprites/movieclips in have clickable, problem mousechildren adn mouseenabled properties can't applied rectangle object.

anyone has idea on how able click through can acces objects in panned item? (if makes sense...)

this class using rectangle scrollrect image. scrollrect specifies visible area of image. not thing want detect mouse clicks on.

instead, can listen mouse click on image itself.

from code linked to, image displayobject variable named _clip.

in constructor image panning class, can add mouse listener:

_clip.addeventlistener(mouseevent.click, onimageclick); 

then define event handler:

private function onimageclick(event:event):void {    // } 

by way, since _clip displayobject, doesn't have mousechildren or mouseenabled properties (those defined in subclasses of displayobject).


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -