I have a problem with my swf freezing after navigating to it using the back button in Firefox 7.0.1 (mac) My swf has a set of buttons that link other non flash pages in the site. If you use the back button to navigate back to the page containing the SWF, the swf freezes. As far as I can tell it works on all other browsers and works on firefox on the PC.
you can see it in action here
www.psp.wa.gov/vitalsigns/
oddly if you use the html navigation and the hit the browser back button the SWF works fine. The bug only happens when using the swf.
help!!! Please!!!
tried this out and it didn't solve the problem. The code appears to work properly, as the shell loads the movie, but it doesn't fix the bug of my flash freezing. Here's the code I used in the shell
loadMovieNum("Vitalsigns_main.swf?ver=" + Math.floor(Math.random() * 999), 1);
does this look correct?
is there anything I should be doing in my buttons that load the pages? It's so strange that linking to the same pages through html and clicking on the browser back button does not have the same effect.
Here's an example of the code I'm using in flash to link to the pages.
getURL("http://www.psp.wa.gov/vitalsigns/sound_behavior_index.php");
any help you can provide is most appreciated.
I'm having a similar issue with firefox and the back button. The flash version of my site just links together html pages with swf movies. After the back button is pressed, none of the buttons will work (sometimes, just a blank page). I've found that it is not a problem in other browsers as well as earlier versions of firefox; where the site works perfectly. The site is unfinished, but I've been stuck trying to remedy this for a week.
http://www.starnavigation.ca/Main.html
I'm looking for any new information on this issue.
I researched this and came to the conclusion that it's a bug in the latest version of firefox. I tested it on an older version (of firefox) and it worked fine. None of the work arounds I tried fixed the problem (loading into a shell, and forcing the browser to not cache). I logged it as a bug so hopefully it will get fixed in the next update. Good luck. let me know if you find anything that works.
A work-around that you can try is:
Once the Flash loads have it check the browser's user-agent, if the browser is Firefox then call a JavaScript which shifts the focus off of the Flash and onto some other DOM object, such as a link or an input field.
Example Script for in the Flash
var ua:String = ExternalInterface.call("window.navigator.userAgent.toString");
if(ua.indexOf("Firefox") > -1)
{
ExternalInterface.call("firefoxFlashFix");
}
Example JavaScript for on the Page (Note: This uses jQuery, but it doesn't have to.)
<script type="text/javascript">
function firefoxFlashFix(){
// set the focus to something other than the Flash
$(".myLink").focus();
}
</script>
I hope that works for you, it did for me. ^_^
I've switched the way I embed the swf twice since I've noticed the problem. This works for firefox...
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("myId", "9.0.115", "expressInstall.swf")
</script>
<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="925" height="1500">
<param name="movie" value="FullTop.swf" />
<object type="application/x-shockwave-flash" data="FullTop.swf" width="925" height="1500">
You can try it on my site: http://www.star-navigation.com/
You can find how-to and other info here: http://code.google.com/p/swfobject/
After encountering, and reading about this issue extensively, I have found a work-around for the Firefox Back Button/Flash-based Link incompatibility.
Apparently, Firefox uses a Back-Forward Cache (bfcache) to store the state of all web pages in the current session's history. You must disable this state-caching for your particular page, by embedding this JavaScript in the body of your HTML wrapper:
<script type="text/javascript">
window.onunload = function(){};
</script>
I have tested this for OSX Firefox 15.0.1 and Flash Plugin 11.4.402.265.
North America
Europe, Middle East and Africa
Asia Pacific