PDA

View Full Version : hitTest problem



LeGrand
March 11th, 2003, 11:48 AM
Hey there, I've got a movie clip that has a line of mc's each one expands elastically when the mouse comes near it . Now what I"m trying to do is apply a hitTest to it, so it rolls out and back in when I roll over a button. When I put everything in a mc and on the stage and apply the following script the tween gets stuck on the way back in. Anybody know what might be going on wrong here?

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}

here's the fla

Marz
March 11th, 2003, 11:57 AM
Don't use hitTest for that..

this.onRollOver = function()
{code here}
this.onRollOut = function()
{code here}

;) Also you might wanna use gotoAndPlay instead of prev os next frames. Might work out better for what you are trying to grasp.

LeGrand
March 11th, 2003, 12:43 PM
I'm not sure I understand. I put this code on my mc .Or is this a seperate button that I'm appling it to. And which code am I putting under that code . Sorry for the trouble I'm not that good with scripting yet.