PDA

View Full Version : URLRequest



joh909
August 1st, 2007, 10:41 PM
OK, new Flash user here and I am trying to get my head around the differences between ActionScript 2.0 and 3.0

I'm trying to add an Action to an invisible button that sits on top of my animated Flash banner. I've used the following script but can't get it to work ('link' is my instance name):

function goHome (event:MouseEvent):void
{
var targetURL:URLRequest=new
URLRequest("https://www.josh.com/josh/ (https://www.padi.com/padi/elearning/)")
;
navigateToURL(targetURL);
}
link.addEventListener(MouseEvent.CLICK, goHome);


When I check the script I don't get any error messages however when I publish it won't link. Can anyone offer any advice?

jman1
August 2nd, 2007, 01:53 AM
Are you using the time line to write your code, or a document class?
I've found it easier to adopt using the document class and have left the time line behind, because where your button is, and the code could be the problem. Can you post and FLA?

J-Man

acc
January 16th, 2008, 12:52 PM
experiencing the same problem, wondering if you've found a solution?

http://www.kirupa.com/forum/showthread.php?t=286139