I figured Point in Polygon would be a SNAP in flash. Just draw the polygond with beginfill, moveto, lineto, endfill and then perform a shapeflag = true hittest!

Drawing the shape and checking hittesting with mouse coordinate and onenterframe worked great. So I wasted a bunch of time making a polygon drawing function which I was going to use to draw a polygon, perform hittests against it, and then erase the polygon and associated movieclip.

Unfortunately
I don't know if it waits till the next frame or what, but you can't do a shapeflag = true hittest on movieclip in code that executes in the same frame. For instance:
PHP Code:
var square_mc:MovieClip this.createEmptyMovieClip("square_mc"1);
square_mc.beginFill(0xFF0000);
square_mc.moveTo(1010);
square_mc.lineTo(10010);
square_mc.lineTo(100100);
square_mc.lineTo(10100);
square_mc.lineTo(1010);
square_mc.endFill();
trace(square_mc.hitTest(50,50,true));  // returns false
trace(square_mc.hitTest(50,50,false));  // returns true 
I am trying to make a bunch of objects (to be rendered as bitmaps) in a bricklike grid pattern within polygonal shapes. Works fine for rectangles, and I was going to use the same rectangle row/column code but with an added "is point in polygon" check for each object, creating it if it is inside the polygon.

Unfortunately the above issue prevents this from working right. I guess I could keep the movieclips with the polygons till the next frame, then check all the objects to see if they are THEN inside their appropriate polygons and THEN delete those extra movieclips, but that just seems like a very lame hack of a solution.

Anyone now a decen point in poly function for flash as2? Right now I have the vertices as arrays of point objects, but I could be flexible.