Making buttons work

Ok, what I’ve done is imported graphics into my movie. I’m using those as backgrounds, similar to powerpoint. I want to make buttons that are necessary to move onto the next frame. But when I put in

on(release)
{
gotoAndPlay(frame#)
}

it just skips over it and i can’t click on the button. I don’t have various layers set up for this, maybe that’s what I need to do?

Welcome to the forums! :slight_smile:

You don’t need layers necessarily (though they are nice for organizing). Sounds like you are missing a stop action. If you have multiple frames but you want to stick on one until someone presses a button then you need to put stop(); on the frame you want to stick on. Then when your button is pressed you can either use the following:


on(release){
gotoAndStop(frame#)}

or put a stop(); on the frame you want to go to and stop at and use gotoAndPlay(frame#) (or gotoAndStop - works just as well I think).

:hr:

Ok, I tried putting in
on(release){
gotoandStop(frame#)
}

Nothing worked. When I do control>test movie, it just skips it right over and nothing happens.

Should I be worried about the properties and parameters?

If I do the other way:

on(release){
gotoandPlay(frame#)}

and then put a stop() in my destination frame, it does stop in that frame but will not stop to ask me for a click in the other frame. AAAHHHH!

Like I said, you need to put a stop(); on the frame you want to stick on. So whatever frame your button is on put a stop there.

:hr:

Here, I mocked up an example for you.

Thanks, I just had the stop in the wrong place. I’ve got it working like I had wanted. Thanks so much for the help and the example.

No problem, glad you got it working! :thumb: