Categories

Assigning links in Flash

Template-help.com Team November 15, 2010
Rating: 2.8/5. From 6 votes.
Please wait...

To add some interactivity to the flash animated part of your web design template you should add some links to the flash objects. For example you’ll need to link flash buttons with pages of your website or redirect your flash intro to homepage after it finished. There are some kinds of links in Macromedia Flash: button symbol links, frame links and text links. First of all you should open source “FLA” file in Macromedia Flash editor. To add links to the button symbols in your flash movie do the following. First of all you should locate button symbol you want links be assigned to. There are two ways of how to do that. The first way is to access it from the timeline. After you’ve opened FLA file in Macromedia Flash, move red timeline slider and watch the animation process. When you’ll see button symbol that needs to be linked, stop the timeline slider. Select it by single clicking it with Selection Tool. You can choose Selection Tool from tools panel or call this tool by pressing “V” hotkey. Go to the Properties Panel to check this symbols behavior. If you can’t see this panel for any reason you can open it by pressing “CTRL + F3” hotkey. At the top left corner of this panel symbols behavior drop down is located. It must be a “Button”. If it is “Movie Clip”, “Graphics” or some other that differs from “Button” you can’t assign links to it in the right way. Don’t change it to the “Button” because it will damage original rollover structure. Double click this symbol to get inside of it, select its content and check symbols behavior again.

Symbol Behavior

If you are still unable to locate appropriate symbol, maybe some symbols are hidden or locked. To unhide/unlock symbols do the following. Go to the timeline panel, there is a layers list on the left of it. There are three icons on the top of this list: eye, lock and rectangle. Click eye and lock icons twice to unhide and unlock all layers in current symbol. Some of flash headers have complicated structure to create powerful animation effects. So, it will be hard to access button symbols from the timeline. The easiest and most reliable way to locate elements in flash is to use symbols library. To open symbols library you can use “CTRL + L” hotkey or choose “Window/Library…” from the top menu. Browse the symbols library to find button symbol you want links be assigned to. You can see symbols preview in the preview window at the top of symbols library panel. Actually all button symbols have appropriate names such as “About Us button” or “Search button”. Double click symbols icon to edit it in the main workspace window. Then do operations described above to locate symbol with “Button” behavior. After you’ve selected button symbol press “F9” to open Actions panel. If this button has rollover effect, you will see following script code there:
on (rollOver) { gotoAndPlay(2); } on (rollOut) { gotoAndPlay(10); }
Add there following getURL action script code:
on (release) { getURL(“your_url_here”); }

getURL Action Script

You should type URL button will be linked to as get URL function argument. For example, if you want to link button to your contacts page type the following:
on (release) { getURL(“http://mywebsite.com/contacts.html”); }
Actually, get URL function accepts three arguments: URL, window type and variables send method. Window type argument specifies where new URL will be opened. If this argument is blank the link will be open in the same window. If you want to open it in a new window, use the “_blank” argument. Variables send method should be used if you are parsing some variables through the URL string. The available options are “GET” and “POST”. Next action script example calls products page with “item” variable with “9” value in the same window using a GET method.
on (release) { getURL(“http://mywebsite.com/products.php?item=9”, “_self”, “GET”); }
If you are using flash intro template, you will need to redirect visitor to your website after intro finished playing. To do these follow next instructions. Move red timeline slider to the end of flash intro movie. Select the last frame by single clicking it with mouse. Press “F6” to create key frame in this frame. Press “F9” to open Actions panel. Type the following code there.
getURL(“your_url_here”);
Replace “your_url_here” text with appropriate URL of your website. If you want some portion of text to be linked to some location on the web please, do the following. Locate the symbol containing text. Select the text you want to link with URL by using a Text Tool. Go to Properties Panel, press “CTRL+F3” if you can’t see it for some reasons. At the very bottom of that panel you’ll see the URL input box. It has the chain icon on the left of it. Just fill that empty input box with the appropriate URL.

URL Input Box

Now it’s time to publish your flash movie. Read Publishing your Flash movie section for the detailed instructions.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket