将 Flash 中的链接定位到 Firefox 的 iframe 时出现问题
我认为自己是一个新手,
我在 Flash 菜单中制作了按钮来播放动画并在单击时转到 url,并且我已经做到了,以便 url 页面加载到 iframe 中。
在 Safari 上一切正常,但最终会在 Firefox 的新选项卡中加载 url 页面。
如果有人有解决方案,我们将不胜感激。非常感谢。
这是动作脚本,iframe 名为“myframe”:
present_btn.addEventListener(MouseEvent.CLICK,goPresent);
function goPresent(evt:MouseEvent):void {
// play();
present_btn.gotoAndPlay("present");
var url:String = "http://www.ecuad.ca/~vlo/corelam/blank.html";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, "myframe");
} catch (e:Error) {
trace("Error occurred!");
}
}
I'll consider myself a newbie,
I've made buttons in a flash menu to play animation and go to a url on click, and I've made it so that the url page loads in an iframe.
Everything works fine on Safari, but it ends up loading the url page in a new tab for Firefox.
If anyone has a solution, it'll be really appreciated. Thanks so much.
Here is the actionscript and the iframe is named "myframe":
present_btn.addEventListener(MouseEvent.CLICK,goPresent);
function goPresent(evt:MouseEvent):void {
// play();
present_btn.gotoAndPlay("present");
var url:String = "http://www.ecuad.ca/~vlo/corelam/blank.html";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, "myframe");
} catch (e:Error) {
trace("Error occurred!");
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有这个代码片段来处理使用 as3 打开窗口,这似乎在大多数情况下都有效:
它最初不是我的代码,并且我丢失了链接。它可能来自广告横幅网站(例如 doubleclick),因此如果我找到归属(或者有人可以找到相关来源),我会添加它。
I've had this code snippet to handle opening windows using as3 that seems to work in most cases:
It isn't my code originally and I've lost the link. It would have come from an ad banner website (like doubleclick) so if I find the attribution (or someone can find the relevant source) I'll add it.