-
Arghh!! Buttons!
Can someone explain to me why my invisible button isn't working?
My instance name for the button is: resume_btn
My label for my page is titled: resume
(The labels layer is above the pages layer and on the same frames. And all the capitalization is correct too)
When I go in to edit my button I have my hit state the one that has the rectangle in it. The rest of them have blank keyframes. When I preview it the button looks as if it would work but when you click it doesn't take you anywhere!
The actionscript I've used is this:
Code:
resume_btn.onRelease = function(){
gotoAndStop("resume");
}
All of the script is set on its own layer.
What's wrong with it? :confused: Help!
-
More than likely, the problem is in the code. Try something like
PHP Code:
_root.gotoAndStop("resume");
-
Also try this to make sure your button is firing
PHP Code:
resume_btn.onRelease = function(){
//_root.gotoAndStop("resume");
trace("The button works");
}
-
I'll try those and see what happens. Thanks for the replies. :)
-
Ok. I tried both of those codes. The first one worked but not in the way I wanted. It went straight to the page (at least we know the page works! lol)
The second one didn't work at all. So basically, does that mean my button doesn't even work at all?
-
Wow.. Ok. I feel a bit stupid right now.
I had text underneath the invisible button, which is the button I kept trying to get to work. I assigned both the invisible button and the text with the name "resume_btn".
Thanks again for the help though. I love this forum. :)
-
Glad you got it workin and glad we could help.
-
The second one wasn't supposed to work. It's a trace command which should, if the button works, output a message in the output panel upon testing the file, which should say "The button works". Does it do that?