Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check current state of array element

Status
Not open for further replies.

togatown

Technical User
Jun 23, 2003
65
0
0
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top