Easily Target a URL with the Window Method of Your Choice

// gotoLink takes 3 parameters: the event, the URL string, and the method (_self, _blank, etc)
//
// sample usage:
// gotoLink( evt, "<a href="http://google.com"," >http://google.com",</a> "_blank" );


function gotoLink( evt:Event, l:String, meth:String  ) : void
{
	var URLReq:URLRequest = new URLRequest(l);
	try 
	{
		navigateToURL(URLReq, meth);
	} catch (e:Error) 
	{
		trace(e);
	}
}

source

Comments are closed.