I have the following code. I want to eliminate the rollout event so that the menu element which has been scaled remains scaled. On rollover, I want to check the state of the elements and reduce all but the currently selected element back to 100% (ignoring the current element if it was already scaled up).
for(i=0;i<=menu_arr.length;i++){
//set rollover event
_root[menu_arr[0]].onRollOver = function(){
scaleTo (this, 115, 1);
createSubMenu(this._name+"_arr");
section = this._name;
switch(section){
case "start":f.fadeAlphaTo(85);break;
case "models":f.fadeAlphaTo(85);break;
case "care":f.fadeAlphaTo(85);break;
case "company":f.fadeAlphaTo(85);break;
default: f.fadeAlphaTo(0);
}
}
//set rollout event
_root[menu_arr[0]].onRollOut = function(){
scaleTo (this, 100, 3);
}
//set release event
_root[menu_arr[0]].onRelease = function(){
if(section == "home"){
getURL(menu_arr[0][1]);
}else if(section == "contact"){
getURL(menu_arr[6][1]);
}else if(section == "realtors"){
getURL(menu_arr[3][1]);
}
}
}
Thanks,
Toga
for(i=0;i<=menu_arr.length;i++){
//set rollover event
_root[menu_arr[0]].onRollOver = function(){
scaleTo (this, 115, 1);
createSubMenu(this._name+"_arr");
section = this._name;
switch(section){
case "start":f.fadeAlphaTo(85);break;
case "models":f.fadeAlphaTo(85);break;
case "care":f.fadeAlphaTo(85);break;
case "company":f.fadeAlphaTo(85);break;
default: f.fadeAlphaTo(0);
}
}
//set rollout event
_root[menu_arr[0]].onRollOut = function(){
scaleTo (this, 100, 3);
}
//set release event
_root[menu_arr[0]].onRelease = function(){
if(section == "home"){
getURL(menu_arr[0][1]);
}else if(section == "contact"){
getURL(menu_arr[6][1]);
}else if(section == "realtors"){
getURL(menu_arr[3][1]);
}
}
}
Thanks,
Toga