This content has been marked as final. Show 4 replies
ActionScript and the Flash Player do not support image maps in the way HTML does. You can have an image and listen for click events. The MouseEvent dispatched contains the coordinates of the click. Use those to determine what you want to do.
If you want to change the cursor over a hot area, watch the mouse's movements and switch the cursor when it enters a region.
Alternately you can supply additional transparent images of irregular shape and listen for events on those. You could also look up the hitTest function and see if that would be useful.
ActionScript provides any number of solutions to this problem. You may think that this is way harder than HTML. But consider that to give you that ease of use, the browser has to have a lot of code in it to do this very thing. Here, you can code it as effeciently as you like.
Once again, thank you for your reply.
I like the transparent image option. I have the coordinates of the hot areas, and that will allow me to create these images on the fly and possibly, super impose these over the original. that way, the click event pertains to a specific (transparent) image and I can do what I need to from there.
Where can I find more information/samples on this kind of thing?
As a side note, I think ActionScript should have this kind of thing "out-of-the-box". Those who want more "efficiency" still have the option to "do-it-yourself". My 2 cents worth.
Check out the Bitmap classes. Perhaps you could come up with a handy component and publish or sell it. Flex does create opportunities, too.
> Flex does create opportunities, too
:-) I'm sure it does. And I might just make such a component.
Being totally brand new to ActionScript (of any version) I was asking before I assumed or expected, but I did hope :-).