| Storm Animations 2007-09-11, 6:16 pm |
| Whoops...Meant to attach code. Hope this is enough. I need the text on the
main bar to turn orange and stay that way while submenu is active just like the
faded button area. So basically I want the orange to be just like the faded
button area. Stay when sub is active and go away when not. Thanks so much.
//actionscript layer
function fade(target, destination) {
rate = 10;
target.onEnterFrame=function() {
rate = rate*.95;
if (this._alpha == destination) {
delete this.onEnterFrame;
}
this._alpha += Math.round((destination-this._alpha)/rate);
}
}
function fadeInBar() {
fade(_root.menuWhitebox, 75);
}
function fadeOutBar() {
fade(_root.menuWhitebox, 0);
}
//code on about_nav
// slides the menu in
onClipEvent(load){
//rest all sub menus
setProperty(_root.submenu_about,_x,-400);
setProperty(_root.submenu_submit,_x,-400);
setProperty(_root.submenu_index,_x,-400);
setProperty(_root.submenu_media,_x,-400);
setProperty(_root.submenu_services,_x,-400);
temp_width = 0;
temp_x = 0;
if(_root.var_menu == "about"){
setProperty(_root.submenu_about,_x,399);
temp_width = 64;
temp_x = 68;
}
if(_root.var_menu == "submit"){
setProperty(_root.submenu_submit,_x,399);
temp_width = 160;
temp_x = 140;
}
if(_root.var_menu == "index"){
setProperty(_root.submenu_index,_x,399);
temp_width = 96;
temp_x = 303;
}
if(_root.var_menu == "faq"){
temp_width = 48;
temp_x = 406;
}
if(_root.var_menu == "media"){
setProperty(_root.submenu_media,_x,399);
temp_width = 107;
temp_x = 459;
}
if(_root.var_menu == "services"){
setProperty(_root.submenu_services,_x,399);
temp_width = 291;
temp_x = 569;
}
_root.button.MainNavBox._width= temp_width;
_root.button.x= temp_x;
_root.button.changex=_root.button.x;
_root.button.alpha=100;
_root.button.changealpha=_root.button.alpha;
}
on(rollOver)
{
// menu specific vars
_root.button.MainNavBox._width=64;
this.text.textColor = 0xFFC000;
//_root.fadeInBar();
_root.button.x = 68;
_root.button.changex=_root.button.x;
_root.button.alpha=100;
_root.button.changealpha=_root.button.alpha;
//if menu is not currently displayed, display it, else don't do anything
if(_root.submenu_about.menu <> "about"){
//rest all sub menus
setProperty(_root.submenu_about,_x,-400);
setProperty(_root.submenu_submit,_x,-400);
setProperty(_root.submenu_index,_x,-400);
setProperty(_root.submenu_media,_x,-400);
setProperty(_root.submenu_services,_x,-400);
_root.submenu_about.menu = "about";
setProperty(_root.submenu_about,_alpha,100);
_root.submenu_about.changex = 399;
}
}
on(rollOut)
{
_root.fadeOutBar();
//this.text.textColor = 0xFFFFFF; TRYING TO MAKE STAY ORANGE
//_root.button.alpha=0;
//_root.button.changealpha=_root.button.alpha;
}
on(release)
{
getURL("/about.php","_parent");
}
|