Simple and effective... use a counter. here's how:
let's say you have 5 buttons, each will load a new content page on the stage. (about, home, etc..)
somewhere off stage make a dynamic text box with a var: loadCount Then define the variable in the scripts/actions layer in your movie:
now on each button you would put something like:
Code:
on(press){
_root.loadCount = 0;
}
this will set the counter to zero when the button is pressed.
then add:
Code:
on(release){
_root.loadCount = 1;
}
This will set the variable to 1. (note change the on(release) number for each button, so you have 1, 2, 3, 4, 5... but leave the on(press) set to 0 for all 5)
so in effect you haven't changed anything in your movie just yet, but if you test your movie you should see the text box show a 0 when it loads, then as you press and release each button it will change to the number and back to zero.. once at this point go back to your movie. make a blank screen for your stage (this will show when no button is selected, and will be the transition between buttons.)
Now you said you can make the fade yourself, so I will leave that to you, but all you need then is a couple if/else statements:
Code:
onClipEvent(enterFrame){
if (_root.loadCount==1){
gotoAndPlay (fade sequence for button 1);
}
else if (_root.loadCount==2){
gotoAndPlay (fade sequence for button 2);
}
else if (_root.loadCount==3){
gotoAndPlay (fade sequence for button 3);
}
else if (_root.loadCount==4){
gotoAndPlay (fade sequence for button 4);
}
else if (_root.loadCount==5){
gotoAndPlay (fade sequence for button 5);
}
else if (_root.loadCount==0){
gotoAndPlay (the blank image you made earlier);
}
}
Now you will have to tweak the if/else to suit your movie as this one won't do crap for you, but the concept is what you need.
Good Luck with that
Bookmarks