禁用与闪光锚定导航哈希更改 [英] Disable hash changing with flash anchor navigation

查看:129
本文介绍了禁用与闪光锚定导航哈希更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您在Flash动画的框架中指定锚点,则IE浏览器在播放时会在地址栏中更改散列值。

If you specify anchors in frames of the flash movie, IE browser will change hash in address bar while playing it.

http://example.com/ --> http://example.com/#start

是否有任何方法禁止使用HTML导航&安培; JS?

Is there any method to disable this navigation using only HTML & JS?

推荐答案

如果您使用Flash with named anchorsHTML模板进行导出,它使用ExternalInterface调用来更改地址。从HTML页面中删除这些行:

There will only be changes if you use the "Flash with named anchors" HTML template for export. It uses an ExternalInterface call to change the address. Remove these lines from the HTML page:

<script language="JavaScript">
    function flashGetHref() { return location.href; }
    function flashPutHref(href) { location.href = href; }
    function flashGetTitle() { return document.title; }
    function flashPutTitle(title) { document.title = title; }
</script>

加上插入到HTML代码中的指定锚点(< a name = ...> ),并且将不再有任何深层链接 - 除非应用程序使用SWFAddress,您可以简单地从JavaScript导入中删除。

plus the named anchors inserted into the HTML code (<a name="...">), and there will no longer be any deep linking - unless the app uses SWFAddress, which you could simply remove from the JavaScript imports.

这篇关于禁用与闪光锚定导航哈希更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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