Hi, i need advice for implementing a touch hittest for polygon areas.
I have a map/image with certain touchable areas (for example imagine a world map, where you can touch on a country to receive further information or go into a more detailed map).
The touchable areas are statically given (the format is not yet defined, but preferably would be json). In my use case i have around 6 poly-shapes with each around 4-6 points.
So basically i need something like HTMLs image-map and the poly-shape: <map><area shape="poly" ... ></map>
But how would i do such thing in actionscript? There are some polygon classes / helper functions out there. Guess i need some kind of "Point in Polygon" algorithm. Are there any recommendations?
The performance of the algorithm should be good, for desktop i need to show the handcursor on hover.