We'll start off by creating the button...
You can draw your own or get an already created on...
Make Your Own Button:
- Hit "Ctrl + F8"
- Name your button
- Then in the space provided, draw your button
- Now click "Scene 1" at the top of the page
- Now Hit "Ctrl + L"
- That will bring up your library, Now find the button you just made and drag it onto the stage.
- Now skip down to the Action Script Section to make your button do something
- Open Flash
- Click "Window"
- Scroll down to "Other Panels"
- Then click "Common Libraries"
- And then Click "Buttons"
- You will get a pop up with all kinds of pre-made buttons
- Now skip down to the Action Script Section to make the button do something
The Action Scripting:
Now to make your button do something... the following script will make your button goto another frame...
First, put this script on the frame:
- stop();
That will make your movie stop at this frame and not keep playing on.
Now Put this script on the button:
- on (release) {
- gotoAndPlay(2);
- }
That means that when you release your click on the button, it will goto and play the frame number you put in the "( )". Of coarse to make this script specific to what you want it to do you will need to change the number in the "( )".
You can also put other actions in between the "{ }" to change variables, or anything else you would like to happen when you release your click on the button.
You can also put a different action inbetween the "( )" that says release. You can put "rollOver" to make it so when you roll over the button it will do the specific actions you set.
No comments:
Post a Comment