I have seen this question many times, on many forums and blogs throughout the web and have at one time pondered the same question for my own projects. As far as I know, at this time, there is no way to wrap a flash animation with html code to make it a click able link, but if you have Adobe flash and a couple minutes you can complete the task.
This method is for files using Actionscript 2.0, not 3.0. Abobe changed the code in 3.0 to be about 5 times longer and 5 times more confusing. These steps will still work with 3.0 if you have the correct action script code for steps 11 and 12 though.
Steps to make Flash SWF Animation Clickable
- First, create a new .fla flash file in Adobe Flash(actionscript 2.0) or open your current file
- Create a new layer on the timeline above everything else (Insert>>Timeline>>Layer)
- Create a box on that frame with the Rectangle Tool (this will be the clickable area)
- Select the new layer(important!) then select the box
- Too the right under Color, Change the Stroke color and Fill color Alpha to 0%
- Double click the middle of the box
- Press F8 to convert the box to a symbol
- Name the box anything you would like
- Select the box again
- Next go to Window>>Actions or press F9
- Finally, copy this code in and replace page.html with your URL
on(release){
getURL("page.htm", "_self"); }

Now you can go to Control>>Test Movie and see that you new movie is now clickable. What we basically did was create a transparent button on top of our animation and made that a clickable link with the on(release) action script code.
If you have another way to accomplish this task or have the action script code for 3.0, leave a comment below with the details!









on (release) {
getURL (“http://www.domainname.com/”, “_blank”);
}
this is the right script in a url-button
I tried to do something similar to this using two separate buttons (one that covers the whole image and another that is entered on a “click here” button) that go to two different urls. Trouble is, whenever I load a page with the animation, both urls also open immediately without waiting to be clicked. I’m beating my head on a wall to figure out what I did wrong.
Thanks a million! I’ve hunted like a Diogenes for a way to do this, and this is the only one that worked for me, and it’s also the simplest!!!
Great! I am glad it worked easily for you Daniel. Adding a link is such a key thing we add to our flash videos, but for some reason their are not many tutorials on how to do it! Thanks for the comment Daniel and I hope to see you back around here again.
Hi,
I’m a beginner with Flash. I’m having troubles with creating a couple of buttons that link to different URLs. Everytime I add the actionscript in, the rest of the animations go funny (the stop actionscript on the other animations don’t work) and I get a syntax error. Any ideas?
Please help…
Andrew, if you’re getting a syntax error from simply adding the above code, my first guess would be that you are using actionscript 3.0. The OnRelease getURL code will only work with actionscript 2.0.
If that isn’t the problem, you may want to try the creative cow forums http://forums.creativecow.net/. It is a great resource to look for help on problems like this one.
Hope that helps a bit! Thanks for stopping by!
Ditto to the above comments.
Thanks SO much for supplying an easy yet hard-to-find answer to a very common question.
Cheers, PH
@Peter H – Glad to hear it was helpful!
Thanks a million!!!
Was scouring the net for an easy and comprehensible tutorial to do this seemingly simple task, and yours is the best! :D
Thanks :D
Hi there,
also new to as – I have followed your instruction to the tee (trying to link my flash file to a URL) but I keep getting 1087: Syntax error: extra characters found after end of program.
@ isobel – Usually this error code happens when there is a missing opening or closing bracket like this {
You might want to double check your code to see if a bracket is missing. Hope that helps!
Adobe Flash CS3 Professional doesn’t even let me copy and paste the clickable code on the button when I press F9 (Actions) and consider the code as an when I export the video:( Can anyone help?
The errors are :
1-Mouse events are permitted only for button instances
on(release);
…and I can’t even add the damn button in the Action options!!!
2-Syntax Errors
getURL(“http://light.cvgrenier.com/menu.html”, “_self”);
Hi there i read the comments they were very useful but i am having a different problem i am trying to link my html file to a button and i entered this code in actions:
on(release){
getURL(“G:\E safety DIDA\E-portfolio\plan.html”,”_self”);
}
and when i click the button it says
No web page was found for the web address: file:///G:/%20safety%20DIDA/-portfolio/lan.html
so please help me please reply fast.
thanks