home *** CD-ROM | disk | FTP | other *** search
/ Minami 48 / MINAMI48.ISO / Extra / MPSetup.exe / 1033 / RCDATA / CABINET / wmploc.DLL / 256 / FLYOUT.JS < prev    next >
Text File  |  2002-12-14  |  2KB  |  85 lines

  1. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  2. //
  3. //
  4. // vwPlayer
  5. //
  6. //
  7. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  8.  
  9.  
  10. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  11. //
  12. // vwPlayer_SelectVideoOrVis
  13. //
  14. function vwPlayer_SelectVideoOrVis( fForce )
  15. {
  16.     if ( ( player.openState == 13 ) || ( fForce ) )
  17.     {
  18.         var vid = false;
  19.         try
  20.         {
  21.             vid = (player.currentMedia.imageSourceWidth > 0) && (player.currentMedia.imageSourceHeight > 0);
  22.         }
  23.         catch(err){}
  24.         
  25.         if (vid)
  26.         {
  27.             svwVis.visible = false;
  28.             svwVideo.visible = true;
  29.         }
  30.         else
  31.         {
  32.             SynchEffectColor();
  33.             svwVis.visible = true;
  34.             svwVideo.visible = false;
  35.         }
  36.     }
  37. }
  38.  
  39. function SynchEffectColor()
  40. {
  41.     try
  42.     {
  43.         if (ctrlVis.currentEffectType=="Bars") 
  44.         {
  45.             if ( (ctrlVis.currentPreset==1) || (ctrlVis.currentPreset==2) )
  46.             {
  47.                 //ignore Ocean Mist and Fire Storm
  48.                 return;
  49.             }
  50.             else
  51.             {
  52.                 var bars = ctrlVis.currentEffect;
  53.                 bars.levelColor = mediacenter.itemPlayingColor;
  54.                 bars.peakColor  = mediacenter.appColorLight;
  55.             }
  56.         }
  57.         else
  58.         {
  59.             //give all viz'es a chance to synch the color
  60.             ctrlVis.currentEffect.foregroundColor = mediacenter.itemPlayingColor;
  61.         }
  62.     }
  63.     catch(err){}
  64. }
  65.  
  66.  
  67.  
  68. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  69. //
  70. // vwPlayer_OnLoad
  71. //
  72. function vwPlayer_OnLoad()
  73. {
  74.     vwPlayer_SelectVideoOrVis( true );
  75. }
  76.  
  77.  
  78. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  79. //
  80. // vwPlayer_OnOpenStateChange
  81. //
  82. function vwPlayer_OnOpenStateChange(NewState)
  83. {
  84.     vwPlayer_SelectVideoOrVis( false );
  85. }