hitTest troulbes
hey guys and gals, I"m having troubles with my hitTest's
What I'm trying to do is to check if my tabbed menu has hit either edge of my movie. I have placed two mc's at either side of the movie and placed the code onto the tabbed menu (which is an MC as well):
onClipEvent (load) {
_x = 0;
speed = 20;
}
onClipEvent (enterFrame) {
endX = _root._xmouse;
_x += (endX-_x)/speed;
if (this.hitTest(block)) {
trace("hit");
}
else if (this.hitTest(block2)) {
trace("hit");
}
}
my targeting maybe out, I'm not too sure. The the desired effect I want is to have the tabbed menu slide across with the mouse movement (which it is) but to stop once the MC reaches the edge of the stage...help ?
cheers
|