swf地址和帧
在我的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
javascript:
window.self.location.hash
并完全出于我的目的而放弃 swfaddress 。
javascript:
window.self.location.hash
and just dispense with swfaddress entirely for my purposes I think.