Q:

Hiding/showing SWF object in Opera and Chrome restarts the SWF

For example, hiding a simple youtube <object> embed with
document.getElementById('youtube').style.display = 'block';
document.getElementById('youtube').style.display = 'none';

forces the SWF to restart. 
Why is that happening? Anyone know a way around?
I'm using a custom Flash uploader in tabbed <div>s and switching tabs resets the uploader resulting in the file selection to be reset too...

A:

When you set display to none, it is essentially removed from the page.  While this is not true for the DOM, it can be true for the implementation of the browser.
Particularly for Flash, I've noticed that if it isn't visible, it won't always run.  If you need it to continue running, try setting its size to 1x1 or moving it off-screen.

