|
From: russ500 on 7 May 2008 10:27 Hi there, Can anyone tell me how I go about making my movieclip buttons stay in over state while they at their destination? For example, if I'm on my about page in my website how can I get my about button to stay in it's over state, then go back to it's normal state when another button is clicked and I go to a different page? I hope I explained that ok, the only way I can think of doing it is really long winded and I wondered if there was a better way. Below is the code for one of my buttons. Thanks in anticipation. nav.home_btn.onRollOver = function () { nav.home_btn.gotoAndPlay("over"); } nav.home_btn.onRollOut = function () { nav.home_btn.gotoAndPlay("out"); } nav.home_btn.onRelease = function () { if (currentPage != "home_mc") { exitPage(currentPage); eval(currentPage).onEnterFrame = function() { goToNextPage(currentPage,"home"); } } }
From: clbeech on 7 May 2008 10:50 if you construct a MC button that has labels of '_up', '_over', and '_down' and then apply a single handler like onRelease or onPress - Flash will recognize that you are using the MC as a button and respond to the mouse events without have to declare the other handlers. Then, in your onRelease handler, tell the button to gotoAndStop('_down) (or over in your case) and then use the 'enabled' prop to disable the button. Now however you will need a method to 're-enable' any other button that was previously disabled - best thing to do is to store the buttons in an array and then iterate through the array a 'enable' all of them with the exception of the one currently navigated to.
From: russ500 on 7 May 2008 10:57 Thanks cbeech I'll give it a try.
|
Pages: 1 Prev: Importing music on to a timeline Next: attach image to email form |