Disable hash changing with flash anchor navigation

≡放荡痞女 提交于 2019-12-20 05:45:06

问题


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

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


回答1:


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>

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.



来源:https://stackoverflow.com/questions/9071626/disable-hash-changing-with-flash-anchor-navigation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!