Jump to content


Embedding a link to a html page in the SWF


  • You cannot reply to this topic
4 replies to this topic

#1 hobulus

    Jedi In Training

  • Members
  • PipPip
  • 346 posts
  • Location:United Kingdom

Posted 27 February 2007 - 08:27 AM

Hi All,

I know this may be a dumb question, but I am a Flash beginner. Is there a way to embed a link into the exported SWF file so that the file, which is a banner, links to a webpage?

Please, if anyone can help me, I need to sort this urgently. I know you can just embed the file in html and link it that way, but can I embed the link in the actual movie?

Thanks in advance...

Hobulus

#2 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 27 February 2007 - 09:14 AM

just put a big square on top of it and make that square a movie clip. Change the alpha to 0. Go inside that movieclip add a new frame and put the following code on that new frame.

this.onRelease = function(){
getURL("myWebpage.html", "_blank");
}

Obviously swap out the mywebpage with whatever url you need to load, and _blank is whatever target you want the page to load in. Not 100% sure if it needs the " " around _blank, but I think it does.

Good luck

#3 hobulus

    Jedi In Training

  • Members
  • PipPip
  • 346 posts
  • Location:United Kingdom

Posted 27 February 2007 - 09:18 AM

Thanks Pax, I will try that. Cheers for the speedy reply. :rolleyes:

Hobulus




View PostPax, on Feb 27 2007, 02:14 PM, said:

just put a big square on top of it and make that square a movie clip. Change the alpha to 0. Go inside that movieclip add a new frame and put the following code on that new frame.

this.onRelease = function(){
getURL("myWebpage.html", "_blank");
}

Obviously swap out the mywebpage with whatever url you need to load, and _blank is whatever target you want the page to load in. Not 100% sure if it needs the " " around _blank, but I think it does.

Good luck


#4 hobulus

    Jedi In Training

  • Members
  • PipPip
  • 346 posts
  • Location:United Kingdom

Posted 27 February 2007 - 09:45 AM

Pax,

Thanks ever so much, got it all working, and does the trick perfectly. Thanks for all the help!
:rolleyes:

Hobulus

#5 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 27 February 2007 - 09:54 AM

Glad to hear it mate :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users