web design chicago

A Freelance and Professional Web Designer working in and around Chicago, IL.

E-mail: info@zachines.com
Phone: 708.224.7928

January 5, 2009

Creating a Link with flash

Filed under: Flash, Tutorials — Tags: , — admin @ 3:37 pm

(You must allow pop-ups for this video)

Creating A Link With Flash

If you have no experience with actionscript, its OK! This tutorial will go through step by stop on how to do it and I will explain everything as best i can.

Note: This tutorial assumes you have SOME knowledge of flash (how to create and work with symbols.)

Objectives: This tutorial is written to show people how to link a symbol (I will briefly go over text) to an external web site.

Lets Begin

There are 2 main steps in creating a link

  • Create the link function
  • Create the event listener

Create The Link Function

This is going to be the function that opens the web page. Whenever we call this function, it will load the page. I will call it goHome(). You may place this actionscript anywhere on the timeline. 

Create The Event Listener

This is the script that detects the key click. It listens for a key click, then executes goHome(). This must be placed ON the symbol you want to be the link. Before you can call the symbol, you must give it an instance name. So first select the symbol you are working with (for this example we will call it homeButton). So select homeButton and in the properties window in the “Instance name” field type: homeButton. This is very important. If your having trouble finding the “instance name” field, keep looking! you may have to use the subselection tool, on CS3 it is V, and A for selection tool. Dig around the properties bar until you find Instance Name

Now that your symbol has a name, we may call it in this next script. So on the same layer that the symbol is on, add a new keyframe and open the actions panel.  Attach this script there.

This will listen for a keyclick on that instance and once clicked it will execute goHome, which currently sends you to google.com

I hope this tutorial helped you, please if you have any feedback, suggestions, or comments Contact me here. And please visit my site, Web Design Chicago

Leave A Comment