URL不自我窗口浏览 [英] Url doesn't navigate in self window

查看:93
本文介绍了URL不自我窗口浏览的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

clickMeh.addEventListener(MouseEvent.CLICK,goThere);
function goThere(e:MouseEvent)
{
    var url:String = "http://www.mysite.com/";
    var request:URLRequest = new URLRequest(url);
    navigateToURL(request,'_self');
}

我有这个code,但每次我按一下按钮我得到新的选项卡中打开,就像是_blank指令。

i have this code but each time i click the button i'm getting new tab opened like it was "_blank" directive.

推荐答案

复制我的评论作出回答了这个问题:

Duplicating my comment to make the question answered:

尝试 _top _parent ,还有<一个href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/package.html#navigateToURL%28%29"相对=nofollow>引用说:

您无法导航特殊窗口_self,_top或_parent如果您的SWF文件包含由已设置allowScriptAccess为无,或为sameDomain时域的HTML页面HTML文件和SWF文件不匹配。

You cannot navigate the special windows "_self", "_top", or "_parent" if your SWF file is contained by an HTML page that has set the allowScriptAccess to "none", or to "sameDomain" when the domains of the HTML file and the SWF file do not match.

这篇关于URL不自我窗口浏览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆