Jump to content


MovieClip buttons (active link problem)


  • You cannot reply to this topic
1 reply to this topic

#1 Pedro Silva

    Young Padawan

  • Members
  • Pip
  • 4 posts
  • Gender:Male
  • Location:Portugal

Posted 11 July 2007 - 10:27 AM

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

#2 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

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.
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