SWFObject is amazing for a simple solution to embedding flash. Is it possible to embed a swf and then have a button call some javascript that unloads/rewrites the content of that <div> to point to a different swf. I tried simply creating another SWFObject and just writing it to the same <div>, however it doesn't seem to work so easily. I was hoping there might be an unload swf function that I could call first before trying so.write() again.
...Update... Apparently just creating a new SO and writing it to the same div works in IE but not Firefox... My question still remains, if there is an unload functions I could call first?, but I thought I would let people know... Thanks again
well it *should* just work by creating a new SWFObject and writing it to the same div, but some browsers have issues with handling the plugins that way, and you may get memory leaks, or strange behavior with the old swfs hanging around...
the recommended way to replace a swf with another is to use an iframe, and just load a new page with a new swf into the iframe.