PDA

View Full Version : hitTest troulbes


rustybones
03-18-2004, 10:35 PM
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

Timmee_3Styler
03-23-2004, 10:26 AM
although this is the wrong forum
trying adding

this._parent.block or
_root.block

;)