This page require Adobe Flash 9.0 (or higher) plug in.

AS3: Scripting OnClick GetURL? (Where’s GetURL)

Another big suprise for AS3 is the missing GetURL where we used to script it on buttons to open up url. However that was replaced in ActionScript 3.0. We use navigateToURL instead.

Just follow the example when scripting your button. Remember like in previous tutorials, you need to add an eventlistener to your button to attached a function to it.

1
2
3
4
5
6
this.YourButton.addEventListener(MouseEvent.CLICK,openURL);
function openURL(event: MouseEvent)
{
	var request:URLRequest = new URLRequest("http://www.isgoodstuff.com");
	navigateToURL(request);
}

Other Cool Related Stuff

Leave a comment

Name: (Required)

eMail: (Required)

Website:

Comment: