I have made a simple loop in flash that checks if a variable is the integer 5. If it is, it has to look what the value of another variable is. According to that value it has to play a certain frame.
But I cant make it work... Why not? Can somebody help me?
This is my code:
This is placed on frame 2 and frame 1 has the actionscript play() to it.
Visit
But I cant make it work... Why not? Can somebody help me?
This is my code:
Code:
teller = random(100 + 1);
koe = random(8 + 1);
if (teller != 5) {
gotoAndPlay(1);
}
if (teller == 5) {
if (koe == 1) {
gotoAndPlay(3);
} else if (koe == 2) {
gotoAndPlay(41);
}else if (koe == 3) {
gotoAndPlay(81);
} else if (koe == 4) {
gotoAndPlay(121);
} else if (koe == 5) {
gotoAndPlay(161);
} else if (koe == 6) {
gotoAndPlay(201);
} else if (koe == 7) {
gotoAndPlay(241);
} else if (koe == 8) {
gotoAndPlay(281);
} else {
gotoAndPlay(1);
}
}
This is placed on frame 2 and frame 1 has the actionscript play() to it.
Visit