;

PDA

Click to See Complete Forum and Search --> : [RESOLVED] help on creating website link


literain
01-15-2008, 04:41 AM
Hi everyone,

I use to make buttons to link to other pages of my site using getURL in Actionscript 2 how do I do it in Actionscript 3, here is my code and its not working. Any help would be very much appreciated. Thanks.

homeBtn.addEventListener(MouseEvent.CLICK, fncHome);

function fncHome(e:Event):void{
trace("home");
getURL("index.php");
}

Thanks,
Literain

fx.barrett
01-15-2008, 05:23 AM
Try something like this:

var urlTarget:URLRequest = new URLRequest("http://www.motors-san.com/");

btn.addEventListener(MouseEvent.CLICK, onClick);

function onClick(event:MouseEvent):void
{
navigateToURL(urlTarget, "_self");
}
btn si the instance name of your movie clip.

literain
01-15-2008, 06:32 AM
thanks again.its working. More power to you.

Literain