I have figured out how to use “HitTest”.
but I have a game I’m making, and I made an invisable moveclip, and when my player goes on it or “hitTest” it. Then it will move to the next frame and play…
could someone help me wih this problem…
here is my code:
If _root.player, HitTest (_root.object2) then
telltarget “?my movie”
gotostop “56”
but I want to know how do you tell the movie to move to a specific frame?
that only thing I know is how to tell a moveclip to move a specific frame inside of it.
it depends on where your code is. You can do it FROM where that code is called, or, if you want you can use absolute referencing and use a target for the movieclip as it exists from the main timeline.
The main timeline in Flash is called _root. So if you have any movieclip on the main timeline, you can reference it using _root.movieClipInstanceName - just like you used for player and object2.
So if you know how to target your movieclip from _root you can use that to tell it to gotoAndStop frame 56. ex:
if (_root.player.hitTest (_root.object2)){
_root.myMovie.gotoAndStop(56);
}
if myMovie was inside another clip, you can just reference it through that clip i.e.
if (_root.player.hitTest (_root.object2)){
_root.anotherClip.myMovie.gotoAndStop(56);
}