JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 12th, 2006, 08:39 AM
WeXXL's Avatar
WeXXL WeXXL is offline
Awake and listening...
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Berlicum, the Netherlands
Posts: 127 WeXXL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #2  
Old October 12th, 2006, 10:13 AM
bocmaxima's Avatar
bocmaxima bocmaxima is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2004
Location: Tucson, Sonora
Posts: 1,371 bocmaxima User rank is Sergeant Major (2000 - 5000 Reputation Level)bocmaxima User rank is Sergeant Major (2000 - 5000 Reputation Level)bocmaxima User rank is Sergeant Major (2000 - 5000 Reputation Level)bocmaxima User rank is Sergeant Major (2000 - 5000 Reputation Level)bocmaxima User rank is Sergeant Major (2000 - 5000 Reputation Level)bocmaxima User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Days 51 m 34 sec
Reputation Power: 50
Send a message via AIM to bocmaxima
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?

Reply With Quote
  #3  
Old October 12th, 2006, 10:28 AM
WeXXL's Avatar
WeXXL WeXXL is offline
Awake and listening...
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Berlicum, the Netherlands
Posts: 127 WeXXL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Flickering HTML in Internet Explorer 6.0, InnerHTML and Flash used

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap