views:

561

answers:

4

I'm trying to hide some embedded flash objects without disabling them. Right now I'm placing them in a div, and using the jQuery UI hide method. The problem is, when I show the flash later using the show method, the flash reloads. Is there any way to prevent this?

Is it possible to have the flash hidden but still working in the background? To hold the position of a youtube video that was paused in the div before it was hidden for example?

A: 

Try just setting the element's style to display:none?

Amber
This doesn't help as it causes the flash to reload when the display is changed back.
stringo0
+1  A: 

You could either wrap it in a div and set that div's display to none or it's height to zero - I believe that if you set display:none on the actual object where the flash lives, it won't render the flash content. I could be wrong though.

inkedmn
+2  A: 

Try this CSS:

embed.hidden {
    position: absolute;
    left: -10000px;
}

Then to unhide it, you just need to remove the class "hidden"

nickf
Will look into this solution - thanks!
stringo0
+2  A: 

Answer from nick is corret BUT watch out for wmode. If set to transparent the browser definitely will stop its execution (music, local connection, network, etc) and might also restart the movie.

Caused me some headaches in the past : )

Zárate
Thanks! I did have wmode on! :P
stringo0