Return to Snippet

Revision: 12041
at February 28, 2009 14:15 by ddegner


Initial Code
btnname.addEventListener(MouseEvent.CLICK, myBtnClicked);

function myBtnClicked(e:MouseEvent):void {
	try {
		navigateToURL(new URLRequest("/index.php"), "_self");
	} catch (e:Error) {
		trace("Error occurred!");
	}
}

Initial URL

                                

Initial Description
I just want a simple link, but it takes 8 lines of code?!

I like control but they could have made a shortcut of some sort for buttons.

Initial Title
AS3 button link

Initial Tags
url, link

Initial Language
ActionScript 3