• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Hour 18. Linking Your Movie to the Web > Task: Use getURL to Create a Hyperlink

Task: Use getURL to Create a Hyperlink

In this task you'll create a button that, when clicked, takes the user to another Web site. Here are the steps to follow:

Create a new file and save it in an empty folder. (This step isn't absolutely necessary, but it is useful when you're creating complex Web sites because all the files and folders can get out of hand; therefore, I like to start with a nice clean folder.)

Draw a rectangle, which will become a button. Convert it to a symbol and name it “MyButton.” Make sure to select button behavior and click OK.

Now you'll attach the getURL Action to the button. Select the instance of the button on the Stage, open the Actions panel, and then find the getURL Action. It's under Actions, Browser/Network in the Toolbox List. Insert the getURL Action by double-clicking or dragging it over to the script area on the right.

You need to specify the parameters for this Action. Basically, you need to indicate the Web address to where you want to navigate. In the URL field, type http://www.mcp.com/sams/, as shown in Figure 18.3. You'll learn about the other parameters later, so leave them alone for now.

Figure 18.3. Attaching a hyperlink Action (getURL) to a button is simple. Just specify an URL, and the rest of the parameters can be left at their default settings.

From the File menu, select Publish Preview, Default. You can watch the Flash movie and when you click, you'll be taken to the Sams Publishing Web site. Naturally, you could spice things up by animating the button or giving it an Over state.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint