HitTest troubles

6 posts

Flag Post

Im having some troubles with hitTest right now. Im try to make it change frames upon hitTest. Ive tried a few different things.

onClipEvent (enterFrame) {
if (hitTest(_root.mover)==true)
{
play();
}
}

onClipEvent (enterFrame) {
if (hitTest(_root.mover)==true)
{
gotoAndStop(41);
}
}

Any help?

TL

 
Flag Post

Im pretty new to AS, but it seems you need to replace {play (); with gotoAndPlay{whatever key #}} or something along those lines

 
Flag Post

What are your actual “troubles?”

 
Flag Post

Lol my problems are nothing happens at all.

 
Flag Post

That darn onClipEvent!

Where’s the this. or the instance name for the thing to hit mover?

 
Flag Post

As a side note, if(something==true) is the same thing as if(something).

The contents of the bracket are evaluated and if they’re true, the if is run. if(11) runs because 11 is true. if(true) runs because true is true.