I have bitmap generated each frame and when clicked needs to simulate a click at a specific pixel in a separate movie clip.
If you really click on a movie clip, the event trickles down the hierarchy of children to dispatch click events for all children as well. If you have a button in a button in a button in a button… and you click the top button, the click event is dispatched for all buttons in the hierarchy, but my problem is that if I “virtual” click like…
var myClick=new MouseEvent(MouseEvent.CLICK,false,true);
myClick.localX=X; myClick.localY=Y;
someMovieClip.dispatchEvent(myClick);
it only registers as a click for “someMovieClip” and not any buttons that are at that same click point within “someMovieClip”.
My idea for a solution is to loop through the whole hierarchy of children doing a hitTestPoint() and for each hit converting to local coordinates and and doing another dispatchEvent().
I just want to check if anyone has a more elegant solution or knows if I am just missing some setting or something that would make it act like a “real” click. It just seems like something that would be built in to flash, but maybe not.