I am working on a website and when a certain button is pressed I want the code to check the value of two different variables, and depending on the values it is supposed to go to different places on the main timeline.
The problem is that I am uncertain of how the code is supposed to look. This is what it currently looks like: :-/
var currentPage:Number = 0;
var pageFade:Number = 0;
stop();
mcUF.onRelease = function(){
if(currentPage == 0){
currentPage = 33;
pageFade = 58;
gotoAndPlay(currentPage);
}else {
mcUngföretagsamhet._alpha = 0;
_root.gotoAndPlay(pageFade);
currentPage = 33;
pageFade = 58;
};
};
mcKontakt.onRelease = function(){
if(currentPage == 0){
currentPage = 73;
pageFade = 88;
gotoAndPlay(currentPage);
}else {
if(L3currentPage == 103){
pageFade = 162;
_root.gotoAndPlay(pageFade);
currentPage = 73;
}else {
if(L3currentPage == 132){
pageFade = 170;
_root.gotoAndPlay(pageFade);
currentPage = 73;
}else {
mcUngföretagsamhet._alpha = 0;
_root.gotoAndPlay(pageFade);
currentPage = 73;
pageFade = 88;
};
};
};
};
If the varibale “currentPage” is 0 it goes to the “intro” part of my animation. What I want is for Flash to check firstly the value of “currentPage” and if it turnes out to be anything else than 0, it should check the variable “L3currentPage”.
If it was working I would not post this thread. If someone could have a look and tell me if it is correct to nestle the IF-statements as I have. If it is I just have to find out where the problem lies if not there.
P.S. I cant post the .fla because it is way too big D.S.