Instructions for ActionScript 2.0
- Start a new Flash project. Choose Flash File (ActionScript 2.0) from the Create New menu in the Welcome Screen.
- Draw a rectangle on the Stage. This will be your button.
- After you draw the rectangular button image on the stage, select it with the Selection Tool. Click Modify, Convert to Symbol from the Menu bar. In the Convert To Symbol dialog box, use the Movie Clip option and name your movie clip "myButton".
- The button should still be selected. In the Properties Inspector, give the button an Instance Name of "myButton".
Now, you will add the AS2 code to the button itself. You will only do this when working on an ActionScript 2.0 Flash project. - If the Behaviors Panel is not already open, click Window, Behaviors. In the Behaviors Panel, click the Plus sign and choose Web, Go to Webpage from the pop-up menu.
- In the Go to URL dialog box, enter the URL for the webpage, including the http://.
- Open the Actions Panel by clicking Window, Actions. Notice that the top tab in the Actions Panel says "Actions – MovieClip" and the bottom tab says "myButton". This is because the code that magically appeared in the Actions Panel as you added the behavior to the button is attached to your myButton button. You will see the following code in the Actions Panel.
on (release) {
//Goto Webpage Behavior
getURL("http://www.adobe.com","_self");
//End Behavior
} - Click Control, Test Movie. When you test your button, a new browser window should open to the website.