This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > September 2007 > Flash Menu Problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Flash Menu Problem
Storm Animations

2007-09-10, 10:14 pm

Help Please. I need the text on the main bar to turn orange when moused over,
stay orange while the sub menu is up and then back to white when another on the
main bar is selected.
http://www.stormanimations.com/flashhelp/top_nav.html

Thanks in advance.

Xibit Studio

2007-09-11, 6:14 am

well it would help ...if you would go into detail how it is constructed ...what
are we mind readers ? ;o)
there are many ways of creating menu's with submenu's

construct the menu so that each button onRollOut gotoAndStop's frame 1
....let's say !

peace John






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");
}

Storm Animations

2007-09-11, 10:15 pm

Nevermind. Got it working. :)
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews