none
How place Media Player javascript event in external .js file RRS feed

  • Question

  • How to place an event in the Windows Media Player in a external .js file?

    CODE:

    <SCRIPT Language = "JScript" FOR = "MediaPlayer"
     EVENT = "OpenStateChange(NewState)">

        switch(NewState)
        {
            // Media object open.
            case 13:
                mudou_musica();
                break;
            default:
                break;
        }
    </script>

    <SCRIPT FOR = MediaPlayer EVENT = buffering(Start)>
       var idI; // Variable for the interval id.

       // Test whether buffering has started or stopped.
       if (true == Start){
          // Start the timer. Call the function to update the display every second.
          idI = window.setInterval("UpdateBP()", 1000);
       }

       else{
          // Buffering is complete. Stop the timer.
          window.clearInterval(idI);
       }
    </SCRIPT>

    Tuesday, March 24, 2009 1:59 PM