Hello all
Take a look at the following sites; and notice their menus. Both have a rollover and rollout on their buttons, and when the button is hit the button **stays **down until another button is pressed. In the scissor sisters site, the neon bar still fades out after another has been pressed.
Franz Ferdinand
Scissor Sisters
I am trying to achieve this myself with my own site, which you can view in progess here:
I have mastered the button rollOver and rollOut effect, in which i gathered the code from a kirupa tutorial. My problem is, getting the neon bar to stay underneath teh last button that has been pressed.
The main movie is located on the main timeline in frame 2, because frame 1 contains the pre loader.
The actions for frame 2 of the main timeline are:
stop();
movieLoader.loadMovie("news.swf");
total = movieLoader.getBytesTotal();
loads = movieLoader.getBytesLoaded();
percent1 = Math.round(loads/total*100);
movieLoadText.text = "Loading news "+percent1+"%";
if (loads != total) {
} else {
movieLoadText._visible = false;
}
Now the buttons are not buttons, they are movieclips, which are located on the stage, and have instance names of b1 for news, b2 for biography etc etc
Inside the movieclip, the animation of the neon bar fading in takes 25 frames, and this has a stop action on the end.
This code is placed on the first frame:
stop();
news.onEnterFrame = function(){
if(rewind == true)
{
prevFrame();
}
}
news.onRollOver = function(){
rewind = false;
gotoAndPlay(25);
}
news.onRollOut = function(){
rewind = true;
}
news.onRelease = function(){
_root.logo.gotoAndPlay("buzz");
_root.movieLoader.loadMovie("news.swf");
}
As you have probably noticed this is the same as the kirupa tutorial.
So now my problem is to make sure that the last button clicked leaves the underline bar **down **until the next button is pressed.
Whoever can solve this for me is a life saviour!
Thanks
Williby