PDA

View Full Version : No result with this code


slimjimmy
07-10-2010, 12:43 AM
I'm trying to have it jump to the next frame with this code, but instead nothing.

Code for player:

37 if (this.hitTest(_root.endoflevel))
38 {
39 gotoAndPlay(4);
40 }

If someone can help, please reply.

Thanks.

Note: This is AS2.

Hudacik
07-11-2010, 03:14 PM
If nothing's happening in an if statement, the condition has not been met. I suggest you check if you spelled endoflevel correctly. Try adding


else
{
trace("Something's wrong");
}

slimjimmy
07-12-2010, 07:17 PM
That code works but the gotoAndPlay won't.

Hudacik
07-12-2010, 07:39 PM
Then I guess another explanation could be that the clip doesn't have 4 frames.

92Garfield
07-13-2010, 11:10 PM
Or it's looping throught till it'S at the beginning again.

Try placeing an trace below the gotoAndPlay

and in case you want a frame to stay, put stop(); in it's timeline code.

slimjimmy
07-14-2010, 10:10 PM
I was just trying to go to frame 4 on the timeline for the scene. Sorry, I got this from a video and it's not really working out.

neilmmm
07-14-2010, 10:35 PM
gotoAndStop(4);

slimjimmy
07-15-2010, 08:33 PM
I was just trying to go to frame 4 on the timeline for the scene. Sorry, I got this from a video and it's not really working out.

I'm not trying to go to the 4th frame on the movie clip.