Lunarpages Web Hosting Forum

Author Topic: Adding a link to a button in Flash 8/CS3  (Read 7364 times)

Offline Davion

  • Spaceship Navigator
  • *****
  • Posts: 92
Adding a link to a button in Flash 8/CS3
« on: January 14, 2008, 02:58:47 AM »
This is now driving me up the wall, I've been trying to add a link to a button in both Flash 8 and CS3 and when I preview the movie the cursor changes to a pointing hand but when you click nothing happens.

Here is the actionscript code applied to the symbol:

on (release) {
   getURL("", "_blank");

I've copied and pasted that code into the actions panel with the button symbol selected.  I have also tried naming the button and applying the code to the layer to run on the button ie:

function clickHandler(event:MouseEvent):void{
navigateToURL(new URLRequest(""),"_self");

I have tried running the button in both action script 2 and 3, and help in regards to this would be greatly appretiated, thanx.


  • Guest
Re: Adding a link to a button in Flash 8/CS3
« Reply #1 on: January 14, 2008, 07:25:40 AM »
That's a tough one, as that code:
Code: [Select]
on (release) {
   getURL("", "_blank");

should work as long as its tied to the button instance. Have you tried on (press) {}  as well?

I have found a couple of things on the web regarding a bug in firefox, and one in IE:

as well as someone said this
when a swf is inserted into an html file and run locally getURL will NOT work on some machines using flash player 8, although the same file will run correctly when run from a server.

Check out this page for some workarounds:

Hope this helps.
« Last Edit: January 14, 2008, 07:28:03 AM by ReTodd »