Hi guys, I have one menu embebed in a mc, with transparent button and with animation tint on rollover and rollout, but I wan't to force the letter staying black on release the transparent button, well but my real problem is who to change again color when the user click another link.
Thanks
MovieClip buttons (active link problem)
Started by Pedro Silva, Jul 11 2007 10:27 AM
1 reply to this topic
#1
Posted 11 July 2007 - 10:27 AM
#2
Posted 11 July 2007 - 09:35 PM
Create an array and add each button to the array when the buttons load. Give each button a selected property. Then add the follwong code on each button event you have (onRollOver, onRollOut, etc) before any other code. This code will prevent anything else from being executed if the button is selected.
This code doesn't use shorthand so it'll be easier for you to understand. When you click a button, you want to loop through the array youve stored all your buttons in, and set their selected variable to false. After that, set the selected variable to true on the clicked button.
That should do it.
if(mySelectedVariable == true){
return; // halts execution of the code
}
This code doesn't use shorthand so it'll be easier for you to understand. When you click a button, you want to loop through the array youve stored all your buttons in, and set their selected variable to false. After that, set the selected variable to true on the clicked button.
That should do it.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
