Skip to main content
October 9, 2010
Question

geturl on as 3.0

  • October 9, 2010
  • 2 replies
  • 634 views

how i can create get url from as 2.0 and how to write this in as 3.0 example on(press)geturl www.adobe.com please tell me how to write this in action script 3.0 thanks

This topic has been closed for replies.

2 replies

October 9, 2010

You can use Code Snippets in CS5

/* Click to Go to Web Page
Clicking on the specified symbol instance loads the URL in a new browser window.

Instructions:
1. Replace http://www.adobe.com with the desired URL address.
   Keep the quotation marks ("").
*/

myButton.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage(event:MouseEvent):void
{
   navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
}

Please indicate if this is helpful.

kglad
Community Expert
Community Expert
October 9, 2010

use navigateToURL().