Hi guys
I have few objects of type rectangle(re-sizable and draggable). I like
to have them change border if 85% percent of one rectangle comes on
top of another.I would be able to change the border of the recatngle
by using hitTestPoint method. As soon as one rectangle crosses the
center of another, there will be change in the border but I need to
implement same thing but rectangle has to change the border if 85% of
area of one crosses the another one. Please help me as I am not sure
how to track the percentage of area overlapped. Any sample code or
examples will be highly appreciated.
Thanks a lot
Anuj

Here's the code for hitTestpoint
var ReplacedVideo:GlowFilter=new GlowFilter(); 
ReplacedVideo.color=0xFF0000;
var HitPoint:DisplayObject=NonSelectedVideo as DisplayObject;

if(HitPoint!=null)
{                                       
if(Svideo.hitTestPoint((HitPoint.x+HitPoint.width/2),(HitPoint.y+HitPoint.height/2)))
  {
                                                        
HitPoint.filters=[ReplacedVideo];
                                                        HitPoint.alpha=.4;
}
else
{
                                                        HitPoint.filters=[];
                                                        HitPoint.alpha=1;       
                                        
}
}

Reply via email to