Nutbeen
asked on
Button rollover onEnterFrame issue
Hello Experts,
I have a menu, which once a button is clicked it stays highlighted and loads the page as buttons do. I would now like it to, onEnterFrame, load the first buttons page rather than stay blank, but keeping the current function of the buttons.
The site can be seen here, and click on the books menu at the top. http://www.rpbooks.co.uk/denismcbride
The code on my buttons is:
And the var selectedButton code is then added up a level to call the function.
Thanks,
Chris
I have a menu, which once a button is clicked it stays highlighted and loads the page as buttons do. I would now like it to, onEnterFrame, load the first buttons page rather than stay blank, but keeping the current function of the buttons.
The site can be seen here, and click on the books menu at the top. http://www.rpbooks.co.uk/denismcbride
The code on my buttons is:
And the var selectedButton code is then added up a level to call the function.
Thanks,
Chris
stop();
this.onEnterFrame = function() {
if ((_parent.selectedButton != this) && (rewind == true)) {
prevFrame();
}}
};
this.onRollOver = function() {
if (_parent.selectedButton != this) {
rewind = false;
play();
}
};
this.onRollOut = function() {
if (_parent.selectedButton != this) {
rewind = true;
}
};
ASKER
I'm afraid I'm going to need more help than that...Action script beginner
If you look in your code in the original post, line 5 has 2 closing braces "}}" remove one of them and then see if that works.
You dont need to delete the question, I am pretty certain that is your issue.
You dont need to delete the question, I am pretty certain that is your issue.
Ok, after re-reading your question, it sounds like you want to use the URL of current browser window and pass it into flash and use that to keep the button highlighted for the page you are on. Is that correct?
By the way, my last post still applies...there is one to many braces in your onRollOver() function.
By the way, my last post still applies...there is one to many braces in your onRollOver() function.
ASKER
Yeah that sounds right. It's just so when you go to the site, the home button will automatically highlight, without having to click it.
Sorry I'm not much help..lol
I have change the braces error you mentioned.
Thanks
Sorry I'm not much help..lol
I have change the braces error you mentioned.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, thats done it!
this.onEnterFrame = function() {
if ((_parent.selectedButton != this) && (rewind == true)) {
prevFrame();
}} //<-- extra here
};
Also, you could add an else statement so the _parent displays what you want and the 'button' highlights as you want as well.