How to make a fully functioning “Back” button in Adobe Flash



making a back button for your button that takes you to a different page

I’m assuming you only need to get back to the page you started with, instead of closing and re-opening your app.

so to start off, create a button by right clicking in your library, and selecting “New Symbol”
when the dialogue box appears, label your button “backbutton” (this is important, because we will need it for the instance name for the button, and it’s all around easier to remember what’s what.

So when you’re creating a button, make it look like whatever, mine looks like this:

once you have it created, click on “Scene 1” above your stage to get back to where you want to place your button.
drag your “backbutton” to the stage, and place it where you want it.
(if you are actually going to go BACK from the page you’re on, im assuming you’re on a different frame.)

make sure your button has an instance name.. mine is just “backbutton”
(note: if yours is different, apply changes to the code as necessary)

click on the frame, and open your “Actions” window, under Window > Actions
you will want to type in the code:

the MouseEvent.CLICK will ensure that when your mouse clicks the ‘backbutton’, it will take you back to your main page.
playback was just the name i gave it so it would go ‘back’
the gotoAndPlay(1) code takes you back to your first frame, that’s what the “1” stands for..
if the frame you want to go back to is different than frame 1, type the frame you want to go to

save your file, and run it, it will be able to bring you back to your main menu page.

i hope this tutorial was useful.

thanks for reading