Removing/Replacing SWF content.

1 view
Skip to first unread message

TeckniX

unread,
May 16, 2008, 11:30:27 AM5/16/08
to SWFObject
I'm pretty new to the SWFObject, but already like a lot of the
flexibility.

I'm trying to remove an SWF object added dynamically but cannot for
some reason do so. i've tried to simply remove the innerHTML content
of the div, without any success.

I've used the createSWF example found in the api documentation and
simply added the following:

function changeID(yes){
if(yes){
alert("Removing flash...");

document.getElementById('replaceMe').innerHTML="";
}
else{
fn();
}

}


and then below the script tags..
<span onClick="javascript:changeID(true);" style="cursor:
pointer">Remove flash</span><br><br>
<span onClick="javascript:changeID(false);" style="cursor:
pointer">Add flash</span>


This doesn't seem to work at all and I couldn't find a 'destroySWF' or
something similar for the dynamically loaded flash files.

So how could this be done? Or I guess what is the correct way of doing
this?

Bobby

unread,
May 16, 2008, 4:45:09 PM5/16/08
to SWFObject
Explicit removeSWF() functionality is currently missing and will be
added in version 2.1.

An uncompressed beta version that includes this functionality is
already available in SVN. You can read all about it in:
- http://groups.google.com/group/swfobject/browse_thread/thread/32b6ab23314fd1d6/5a878b078dabda04?lnk=gst&q=beta#5a878b078dabda04
- http://code.google.com/p/swfobject/issues/detail?id=76

If you would like to help beta testing and give it a whiz, please be
our guest; we love to hear your feedback.

TeckniX

unread,
May 17, 2008, 6:31:15 AM5/17/08
to SWFObject
Glad to hear you guys are already working on it - I'll be more than
happy to beta test it and will provide all the feedback I can think
of :)

Thank you for the prompt response!

On May 16, 4:45 pm, Bobby <bobbyvandersl...@gmail.com> wrote:
> Explicit removeSWF() functionality is currently missing and will be
> added in version 2.1.
>
> An uncompressed beta version that includes this functionality is
> already available in SVN. You can read all about it in:
> -http://groups.google.com/group/swfobject/browse_thread/thread/32b6ab2...
> -http://code.google.com/p/swfobject/issues/detail?id=76
Reply all
Reply to author
Forward
0 new messages