home *** CD-ROM | disk | FTP | other *** search
/ Minami 79 / MINAMI79.iso / Extra / MPSetup.exe / 1033 / RCDATA / CABINET / wmploc.DLL / 256 / TASKBAR.JS < prev    next >
Text File  |  2002-12-14  |  2KB  |  101 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.         var HTMLView = Deskband.getHTMLViewURL(player);
  73.         
  74.         if ( (HTMLView != "") && (theme.loadPreference("LastHTMLView") != HTMLView ) )
  75.         {
  76.             theme.savePreference("LastHTMLView", HTMLView);
  77.             Deskband.RestorePlayer();
  78.             return;
  79.         }        
  80.         
  81.         Deskband.OnMediaChange();
  82.     }
  83. }
  84.  
  85.  
  86. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  87. //
  88. // vwPlayer_OnPlayStateChange
  89. //
  90. function vwPlayer_OnPlayStateChange(NewState)
  91. {
  92.     if (player.playState == 3)
  93.     {
  94.         btnPause.visible = true;
  95.     }
  96.     else
  97.     {
  98.         btnPause.visible = false;
  99.     }
  100. }
  101.