hitTest in As3.0
Hi All,
I have a square object in the middle of circle.
and i can move square object using up, down, left, riht arrow keys. I need script for when square object touches circle, then it goes to back, I have use for this below code :
var myobjdim:Array=new Array;
myobjdim.rit=obj.x+(obj.width/2);
myobjdim.let=obj.x-(obj.width/2);
myobjdim.tp=obj.y-(obj.height/2);
myobjdim.bot=obj.y+(obj.height/2);
if(bg1.hitTestPoint(myobjdim.tp,obj.y, true))
{
trace("it's detection");
}
In above code "myobjdim" is square object and "bg1" is circle object..
Please any body know script for this in AS3 plese tell me.
Thanks,
K Swamy Vishnubhatla,
webdeginer.blogspot.com.