View Full Version : flash as a link?

07-07-2007, 07:55 AM
hi all how to make a flash file(.swf) as a link(href) in a html..

07-07-2007, 02:06 PM
First frame of your movie...

this.onMouseDown = function(){
getURL("http://www.google.com/", "_self");

07-07-2007, 06:40 PM
sorry, i need not to put a URL in a .swf

i have created a flash movie(.swf)..
can i use that in a html link(<href>) to link a website..

sorry... if im confusing you...

07-07-2007, 07:08 PM
Sure... Type some text... If it's static text, hilight the word(s) that'll be the link. In the textfield's properties, in the URL box (chain icon at the bottom...) type in the url... Voila!

If it's dynamic text, select the html tab (<>) and set the url in the same manner.

07-09-2007, 05:15 PM
I think kumaravel wants to be able to reuse the SWF for multiple URLs, and specify them in the HTML. However, this is not possible.

07-09-2007, 10:17 PM
do you mean like a clicktag? where the .swf acts as a link but the link is provided by an html code?

make a transparent box ontop of your movie. add into actions:

on (release) {
getURL(_root.clickTag, "_blank");

its all case sensitive.

make an html file

<embed src="yourfilehere.swf?clickTag=http://www.link.to.whatever.com" />

make sure clickTag is case sensitive on both ends.

07-10-2007, 04:56 PM
Interesting idea. Note that this is the Flash 9 forum, so in ActionScript 3 you would use:


07-12-2007, 08:42 PM
Ya.. great idea.. its working...

but i experienced a problem during the click..

a alert came during the click... (Cannot find the 'file://hard_disk_location'. make sure the path or internet address is correct....)

i used....

on (release) {
getURL(_root.clickTag, "_blank");


<embed src="hai.swf" clickTag="http://www.yahoo.com" />

i think this is correct as per ur code..

thank you..

07-12-2007, 09:09 PM
Try this...
<embed src="hai.swf?clickTag=http://www.yahoo.com" />