home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September (Special) / Chip-Special_2002-09_Digitalni-Video.bin / servis / wm9 / mpsetupXP.exe / RCDATA / CABINET / wmploc.DLL / 256 / TASKBAR.JS < prev    next >
Text File  |  2002-08-19  |  2KB  |  92 lines

  1. var g_kVolumeTimeout = 3000;
  2. var g_kTimerFrequency = 1000;
  3. var g_currentVolumeStatusVal = 0;
  4. var g_SetPlayPauseFocus = false;
  5.  
  6. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  7. //
  8. // OnTimer
  9. //
  10.  
  11. function OnTimer()
  12. {
  13.     if(VolumeSlider.visible)  
  14.     {
  15.         CheckVolumeVisibility();
  16.     }
  17.     else
  18.     {
  19.         view.timerInterval = 0;
  20.     }
  21. }
  22.  
  23. function CheckVolumeVisibility()
  24. {
  25.     g_currentVolumeStatusVal = g_currentVolumeStatusVal + g_kTimerFrequency;
  26.     if(g_currentVolumeStatusVal > g_kVolumeTimeout)
  27.     {
  28.         SetVolumeVisible(false);
  29.     }
  30. }
  31.  
  32. function SetVolumeVisible(bShow)
  33. {
  34.     if (bShow)
  35.     {
  36.         VolumeSlider.visible=true;
  37.         view.focusObjectID="VolumeSliderControl";
  38.         g_currentVolumeStatusVal = 0;
  39.         view.timerInterval = 0;
  40.         view.timerInterval = g_kTimerFrequency;
  41.     }
  42.     else
  43.     {
  44.         g_currentVolumeStatusVal = 0;
  45.         view.timerInterval = 0;
  46.         if (view.focusObjectID=="VolumeSliderControl")
  47.         {
  48.             view.focusObjectID="ShowVolumeButton";
  49.         }
  50.         VolumeSlider.visible=false;   
  51.     }
  52. }
  53.  
  54. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  55. //
  56. // vwPlayer_OnLoad
  57. //
  58. function vwPlayer_OnLoad()
  59. {
  60.     vwPlayer_OnPlayStateChange(player.playState);
  61. }
  62.  
  63.  
  64. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  65. //
  66. // vwPlayer_OnOpenStateChange
  67. //
  68. function vwPlayer_OnOpenStateChange(NewState)
  69. {
  70.     if (player.openState == 13)
  71.     {
  72.         Deskband.OnMediaChange();
  73.     }
  74. }
  75.  
  76.  
  77. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  78. //
  79. // vwPlayer_OnPlayStateChange
  80. //
  81. function vwPlayer_OnPlayStateChange(NewState)
  82. {
  83.     if (player.playState == 3)
  84.     {
  85.         btnPause.visible = true;
  86.     }
  87.     else
  88.     {
  89.         btnPause.visible = false;
  90.     }
  91. }
  92.