I’ve got a movie that lets the user create several polygons by clicking points.
Is there a way to find out if the user rolls over the actual polygon??
I tried using:
myVars = threat_mc0.hitTest(this._xmouse, this._ymouse);
but that returns “true” if the user rolls over the bounding rectangle area of the polygon, and I only want to test if they’re within the actual fill of the polygon…
Thanks!!
Take a look at this, this is to test collision of odd shaped objects:)
http://www.kirupa.com/developer/actionscript/advanced_collision.htm
Cool tutorial, but I’m doing something a little different, so this doesn’t really help much.
First, the user is drawing the points of the poly (which makes drawing the little boundary rects problematic) and AS is doing a fill. Then, the user has to click on an area within the bounds of that poly, so testing to see if the rects hit won’t work.
Any ideas?? I attached my test .fla (just trying out different hit/rollover tests) in case it’s any help.
Thanks!!
I think I got it…I attached the new fla, but, basically, I just used the script
if(shape_mc.hitTest(this._xmouse, this._ymouse, true)){
myVars = true;
}else{
myVars = false;
}
and it works!
Thanks!!