JapanMan
November 7th, 2008, 03:22 PM
I'm making a game, and in between short levels, you go to a "reset" frame to prepare for the next level. I have a dynamic text box named "level" that increases by 1 every time you finish a stage. When you click the button on the "reset" frame, you go to the appropriate level's frame; the levels are labeled with just the number. So far, I have been managing this as follows:
//in the button's actions
on (release) {
if (level == 1) {
gotoAndStop("1");
}
if (level == 2) {
gotoAndStop("2")
}
}etc. etc.
I want to know if I could manage this with just one statement like
on (release) {
gotoAndStop(level);
}where "level" is the value of the dynamic text box.
Much thanks!
//in the button's actions
on (release) {
if (level == 1) {
gotoAndStop("1");
}
if (level == 2) {
gotoAndStop("2")
}
}etc. etc.
I want to know if I could manage this with just one statement like
on (release) {
gotoAndStop(level);
}where "level" is the value of the dynamic text box.
Much thanks!