PDA

View Full Version : loop help



tucker
March 23rd, 2004, 09:20 PM
x = 0;
if(x < 5){
x++;
gotoAndPlay(38);
}
else{
gotoAndPlay(49);
}

any hints?

[Legoman]
March 23rd, 2004, 09:24 PM
you'll have to elaborate a bit.
so far that code is doing not much. What are you trying to do?

tucker
March 23rd, 2004, 09:47 PM
the actiosn r on frame 43 or sumtin, so i want it to go back to fram 38 5 times.

claudio
March 23rd, 2004, 09:49 PM
Looks fine for me.

[Legoman]
March 23rd, 2004, 09:53 PM
nope, the problem is that each time you get to this frame, it sets x back to zero before the if statement, you need to have x=0 before the start of the loop, eg. before frame 38.

claudio
March 23rd, 2004, 09:56 PM
Yes, i totally missed that :P

tucker
March 24th, 2004, 07:18 AM
o, that makes sense

thanks!