Disable hash changing with flash anchor navigation

2019-03-04 16:35发布

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条回答
时光不老,我们不散
2楼-- · 2019-03-04 16:44

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.

查看更多
登录 后发表回答