Hello every one I have been looking for 2 days on how to do this and cant find a thing to help. these are my layers
actions layer
button 1
button2
button 3
button4
animationclosing
animation 1
animation 2
animation 3
animation 4
ok basicaly i want to user to click on the button and on click i want to time line to finish playing the animationclosing then depending on the button the user click the time line should jump to were the animation 1-4 starts. here is the code i am try to get to work
The code I have on my four buttons are
Button 1
on (release) {
var i=1;
this.parent.gotoAndPlay(27);
}
Button 1
on (release) {
var i=2;
this.parent.gotoAndPlay(27);
}
Button 1
on (release) {
var i=3;
this.parent.gotoAndPlay(27);
}
Button 1
on (release) {
var i=4;
this.parent.gotoAndPlay(27);
}
then when the button is clicked it will play untill the time line gets to frame 45 and on frame 45 in the actions layer i have some code that goes as follows
if (i == 1){
gotoAndPlay(46);
}else if (i == 2){
gotoAndPlay(87);
}else if (i == 3){
gotoAndPlay(126);
}else if (i == 4){
gotoAndPlay(166);
}
how do I pass the variable i so that this if else works because no matter what, it takes the user to and plays frame 46 (animation 1)