ActionScript uses the function navigateToURL(var1:URLRequest,targetWindow:String ) to Open a URL link in a browser.

 

For the simplictiy, there goes a function. Just calling the function with the desired URL as String will open the URL in a new window.

public function jumpTo(jumpLoc:String):void
 {
 navigateToURL(new URLRequest(jumpLoc),"_blank");
 }

Usage:

Call the function defined above with the URL as a String-type parameter.
Example:

jumpTo("http://google.com");

Previously published at my Progmaatic Blog

2 thoughts on “Open a URL in new Browser window in Flex/ActionScript

Comments are closed.