IT Community - Software Programming, Web Development and Technical Support

Remove flash in html page using swfobject.js

This is a discussion on Remove flash in html page using swfobject.js within the Flash Actionscript Programming forums, part of the Web Development category; Hi, Can any one help me. Does SWFObject have a method to remove the Flash from a defined div? I ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Flash Actionscript Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-21-2007, 05:13 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Remove flash in html page using swfobject.js

Hi,

Can any one help me.

Does SWFObject have a method to remove the Flash from a defined div? I am wanting to call a function, using ExternalInterface, that will remove the calling content. Or, alternatively, anyone know a way in JavaScript to clear a div?


thanks in advance
__________________
The OXYGEN
Delivers edgy, intelligent Technology to all...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-21-2007, 05:17 AM
aramesh aramesh is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 72
aramesh is on a distinguished road
Default Re: Remove flash in html page using swfobject.js

Hi,
SWFObject has a built-in method named "deconcept.SWFObjectUtil.cleanupSWF", but i'm not sure that it's appropriate for your needs. (Geoff? Aran?)

a simple way to clear a SWF is to use innerHTML to replace the DIV's content.

if you want to use a function, you could try something like:


function removeDivContent(targetDiv){
var div = document.getElementById(targetDiv);
div.innerHTML = "";
}


or


function replaceDivContent(targetDiv, newContent){
var div = document.getElementById(targetDiv);
div.innerHTML = newContent;
}


if you're familiar with DOM scripting, you could also use removeChild() to delete the DIV itself. something like:


function deleteNode(targetDiv){

var div = document.getElementById(targetDiv);

if(div){
var p = div.parentNode;
p.removeChild(div);
}

}


Bye
<aramesh>
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If any possible for Html page encrypt sathian HTML, CSS and Javascript Coding Techniques 1 12-03-2007 08:52 PM
How to change aspx page to html page? S.Vinothkumar ASP and ASP.NET Programming 4 10-26-2007 11:46 PM
Animated Index html Using Flash aramesh Flash Actionscript Programming 0 09-07-2007 08:06 AM
Display html files in Flash oxygen Flash Actionscript Programming 1 07-19-2007 12:54 AM
How to Open a HTML file inside Flash Balasubramanian.S Flash Actionscript Programming 8 03-28-2007 09:54 AM


All times are GMT -7. The time now is 09:38 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0