Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder BatCountry's Avatar
    Join Date
    Jul 2007
    Location
    McMaynerberry, Texas
    Posts
    57
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Javascript causes screen to flicker

    I don't really have an example I can show, but for some reason whenever I try to update a div with a countdown from a set number, it appears to cause a windows media player embed that I have embedded on the same page to flicker on and off.
    Code:
    <center>
          <OBJECT id='mediaPlayer' width="320" height="285" 
          classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' 
          codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
          standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
          <param name='fileName' value="http://www.bordergatewayprotocol.net/jon/humor/video/FamilyGuyTruth.mpg">
          <param name='animationatStart' value='true'>
          <param name='transparentatStart' value='true'>
          <param name='autoStart' value="true">
          <param name='showControls' value="true">
          <param name='loop' value="true">
          <EMBED type='application/x-mplayer2'
            pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
            id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' 
            bgcolor='darkblue' showcontrols="true" showtracker='-1' 
            showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285"
            src="some.wmv" autostart="true" designtimesp='5311' loop="true">
    
          </EMBED>
          </OBJECT>
    <br /><br />
    <div id="testing">0</div>
    <script type="text/JavaScript">
    function update(){
    	document.getElementById('testing').innerHTML=parseInt(document.getElementById('testing').innerHTML)+1;
    	setTimeout('update()',1000);
    }
    update();
    </script>
    </center>
    That's just a mockup I did to give a better idea (http://hobohost.prophp.org/index.html).

    I couldn't get the test to appear as close to what I have in my test development, but is there a way to avoid this flickering - is there a set command for media player or a workaround to stop or reduce the flickering (besides increasing the settimeout counter)?

  • #2
    Regular Coder
    Join Date
    Jun 2008
    Posts
    102
    Thanks
    6
    Thanked 9 Times in 9 Posts
    My screen doesn't flicker in FF or IE6. Maybe your comp is slow or something.

  • #3
    Regular Coder
    Join Date
    Nov 2007
    Location
    Leeds, UK
    Posts
    514
    Thanks
    24
    Thanked 19 Times in 19 Posts
    mine dosent in IE7 - it might just be lack of ram for javascript to run so it is using swap so it is slower

  • #4
    New Coder BatCountry's Avatar
    Join Date
    Jul 2007
    Location
    McMaynerberry, Texas
    Posts
    57
    Thanks
    5
    Thanked 0 Times in 0 Posts
    I was trying to replicate the problem but the example I posted works fine for me. Perhaps I should try bogging it down to see whether it's my own problem or whether it was a JC flickering problem.

    BTW I witnessed the problem only in Firefox. And after the counter stops, it stops flickering.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •