swf地址和帧

发布于 2024-09-03 22:42:08 字数 442 浏览 3 评论 0原文

在我的 flex .swf 文件中,我检查浏览器地址框中 URL 末尾是否有“#/1”(如果存在,则使用本地 Flex SharedObject 恢复之前的状态)。如果“#/1”不存在,我会调用 SWFAddress.setValue("1"),它的作用是在浏览器地址框中的 URL 末尾附加“#/1”,if 该顶级 URL 也是包含我的 .swf 文件的 html 页面的 URL。

当包含 swf 的 html 文件位于框架中时,出现我的问题,在这种情况下,调用 SWFAddress.setValue("1") 会将浏览器地址框中的顶级 URL 替换为该框架页面的 URL(然后附加“ #/1”),然后使该框架页面成为顶层,并清除所有其他框架。但我只想在浏览器地址框中恰好出现的顶级 url 地址末尾附加“#/1”(而不是用包含 swf 的框架页面的 url 替换其整个内容。

希望这足够简洁)如果有人有解决方案。

in my flex .swf file I check for "#/1" at the end of the URL in the browser address box (and if its present, use a local Flex SharedObject to restore a previous state). if "#/1" is not present, I call SWFAddress.setValue("1") which has the effect of appending "#/1" on the end of the URL in the browser address box, if that top level URL is also the url of the html page containing my .swf file.

My problem occurs when the html file containing the swf is in a frame, in which case calling SWFAddress.setValue("1") replaces the top level URL in the browser address box with the URL of this frame page (and then appends the "#/1" on the end of that), which then makes this frame page the top level, wiping out all the other frames. But I just want to append "#/1" on the end of whichever top level url address happens to be in the browser address box (not replace its entire content with the url of the frame page containing the swf.

Hopefully that's succinct enough in case anyone has a solution.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

此刻的回忆 2024-09-10 22:42:08

javascript:

window.self.location.hash

并完全出于我的目的而放弃 swfaddress 。

javascript:

window.self.location.hash

and just dispense with swfaddress entirely for my purposes I think.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文