A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Arghh!! Buttons!

  1. #1
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    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? Help!

  2. #2
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    More than likely, the problem is in the code. Try something like
    PHP Code:
    _root.gotoAndStop("resume"); 
    Wile E. Coyote - "Clear as mud?"

  3. #3
    AS3 Mod
    Join Date
    Sep 2007
    Location
    O-H-I-O
    Posts
    2,385
    Also try this to make sure your button is firing
    PHP Code:
    resume_btn.onRelease = function(){
        
    //_root.gotoAndStop("resume");
        
    trace("The button works");


  4. #4
    Junior Member
    Join Date
    Jan 2007
    Posts
    16
    I'll try those and see what happens. Thanks for the replies.

  5. #5
    Junior Member
    Join Date
    Jan 2007
    Posts
    16
    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?

  6. #6
    Junior Member
    Join Date
    Jan 2007
    Posts
    16
    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.

  7. #7

  8. #8
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    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?
    Wile E. Coyote - "Clear as mud?"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center