The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> JavaScript Development
|
Flickering HTML in Internet Explorer 6.0, InnerHTML and Flash used
Discuss Flickering HTML in Internet Explorer 6.0, InnerHTML and Flash used in the JavaScript Development forum on Dev Shed. Flickering HTML in Internet Explorer 6.0, InnerHTML and Flash used JavaScript Development forum discussing JavaScript and DHTML, AJAX, and issues such as coding cross-browser JavaScript.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

October 12th, 2006, 08:39 AM
|
 |
Awake and listening...
|
|
Join Date: Feb 2001
Location: Berlicum, the Netherlands
Posts: 127
Time spent in forums: 1 Day 7 h 35 m 38 sec
Reputation Power: 13
|
|
|
Flickering HTML in Internet Explorer 6.0, InnerHTML and Flash used
I have a div called 'dynloadarea_swf'. This div is altered by the function showVideo. These swf video's are loaded into the div, but each time I do this, the screen in internet explorer flickers.
See my following javascript function:
PHP Code:
function showVideo(id){
var content="";
if(id==1){
content='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="399" height="259"><param name="movie" value="video/proostwetering.swf"><param name="quality" value="high"><embed src="video/proostwetering.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="399" height="259"></embed></object>';
document.getElementById('dynloadarea_swf').innerHTML=content;
}
if(id==2){
content='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="399" height="259"><param name="movie" value="video/snelweg.swf"><param name="quality" value="high"><embed src="video/snelweg.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="399" height="259"></embed></object>';
document.getElementById('dynloadarea_swf').innerHTML=content;
}
if(id==3){
content='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="399" height="259"><param name="movie" value="video/theWall_Film02b.swf"><param name="quality" value="high"><embed src="video/theWall_Film02b.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="399" height="259"></embed></object>';
document.getElementById('dynloadarea_swf').innerHTML=content;
}
if(id==4){
content='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="399" height="259"><param name="movie" value="video/theWall_Film02c.swf"><param name="quality" value="high"><embed src="video/theWall_Film02c.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="399" height="259"></embed></object>';
document.getElementById('dynloadarea_swf').innerHTML=content;
}
if(id==5){
content='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="399" height="259"><param name="movie" value="video/theWall_Film04.swf"><param name="quality" value="high"><embed src="video/theWall_Film04.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="399" height="259"></embed></object>';
document.getElementById('dynloadarea_swf').innerHTML=content;
}
}
Does anybody know what is causing this? If I use innerHTML and just alter a little bit of text, it doesn't flicker.
And more important, does anybody has a solution for this problem?
__________________
People who get a raise because of their good work have been underpayed for quite some time.
|

October 12th, 2006, 10:13 AM
|
 |
Contributing User
|
|
Join Date: Aug 2004
Location: Tucson, Sonora
|
|
|
I think the basic answer is that IE just sucks.
Since everything else about your <object> is consistent, why not just change the src attribute using JavaScript instead of redoing the tag?
if (id==1) document.getElementById("yourObject").src = "yourMovie.swf";
<object codebase="garbage" id="yourObject" src="notYourMovie.swf">
Or am I missing something?
|

October 12th, 2006, 10:28 AM
|
 |
Awake and listening...
|
|
Join Date: Feb 2001
Location: Berlicum, the Netherlands
Posts: 127
Time spent in forums: 1 Day 7 h 35 m 38 sec
Reputation Power: 13
|
|
I think your solution probably will do the trick, but I have used another solution.
I have used the ufo script to load the different swf movies, wich replaces the content of the div (see the following url: ( http://www.bobbyvandersluis.com/ufo/ )
If I use this script I have 1 solution for 2 problems:
1) I am not experiencing any flickering
2) I don't have to click on the swf to interact with the flashobject.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|