Skip to main content
July 1, 2009
Answered

Linking a button in flash to a dreamweaver site

  • July 1, 2009
  • 1 reply
  • 1131 views

I am having some trouble linking a button in my flash movie to a separate dreamweaver site. The flash movie will be placed in

the homepage of a website and i want to be able to click a button in it to go to a separate page. the code i am trying is :

RF1.addEventListener(MouseEvent.CLICK,clickHandler); function clickHandler(event:MouseEvent):void{ navigateToURL(new URLRequest("http://Bleachers_Top.html")); }

where RF1 is my button and my target page is"Bleachers_Top.html"

I am pretty sure the last part is wrong but I cant seem to find any help on how to do it.

I get this error when i try it, does this mean it is a flash player setup error in that case does anyone know another way to do this because I don't want people to have to alter their Flash security options when they view it.

Thanks in advance

Andrew Whited

This topic has been closed for replies.
Correct answer Ned Murphy

what would be the code for linking it  it to a page, without the http://www part

thanks for all your help


Same code, just a relative url...

navigateToURL(new URLRequest("Bleachers_Top.html"));

1 reply

Ned Murphy
Legend
July 1, 2009

The url you show is not a valid address as far as I can tell.  If you are going to use the http://, then you also need to specify the domain... http://www.somesite.com/Bleachers_Top.html

If that web page is in the same folder as the page your Flash file will be in then you can just use the web page name without the http:// portion.

July 2, 2009

thanks,

I realized it wasn't valid but didn't really know how else to do it

my site is an add on to my highschool's website. Im not sure how exactly they are combining it with the regular site. Is there another way to do this without using the http:// since i cannot add this to the main site yet?

sorry I am pretty new to Flash and especially Actionscript 3

Ned Murphy
Legend
July 2, 2009

Until you have a definitive address for that link, your best bet may be to just link that to a valid web site... any web site.  Or you could just link it to a page, without the http://www.... part altogether.