简体   繁体   English

Flash链接到外部文件

[英]Flash linking to external file

Here is the script am using to open an external html file from moviclip but it is opening in new tab. 这是用于从moviclip打开外部html文件的脚本,但它在新选项卡中打开。 How to make it open in the same window? 如何在同一个窗口中打开它?

function ShowDesignerhome(event:MouseEvent):void {
    var targetURL:URLRequest = new URLRequest("77.html");
  navigateToURL(targetURL);

Add "_self" as the second argument for your call to navigateToURL() . 添加"_self"作为调用navigateToURL()的第二个参数。 More information: 更多信息:

navigateToURL(targetURL, "_self");

Parameters 参数

request:URLRequest

window:String (default = null) — The browser window or HTML frame in which to display the document indicated by the request parameter. window:String (default = null) - 用于显示请求参数指示的文档的浏览器窗口或HTML框架。 You can enter the name of a specific window or use one of the following values: 您可以输入特定窗口的名称或使用以下值之一:

"_self" specifies the current frame in the current window. "_self"指定当前窗口中的当前帧。
"_blank" specifies a new window. "_blank"指定一个新窗口。
"_parent" specifies the parent of the current frame. "_parent"指定当前帧的父级。
"_top" specifies the top-level frame in the current window. "_top"指定当前窗口中的顶级框架。

PS. PS。 Please make use of the "accept" button next to answers (this goes for answers on your current questions). 请使用答案旁边的“接受”按钮(这可以解答您当前的问题)。

Simply add a second parameter to your navigateToURL call 只需在navigateToURL调用中添加第二个参数即可

navigateToURL(targetURL, "_self");

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/package.html#navigateToURL () http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/package.html#navigateToURL ()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM