Maybe read the pixel under the mouse and see if it has alpha=0.
Hmmm i was thinking there is an easier way...
Anyone? Seems liek a common task in games and others...no? Also can i make the whole object transperent to mouseevents? Like if i wand snow to fall on my screen but snowflakes not to interfere with UI?
I think most flash games use vector art for targets with significant
non-hittable areas. In those situations, any place you didn't draw a pixel
(even a transparent one) will not capture mouse clicks. If you must use
bitmaps, you might see if the pushbuttonengine has any targeting functions
you can use.
If you don't want any part of a drawing to be hittable, use the mouseEnabled
and mouseChildren flag or use Shapes. If I was doing snow, I might use
Shapes or one big Shape.
I was trying to create component in which there will be three childs
1st child would be Image
2nd child would be Control(Image,TextInput,Button)
3rd Child would be my Image Again but in this image(i.e source as png) there would be a Transparent part through whch i can see my Control(2nd Child)
I want to get Event on my Control
Suppose if it Button Then May be Click or If that control is TextInput So i needed Focus on it
For making events to happen i made changes to 2 property Image(i.e 3rd child)
Making this changes i achieved what i wanted
If any one has better solution then Let me know