Open a URL in new Browser window in Flex/ActionScript


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

Advertisements

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s