Skip to main content
January 21, 2008
Question

Put HTML link in flash movie - I'm missing something

  • January 21, 2008
  • 1 reply
  • 258 views
Hey forum - if someone could help me out here that would be awesome.

I've created a movie in Flash version 8 and am tryhing to get it to link to a page on the website when clicked on. Using this code:

thermostatbutton.addEventListener(MouseEvent.CLICK, goWhere)
function goWhere (evt) {
var url = " http://www.hvactechsupport.com/controls-main.asp"
navigateToURL(new URLRequest(url))
}

The flash file exports fine, and it recognizes the image as a button, but nothing happens with a click.

Please help! Thanks. =)
This topic has been closed for replies.

1 reply

robdillon
Participating Frequently
January 21, 2008
The code you are using there is AS3, not AS2. For AS2 you want something that looks like this:

thermostatbutton.onRelease = function() {
getURL(" http://www.hvactechsupport.com/controls-main.asp");
}
January 22, 2008
sweet - thanks. everything is working! i appreciate your help.