Add a behavior

Next, you'll add a behavior to the button that will make it open a website. Behaviors enable you to add the power, control, and flexibility of ActionScript coding to your document without having to create the ActionScript code yourself. You can use behaviors to control movie clips, video, and sound files.

You'll use the Go to Web Page behavior to add navigation to a button that opens a website.

  1. On the Stage, click the Button component that you added.
  2. If the Behaviors panel is not already open, select Window > Development Panels > Behaviors to open it.
  3. Click the Add (+) button at the top of the panel to display a list of behaviors.
  4. Select Web > Go to Web Page.

    The Go to URL dialog box appears.

  5. In the URL text box, type any complete URL, such as http://www.macromedia.com. Then click OK.

    When the user clicks the button, a browser will open for the specified URL.

  6. Save your file.