Quantcast
Channel: NoobFlash
Viewing all articles
Browse latest Browse all 11

SWF CSS Display Change Causes Reload in Firefox and Chrome

$
0
0

Ran into an interesting issue today. Apparently if you’re using display:none to toggle the visibility of a flash (swf) file, it will reload the content once the display is changed from none to another value (block in my case). This apparently only happens in Firefox and Chrome. This generally isn’t an bandwidth problem since swf files are cached in the browser and re-loaded from there, but it would cause issues if your swf content had any type of application properties or needs to maintain state.

The solution appears to be to use visibility:hidden instead of display:none, but I realize that is not a cross-browser solution for IE. If this is causing an issue for you, you might need to use an !important tag or two here to get IE to work properly. Anyone have a more elegant solution?

Side note: You’ll also notice that IE loads all swf objects that are set to display:none on page load, while Firefox and Chrome do not.


Viewing all articles
Browse latest Browse all 11

Trending Articles