[LEFT]Hi everyone,
I’m making a website that requires the main page to fade to black and then load an .swf using .loadmovie. The swf begins with black and fades out to reveal a set of buttons. This should create a seamless fade-to-black and un-fade to the loaded swf.
The problem is that there are multiple buttons presenting multiple choices on the main page, and I want each one, when clicked, to create a variable with a certian value corresponding to the button pressed. I want to use that variable in a switch statement to load the right .swf that corresponds to the button pressed on the main page.
I’m not sure if this is a syntax problem, flash seems to think my code is okay.
I put this on the first frame…
_global.yearVar = 0;
stop();
I put this on the button release…
on (release)
{
yearVar = 2006
play();
}
After the timeline continues and fades to black I put this on the last frame…
stop();
switch (yearVar)
{
case yearVar == 2006 :
location.loadMovie("2006.swf");
break;
}
The swf won’t load. I’m new to actionscript, does anyone have any ideas?
TIA
btw I’m using flash mx 8
[/LEFT]