AS3 Open the link and open a new page
function _geturl (event:mouseevent): void {
var _newurl:http://www.111cn.net/flash_a/action/urlrequest=new http://www.111cn.net/flash_a/Action/urlrequest (".. /index.php tutorial ");
var _fangshi:string= "_blank";
Navigatetourl (_newurl,_fangshi);
}
My_btn.addeventlistener (Mouseevent.click,_geturl);
For more information about opening URL instances
Import Flash.net.http://www.111cn.net/flash_a/action/urlrequest;
Import Flash.net.navigatetourl;
To open a new page:
function Gotourl (event:mouseevent): void
{
Navigatetourl (New Http://www.111cn.net/flash_a/Action/urlrequest ("Http://www.111cn.net"), "_blank");
Writing two var request:http://www.111cn.net/flash_a/action/urlrequest = new http://www.111cn.net/flash_a/Action/ URLRequest ("Http://www.111cn.net");
Navigatetourl (Request, "_blank");
}
Close page
function Closeie (event:mouseevent): void
{
Navigatetourl (New Http://www.111cn.net/flash_a/Action/urlrequest ("Web Effects: Window.close ()", "_top"));
Writing two var url:http://www.111cn.net/flash_a/action/urlrequest = new Http://www.111cn.net/flash_a/Action/urlrequest (" Javascript:window.close () ");
Navigatetourl (URL, "_top");
}
Btngoto.addeventlistener (Mouseevent.click,gotourl);
Btncloseie.addeventlistener (Mouseevent.click,closeie)
Flash ActionScript 3.0 navigatetourl () site Link Example
As 2 with Geturl and as 3 using Flash.net package
The Navigatetourl () function replaces the
Public Function Navigatetourl (request:http://www.111cn.net/flash_a/action/urlrequest, window:string = null): void
Parameters:
Request:http://www.111cn.net/flash_a/action/urlrequest-http://www.111cn.net/flash_a/action/urlrequest object, Specifies which URL to navigate to.
window:string (default = null)-a browser window or HTML frame that displays the document indicated by the request parameter. You can enter the name of a particular window, or use the
One of the following values:
1 "_self" specifies the current frame in the current window.
2 "_blank" specifies a new window.
3 "_parent" specifies the parent of the current frame.
4 "_top" specifies the top-level frame in the current window.
For example, an open button Btngoto, a close button Btncloseie