With Flash MX hitTest evaluates the entire shape The code I did below works fine except for one thing... How do I modify it so that it is set to evaluate the entire shape and not just the bounding box.
Please help me understand this part in the context help files it says:
This parameter can only be specified if the hit area is identified using x and y coordinate parameters.
Ok! So how do I modifiy this code to do such a thing?
// ----------------------------------
_root.onEnterFrame = function(){
// constant advancing
t = getTimer();
if (time<t) {
time = t+30;
xp = getProperty(_root.clip2, _x);
xp=xp-1;
setProperty(_root.clip2, _x,xp);
}
// conditional instant nudge
hitm = (_root.clip1.hitTest(_root.clip2));
// loop until elevated clear of obstacle
while (hitm==true) {
yp = getProperty(_root.clip2, _y);
yp=yp-1;
setProperty(_root.clip2, _y,yp);
hitm = (_root.clip1.hitTest(_root.clip2));
}
// end onEnterFrame
}
//-------------------------------------
Thanks for your help |