Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Flash General Questions > Flash 9 General Questions

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-07-2007, 08:55 AM   #1
kumaravel
Member
 
Join Date: Jun 2007
Posts: 51
Default flash as a link?

hi all how to make a flash file(.swf) as a link(href) in a html..
kumaravel is offline   Reply With Quote
Old 07-07-2007, 03:06 PM   #2
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,075
Default

First frame of your movie...

this.onMouseDown = function(){
getURL("http://www.google.com/", "_self");
}
atomic is offline   Reply With Quote
Old 07-07-2007, 07:40 PM   #3
kumaravel
Member
 
Join Date: Jun 2007
Posts: 51
Default a small clarification

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...
kumaravel is offline   Reply With Quote
Old 07-07-2007, 08:08 PM   #4
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,075
Default

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.
atomic is offline   Reply With Quote
Old 07-09-2007, 06:15 PM   #5
dr_zeus
Flash Adventurer
 
dr_zeus's Avatar
 
Join Date: Mar 2005
Location: Silicon Valley
Posts: 1,975
Default

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.
__________________
Josh Tynjala | JOSHBLOG | Bowler Hat Games
dr_zeus is offline   Reply With Quote
Old 07-09-2007, 11:17 PM   #6
tuant
Registered User
 
Join Date: Jul 2007
Posts: 5
Default

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.
tuant is offline   Reply With Quote
Old 07-10-2007, 05:56 PM   #7
dr_zeus
Flash Adventurer
 
dr_zeus's Avatar
 
Join Date: Mar 2005
Location: Silicon Valley
Posts: 1,975
Default

Interesting idea. Note that this is the Flash 9 forum, so in ActionScript 3 you would use:

ActionScript Code:
root.loaderInfo.parameters.clickTag
__________________
Josh Tynjala | JOSHBLOG | Bowler Hat Games
dr_zeus is offline   Reply With Quote
Old 07-12-2007, 09:42 PM   #8
kumaravel
Member
 
Join Date: Jun 2007
Posts: 51
Default

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....
Flash:

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


html

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


i think this is correct as per ur code..

thank you..
kumaravel is offline   Reply With Quote
Old 07-12-2007, 10:09 PM   #9
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,878
Default

Try this...
HTML Code:
<embed src="hai.swf?clickTag=http://www.yahoo.com" />
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a link in flash timx1981 ActionScript 1.0 (and below) 5 10-17-2008 06:06 AM
Link to open swf in Flash player daveh113 Components 5 09-28-2005 09:37 PM
[Q] Do we need those forums??? CyanBlue General Chat 59 07-27-2004 12:13 PM
scrollBar on Flash Exchange cdeg Components 5 05-03-2004 08:13 PM
Open Flash from asp link that passes query string drliebs ActionScript 1.0 (and below) 2 03-03-2004 10:07 AM


All times are GMT. The time now is 07:05 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.