AS3 Open the link and open a new page

Source: Internet
Author: User
Tags close page php tutorial

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.