home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 February / Chip_2004-02_cd1.bin / opsys / wmakeup / downloads / Science.wmz / science.js < prev    next >
Text File  |  2000-09-21  |  2KB  |  142 lines

  1. var bVisActive = false;
  2. var bShowViz = false;
  3.  
  4.  
  5. function showInfo()
  6. {
  7.  
  8.     var cm = player.currentmedia;
  9.     var author, title, copy;
  10.     
  11.     author = cm.getItemInfo('#author');
  12.     if (author == "") {
  13.         author = cm.getItemInfo('author');
  14.     }
  15.     title = cm.name;
  16.  
  17.     txtShow.value = player.currentplaylist.name;
  18.     txtClip.value = title;
  19.     txtClip2.value = title;
  20.     txtAuthor.value = author;
  21.     txtAuthor2.value = author;
  22. }
  23.  
  24. function checkVid(){
  25.     var cm = player.currentmedia;
  26.     if (cm.imageSourceHeight >0) {
  27.         showVideo();
  28.         dropScreen();
  29.     } else {
  30.         if (bShowViz == true) {
  31.             dropScreen();
  32.             showViz();
  33.         } else {
  34.             raiseScreen();
  35.         }
  36.     }
  37. }
  38.  
  39. function dropScreen(){
  40.     sbvScreen.moveTo(sbvScreen.left,56,150);
  41.     visEffects.visible = false;
  42. }
  43.  
  44. function raiseScreen(){
  45.     vis1.visible=false;
  46.     pl1.visible=false;
  47.     vid1.visible=false;
  48.  
  49.     btnVS.down = false;
  50.     btnPL.down = false;
  51.     sbvScreen.moveTo(sbvScreen.left,-184,150);
  52.     visEffects.visible = true;
  53. }
  54.  
  55. function toggleScreen(){
  56.  
  57.     if (sbvScreen.top == 56) {
  58.         raiseScreen();
  59.     } else {
  60.         dropScreen();
  61.     }
  62. }
  63.  
  64. function togglePL(){
  65.     btnVS.down=false;
  66.     if (pl1.visible ==true) {
  67.         pl1.visible=false;
  68.         btnPL.down=false;
  69.         raiseScreen();
  70.     } else {
  71.         showPL();
  72.         btnPL.down=true;
  73.         dropScreen();
  74.     }
  75.  
  76. }
  77.  
  78. function toggleVS(){
  79.     btnPL.down=false;
  80. //    if ((vid1.visible==true)||(vis1.visible==true)) {
  81. //    if (sbvScreen.top > 0) {
  82.     if ((vid1.visible==true) || (vis1.visible==true)) {
  83.         bVisActive = false;
  84.         vid1.visible=false;
  85.         vis1.visible=false;
  86.         pl1.visible=false;
  87.         btnVS.down=false;
  88.         bShowViz = false;
  89.         raiseScreen();
  90.     } else {
  91.         dropScreen();
  92.         bVisActive = true;
  93.         btnVS.down=true;
  94.         if (player.currentMedia.imageSourceHeight > 0) {
  95.             showVideo();
  96.         } else {
  97.             bShowViz = true;
  98.             showViz();
  99.         }
  100.     }
  101. }
  102.  
  103. function showVideo(){
  104.     btnVS.down=true;
  105.     vid1.visible=true;
  106.     vis1.visible=false;
  107.     pl1.visible=false;
  108.     bVisActive=true;
  109. }
  110.  
  111. function showViz(){
  112.     vid1.visible=false;
  113.     vis1.visible=true;
  114.     pl1.visible=false;
  115.     bVisActive=false;
  116. }
  117.  
  118. function showPL(){
  119.     vid1.visible=false;
  120.     vis1.visible=false;
  121.     pl1.visible=true;
  122. }
  123.  
  124. function openStateChange()
  125. {
  126.     showInfo();
  127.     checkVid();
  128. }
  129.  
  130. function OnLoad(){
  131.     reInit();
  132.     checkVid();
  133. }
  134.  
  135.  
  136. function reInit()
  137. {
  138.     showInfo();
  139. }
  140.  
  141.  
  142.