Yes, this is because the SWF *replaces* html content. Then removeSWF 
actually *removes* the SWF. removeSWF() is not an "undo" of createSWF(). 
These are one-way actions, meaning after you do them in sequence, there's no 
"going back" to the DOM the way it was before.

So, to add another SWF in its place, you'll need to create another hook for 
the swf to replace on the next call of createSWF/embedSWF.

You could also check out other helper libraries that do some of this stuff 
for you, if you don't want to do that coding yourself. I run a project 
called CheckPlayer ( http://checkplayer.flensed.com ) that actually gives 
you options of "appending" a SWF as a child of a container, which means you 
can call it as many times as you want and not need to recreate DOM elements 
for it to replace. What CheckPlayer does in that mode of operation is create 
dummy elements for you, before passing the call on to createSWF to replace 
it.

So, you can code that logic yourself, or use someone else's code. Those are 
your best options. Hope that helps.

--Kyle



--------------------------------------------------
From: "kunal" <[email protected]>
Sent: Monday, March 23, 2009 2:40 AM
To: "SWFObject" <[email protected]>
Subject: embedding swf file

>
> Hi
>    I am embedding swf file using SWFObject.createSWF() in html. Its
> working. Then i remove
> that Swf on button click event uisng SWFObject.removeSWF(). This also
> works.
> Now i want to load agian without loading html. Its giving error null
> is null or not an object
>
> help me
> Thanks
> >
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to