【问题标题】:Changing iframe content with flash buttons使用 Flash 按钮更改 iframe 内容
【发布时间】:2013-08-12 09:15:49
【问题描述】:

我正在尝试从 iframe 外部的 flash 按钮更改 iframe src

这是我的代码

this.contact.onRelease = function() {
    navigateToURL(new URLRequest("page2.html", target="myframe") );
};

但这不起作用

【问题讨论】:

  • 谷歌ExternalInterface
  • 看起来更像 ActionScript 2 (this.contact.onRelease)。你有任何错误吗?

标签: actionscript-3 flash flash-cs6


【解决方案1】:

可以在没有ExternalInterface 的情况下更改 iframe 内容,但我认为您也仅限于自己的域。您的代码几乎是正确的。 我不确定this.contact.onRelease 是否可以工作,但navigateToURL 应该是这样的:

navigateToURL(new URLRequest("page2.html"), "myframe");

您将目标分配给URLRequest,而且目标只是一个字符串,所以没有target=..

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

【讨论】:

    猜你喜欢
    • 2014-12-25
    • 2014-12-28
    • 1970-01-01
    • 1970-01-01
    • 2023-03-10
    • 2015-04-05
    • 1970-01-01
    • 1970-01-01
    • 2015-08-22
    相关资源
    最近更新 更多