From the course: Flash Professional CS5 Essential Training

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Using code snippets to create a hyperlink

Using code snippets to create a hyperlink - Flash Professional Tutorial

From the course: Flash Professional CS5 Essential Training

Using code snippets to create a hyperlink

One of the most common tasks with ActionScript code is to add a hyperlink to a web page. In previous versions of Flash, this required typing a lot of code. In Flash CS5, it's really easy with the Code Snippets panel. You can add a link to a movie clip or button symbol. On the Stage, I have an instance of a button symbol. I prefer using button symbols over movie clips, because Flash automatically uses the hand cursor when you roll over a button symbol and that doesn't happen with a movie clip. So go to the first frame where your button appears, because if you go to a later frame, the interactivity won't happen until the playhead gets to that frame. So you want to go to the first frame where your button appears and then select the button and open up the Code Snippets panel. In the Code Snippets panel, just double-click Click to Go to Web Page, which is inside of the Actions folder. So when you click this, you will see the message that the selected symbol requires an instance name…

Contents