home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 October / Chip_2004-10_cd1.bin / opsys / wmakeup / downloads / Millennium.wmz / Millennium.js < prev    next >
Encoding:
Text (UTF-16)  |  2004-07-13  |  32.2 KB  |  594 lines

  1. /*
  2.     Created By Flashpoint Media, LTD.
  3.     Millennium
  4. */
  5.  
  6. //Nav Bar Functions
  7.  
  8. function openEqView(){
  9.     theme.openView('eqView');
  10. }
  11.  
  12. function openInfo(){
  13.     //player.controls.stop();
  14.     infoWindow.visible=true;
  15.     
  16. }
  17.  
  18. function closeInfo(){
  19.     //player.controls.stop();
  20.     infoWindow.visible=false;
  21.     
  22. }
  23.  
  24. function setMainPlay()
  25.     {
  26.     play_button.enabled=false;
  27.     stop_button.enabled=true;
  28.     pause_button.enabled=true;
  29.     vis_prev_button.visible=true;
  30.     vis_next_button.visible=true;    
  31.     infoWindow.visible=false;
  32.     displayMaindata.top="0";
  33.     closeCastCrew();
  34.     closePhotos();
  35.     if(player.controls.isAvailable('fastReverse')){rewind_button.enabled=true;}
  36.     if(player.controls.isAvailable('fastForward')){fastforward_button.enabled=true;}
  37.     if(player.controls.isAvailable('next')){next_button.enabled=true;}else{next_button.enabled=false;}
  38.     if(player.controls.isAvailable('previous')){prev_button.enabled=true;}else{prev_button.enabled=false;}    
  39. }
  40.  
  41. function setVideoPlay()
  42.     {
  43.     videoFrame.visible=true;
  44.     vidInfo.visible=false;
  45.     vid_play_button.enabled=false;
  46.     vid_stop_button.enabled=true;
  47.     vid_pause_button.enabled=true;
  48.     if(player.controls.isAvailable('fastReverse')){vid_rewind_button.enabled=true;}
  49.     if(player.controls.isAvailable('fastForward')){vid_fastforward_button.enabled=true;}
  50.     if(player.controls.isAvailable('next')){vid_next_button.enabled=true;}else{vid_next_button.enabled=false;}
  51.     if(player.controls.isAvailable('previous')){vid_prev_button.enabled=true;}else{vid_prev_button.enabled=false;}    
  52. }
  53.  
  54. function playVidVideo(){
  55.     
  56.     player.controls.play();
  57.     setVideoPlay();
  58.  
  59. }
  60.  
  61. function setMainStop()
  62.     {
  63.     togglePlayDrawer('up');
  64.     stop_button.enabled=false;
  65.     play_button.enabled=true;
  66.     pause_button.enabled=false;
  67.     rewind_button.enabled=false;
  68.     fastforward_button.enabled=false;
  69.     visFrame.visible=false;
  70.     visEffects.visible = false;
  71.     vis_prev_button.visible=false;
  72.     vis_next_button.visible=false;    
  73.     displayMaindata.top="214";
  74.     //openInfo();
  75. }
  76.  
  77. function stopVidVideo()
  78.     {
  79.     vid_stop_button.enabled=false;
  80.     vid_play_button.enabled=true;
  81.     vid_pause_button.enabled=false;
  82.     vid_rewind_button.enabled=false;
  83.     vid_fastforward_button.enabled=false;
  84.     player.controls.stop();
  85.     //videoFrame.visible=false;
  86.     //vidInfo.visible=true;
  87. }
  88.  
  89. function pauseMainVideo()
  90.     {    
  91.     pause_button.enabled=false;
  92.     rewind_button.enabled=false;
  93.     fastforward_button.enabled=false;
  94.     play_button.enabled=true;
  95.     player.controls.pause();
  96. }
  97.  
  98. function pauseVidVideo()
  99.     {    
  100.     vid_pause_button.enabled=false;
  101.     vid_rewind_button.enabled=false;
  102.     vid_fastforward_button.enabled=false;
  103.     vid_play_button.enabled=true;
  104.     player.controls.pause();
  105. }
  106.  
  107. function rewMainVideo()
  108.     {    
  109.     pause_button.enabled=false;
  110.     rewind_button.enabled=false;
  111.     if (player.controls.isAvailable('fastForward')){fastforward_button.enabled=true;}
  112.     play_button.enabled=true;
  113.     player.controls.fastReverse();
  114. }
  115.  
  116. function rewVidVideo()
  117.     {    
  118.     vid_pause_button.enabled=false;
  119.     vid_rewind_button.enabled=false;
  120.     if (player.controls.isAvailable('fastForward')){vid_fastforward_button.enabled=true;}
  121.     vid_play_button.enabled=true;
  122.     player.controls.fastReverse();
  123. }
  124.  
  125. function ffMainVideo()
  126.     {    
  127.     pause_button.enabled=false;
  128.     if (player.controls.isAvailable('fastReverse')){rewind_button.enabled=true;}
  129.     fastforward_button.enabled=false;
  130.     play_button.enabled=true;
  131.     player.controls.fastForward();
  132. }
  133.  
  134. function ffVidVideo()
  135.     {    
  136.     vid_pause_button.enabled=false;
  137.     if (player.controls.isAvailable('fastReverse')){vid_rewind_button.enabled=true;}
  138.     vid_fastforward_button.enabled=false;
  139.     vid_play_button.enabled=true;
  140.     player.controls.fastForward();
  141. }
  142.  
  143. function playVideo()
  144.     {
  145.     player.controls.play();
  146. }
  147.     
  148.  
  149. function openPlaylist(){
  150.      theme.openView('playListView');
  151. }
  152.  
  153. function openCastCrew(){
  154.     infoWindow.visible=false;
  155.     castCrewWindow.visible=true;
  156.     photosWindow.visible=false;
  157.     bios.visible=true;
  158.     textUp.visible=true;
  159.     textDown.visible=true;
  160.     nextCast.visible=true;
  161. }
  162.  
  163. function textMove(direction){
  164.  
  165.     if(direction=="down"){
  166.     
  167.         if(bios.top>(0-(bios.height-40))){bios.moveTo(78,bios.top-60,200)}
  168.         
  169.         }else{
  170.         if(bios.top<=340){bios.moveTo(78,bios.top+60,200)}
  171.         
  172.         }
  173.  
  174. }
  175.  
  176. function closeCastCrew(){
  177.      castCrewWindow.visible=false;
  178.      bios.visible=false;
  179.      textUp.visible=false;
  180.      textDown.visible=false;
  181.      nextCast.visible=false;
  182. }
  183.  
  184. function openPhotos(){
  185.     infoWindow.visible=false;
  186.     castCrewWindow.visible=false;
  187.     photosWindow.visible=true;
  188.     photos.visible=true;
  189.     photo_prev_button.visible=true;
  190.     photo_next_button.visible=true;     
  191. }
  192.  
  193. function closePhotos(){
  194.     photosWindow.visible=false;
  195.     photos.visible=false;
  196.     photo_prev_button.visible=false;
  197.     photo_next_button.visible=false;     
  198. }
  199.     
  200. function openFile(media){
  201.     if(media=='file')media = theme.openDialog('FILE_OPEN','FILES_ALLMEDIA');
  202.     if(media)
  203.     {
  204.         player.URL = media;
  205.         player.controls.play();
  206.     }
  207. }
  208.     
  209.     
  210.  
  211. function closeView(){
  212.     //msgBox.visible=true;
  213.     
  214.     view.close();
  215. }
  216.  
  217. function mainStartup(){
  218.     loadVisPrefs();
  219.     updateMetadata('status');
  220.     
  221. }
  222.  
  223. function mainShutDown(){
  224.     saveVisPrefs();
  225.     
  226. }
  227.  
  228. function saveVisPrefs(){
  229.     //themeSavePrefence("visualsEffects", visEffects.currentEffectType);
  230.     //themeSavePrefence("visualsPreset", visEffects.currentPreset);
  231. }
  232.  
  233. function loadVisPrefs(){
  234.     //themeSavePrefence(visEffects.currentEffectType, "visualsEffects");
  235.     //themeSavePrefence(visEffects.currentPreset, "visualsPreset");
  236. }
  237.  
  238. function openView(id){
  239.     theme.openView( id );
  240. }
  241.  
  242. function closeVideoView(){
  243.      player.controls.stop();
  244.      view.close();
  245.      
  246. }
  247.  
  248. function loadVideoView(){
  249.     updateVideoMetadata();
  250.     setVideoPlay();
  251. }
  252.  
  253. function togglePlayDrawer(how){
  254.  
  255. switch(how){
  256.  
  257.     case "up":
  258.         playDrawer.moveTo(0,150,500);
  259.         playDrawerFrame.visible = true;
  260.         playDrawerButton.down = false;
  261.         playdrawerStatus = true;
  262.         break;
  263.     
  264.     
  265.     case "down":
  266.         playDrawer.moveTo(0,346,500);
  267.         playDrawerFrame.visible = true;
  268.         playDrawerButton.down = true;
  269.         playdrawerStatus = true;
  270.         break;
  271.         
  272.     case "toggle":
  273.         if(playDrawer.top == "346"){
  274.         
  275.         playDrawer.moveTo(0,150,500);
  276.         playDrawerFrame.visible = true;
  277.         playDrawerButton.down = false;
  278.         playdrawerStatus = true;
  279.         }else{
  280.         playDrawer.moveTo(0,346,500);
  281.         playDrawerFrame.visible = true;
  282.         playDrawerButton.down = true;
  283.         playdrawerStatus = true;            
  284.  
  285.             }
  286.         break;        
  287.     
  288.  
  289.     }
  290.  
  291. }
  292.  
  293.  
  294. function saveVidSize(){
  295.  
  296.     vidControls.left= (view.width/2)-125;
  297.     vidControls.top= view.height-158;
  298.     vidControls.top= view.height-158;
  299.    
  300. }
  301.  
  302. function displayVisText(){
  303.     visEffectsText.visible = true;
  304.     visEffectsText.value = visEffects.currentEffectTitle + ": " + visEffects.currentPresetTitle;
  305.     visEffectsText.left=(view.width/2)-(visEffectsText.textWidth/2)
  306.     visFrame.timerInterval = "4000"
  307.     saveVisPrefs();
  308. }
  309.  
  310. function hideVisText(){
  311.     visEffectsText.visible = false;
  312.     visFrame.timerInterval = "0"
  313. }
  314.  
  315.     
  316. function checkPlayerState(){
  317.     if (player){
  318.         
  319.         switch (player.playState){
  320.         
  321.             case 1:  //media stop
  322.                 
  323.                 if(!player.currentMedia.ImageSourceWidth>0){
  324.                 setMainStop();
  325.                 }else{
  326.                 stopVidVideo();
  327.                 }                
  328.                     
  329.                 break;                
  330.             
  331.             case 3:     //playing
  332.                 
  333.                 
  334.                 if(!player.currentMedia.ImageSourceWidth>0){
  335.                     setMainPlay();
  336.                     visFrame.visible=true;
  337.                     visEffects.visible = true;    
  338.                     mainview.timerInterval="4000";
  339.                     
  340.                     visEffectsText.visible = true;
  341.                     
  342.                     togglePlayDrawer('down');
  343.                     }else{
  344.                     
  345.                     theme.openView('videoView');
  346.                     
  347.                     }
  348.                 //playListView.visible=false;
  349.                 break;
  350.                 
  351.             case 8:  //media end
  352.                 
  353.                 if(!player.currentMedia.ImageSourceWidth>0){
  354.                 setMainStop();
  355.                 }else{
  356.                 stopVidVideo();
  357.                 }
  358.                 
  359.                 
  360.                 break;            
  361.             }
  362.         }
  363. }
  364.  
  365.  
  366. function setMainView(){
  367.     infoWindow.visible=true;
  368. }
  369.  
  370. function goThere(where){
  371. player.launchURL(where)
  372. }
  373.  
  374. function launchBPC(){
  375. player.launchURL('http://www.broadcastpc.tv/tools/redir.php?link=1&mid=83')
  376. }
  377.  
  378. function updateVideoMetadata(){
  379.     viddata.value = player.currentMedia.getItemInfo("author");
  380.     viddata.value += player.currentmedia.name;
  381. }
  382.  
  383. function updateMetadata(type){
  384.     if("status"==type){
  385.         //if(player.openState!=13) return;
  386.  
  387.         var metaAuthor = player.currentMedia.getItemInfo("author");
  388.  
  389.         if (metaAuthor != "") {
  390.             metaAuthor += " - ";
  391.         }
  392.  
  393.         metadata.value = player.status;
  394.  
  395.         if (metadata.value != "") {
  396.             metadata.value += " - ";
  397.         }
  398.  
  399.         metadata.value = metaAuthor;
  400.         displaydata.value = metaAuthor;
  401.         displayMaindata.value = metaAuthor;
  402.     }else if("playlist"==type){
  403.         //if(player.currentPlaylist.count==0) return;
  404.  
  405.         var metaAuthor = player.currentMedia.getItemInfo("author");
  406.  
  407.         if (metaAuthor != "") {
  408.             metaAuthor += " - ";
  409.         }
  410.  
  411.         if(player.openState!=13){
  412.             metadata.value = metaAuthor;
  413.             displaydata.value = metaAuthor;
  414.             displayMaindata.value = metaAuthor;
  415.         }
  416.     }else{
  417.         metadata.value = player.status;
  418.         displaydata.value = player.status;
  419.         displayMaindata.value = player.status;
  420.         metadata.scrolling = (metadata.textWidth>metadata.width);
  421.         displaydata.scrolling = (displaydata.textWidth>metadata.width);
  422.         displayMaindata.scrolling = (displaydata.textWidth>metadata.width);
  423.         return;
  424.     }
  425.  
  426.     metadata.value = player.status;
  427.     displaydata.value += player.currentmedia.name;
  428.     displayMaindata.value += player.currentmedia.name;
  429.     metadata.scrolling = (metadata.textWidth>metadata.width);
  430.     displaydata.scrolling = (displaydata.textWidth>metadata.width);
  431.     displayMaindata.scrolling = (displaydata.textWidth>metadata.width);
  432.  
  433. }
  434.  
  435.  
  436. function gonextCast(){
  437.     switch (castcrewbackground.image){
  438.  
  439.         case "lance.gif":
  440.             castcrewbackground.image="bill.gif";
  441.             bios.top="100"
  442.             bios.height="270"
  443.             bios.value="Bill Smitrovich is well known to television audiences for his co-starring role as Drew Thatcher, the father of a child with Down's Syndrome on the critically acclaimed series Life Goes On. Also a busy film actor, Smitrovich has roles in the recent films Trigger Effect, opposite Kyle MacLachlan and Elizabeth Shue, and The Phantom, based on the popular comic strip of the same name. He has also been featured in Nick of Time and Michael Mann's Manhunter and Miami Vice.  His theater credits include performances of Arthur Miller's The American Clock and The Price, in addition to Off-Broadway productions of Frankie and Johnnie in the Claire de Lune, Of Mice and Men, The Elephant Man and Requiem for a Heavyweight with Richard Dreyfuss."
  444.             break;    
  445.             
  446.         case "bill.gif":
  447.             castcrewbackground.image="megan.gif";
  448.             bios.top="100"
  449.             bios.height="300"
  450.             bios.value="Megan Gallagher is a versatile actress with credits on television, film and stage. She co-starred on the series Nowhere Man, and she was a regular on television series such as The Larry Sanders Show, China Beach, The Slap Maxwell Story and Hill Street Blues, among others. On film, Gallagher has had roles in Hideaway, Ripple, Sight Unseen and Ambulance.  Her theater credits include the Broadway productions of Angels in America and A Few Good Men, as well as the Off-Broadway productions of Play, Come and Go, Tartuffe and Miss Julie. She has also appeared in regional performances of Oliver! Oliver!, Twelfth Night, and All's Well That Ends Well, and received her B.F.A. degree from the Julliard School of Drama. Born and raised in Reading, Pennsylvania, Gallagher is single and resides in Los Angeles."
  451.             break;    
  452.             
  453.         case "megan.gif":
  454.             castcrewbackground.image="brittany.gif";
  455.             bios.top="100"
  456.             bios.height="300"
  457.             bios.value="Seven-year-old Brittany Tiplady is a native of British Columbia. She began her career in acting at the age of three after impressing a casting director during an earlier audition. She was too young for the part for which she auditioned, but the casting director cast her six months later in her first role in the movie-of-the-week, Katie, and then in the series Sin and Redemption, starring Richard Grieco. In addition to acting, Tiplady has modeled and done numerous commercials. When asked what she likes least about acting, she responds without hesitation, Waking up early and having to stay still. What does she like best? Meeting new people.  Tiplady's hobbies include ballet dancing and reading and she loves animals, including her pet goldfish Goldie, Comet and Sam."
  458.             break;    
  459.             
  460.         case "brittany.gif":
  461.             castcrewbackground.image="chris.gif";
  462.             bios.top="100"
  463.             bios.height="600"
  464.             bios.value="Chris Carter is the creator and executive producer of MILLENNIUM, as well as one of its main writers and occasional director. Carter is the recipient of a 1995 Emmy Award nomination for Outstanding Writing in a Dramatic Series for THE X-FILES episode he wrote and directed entitled Duane Berry, and a 1997 Emmy Award nomination for co-writing THE X-FILES episode entitled Memento Mori. In 1998 he earned two nominations, one for writing and the other for directing, for THE X-FILES episode entitled The Post-Modern Prometheus.  Born and raised in Southern California, Carter has been writing for most of his adult life. Formerly a freelance journalist and editor of Surfing magazine, Carter began his career as a screenwriter in 1985 at The Walt Disney Studios, where he was brought in by Jeffrey Katzenberg to write for television. At Disney, Carter wrote and produced several television movies, in addition to the television pilot Cameo by Night for NBC and The Nanny (not the CBS series) for the Disney Channel. He took a short leave of absence from Disney to co-produce the second season of the comedy series Rags to Riches, starring Joe Bologna, and returned in 1989 to create and executive produce Brand New Life, a recurring comedy series which ran as part of a rotating schedule on Disney's Sunday night lineup.  In addition to his duties on MILLENNIUM, Carter also created and serves as the executive producer for the series THE X-FILES. Carter, who is married, divides his time between Southern California and Vancouver, where MILLENNIUM is filmed."
  465.             break;    
  466.             
  467.         case "chris.gif":
  468.             castcrewbackground.image="lance.gif";
  469.             bios.top="100"
  470.             bios.height="360"
  471.             bios.value="Lance Henriksen is best known to film audiences for his work as the memorable, human-like android in the films Aliens and Alien III opposite Academy Award-winner Sigourney Weaver, as well as for his roles in films such as The Terminator, Close Encounters of the Third Kind, and Hard Target, for which he received The Saturn Award for Best Supporting Actor. He has also appeared in the films The Quick and the Dead, Color of Night, Jennifer Eight, The Right Stuff and Dog Day Afternoon, among others.  Most recently, he starred in Powder, The Nature of the Beast and Dead Man.  Born and raised in New York, Henriksen studied at the famed Actors Studio before setting sail around the world on a Swedish freighter.  Upon his return to New York, he landed the lead in Eugene  ONeills Three Plays of the Sea, which started his distiguished career.  MILLENNIUM is Henriksens first television series.  He is married and lives in Los Angeles."
  472.             break;
  473.             
  474.             
  475.         }
  476.  
  477. }
  478.  
  479. function nextPhoto(){
  480.     switch (photos.image){
  481.  
  482.         
  483.         case "photo01.jpg":
  484.             photos.image="photo02.jpg";
  485.             break;
  486.             
  487.         case "photo02.jpg":
  488.             photos.image="photo03.jpg";
  489.             break;
  490.             
  491.         case "photo03.jpg":
  492.             photos.image="photo04.jpg";
  493.             break;    
  494.             
  495.         case "photo04.jpg":
  496.             photos.image="photo05.jpg";
  497.             break;
  498.             
  499.         case "photo05.jpg":
  500.             photos.image="photo06.jpg";
  501.             break;
  502.             
  503.         case "photo06.jpg":
  504.             photos.image="photo07.jpg";
  505.             break;
  506.             
  507.         case "photo07.jpg":
  508.             photos.image="photo08.jpg";
  509.             break;
  510.             
  511.         case "photo08.jpg":
  512.             photos.image="photo09.jpg";
  513.             break;    
  514.             
  515.         case "photo09.jpg":
  516.             photos.image="photo10.jpg";
  517.             break;    
  518.             
  519.         case "photo10.jpg":
  520.             photos.image="photo11.jpg";
  521.             break;    
  522.             
  523.         case "photo11.jpg":
  524.             photos.image="photo12.jpg";
  525.             break;    
  526.             
  527.         case "photo12.jpg":
  528.             photos.image="photo01.jpg";
  529.             break;            
  530.                         
  531.  
  532.         }
  533.  
  534. }
  535.  
  536. function prevPhoto(){
  537.     switch (photos.image){
  538.  
  539.         
  540.         case "photo01.jpg":
  541.             photos.image="photo12.jpg";
  542.             break;
  543.             
  544.         case "photo02.jpg":
  545.             photos.image="photo01.jpg";
  546.             break;
  547.             
  548.         case "photo03.jpg":
  549.             photos.image="photo02.jpg";
  550.             break;    
  551.             
  552.         case "photo04.jpg":
  553.             photos.image="photo03.jpg";
  554.             break;
  555.             
  556.         case "photo05.jpg":
  557.             photos.image="photo04.jpg";
  558.             break;
  559.             
  560.         case "photo06.jpg":
  561.             photos.image="photo05.jpg";
  562.             break;
  563.             
  564.         case "photo07.jpg":
  565.             photos.image="photo06.jpg";
  566.             break;
  567.             
  568.         case "photo08.jpg":
  569.             photos.image="photo07.jpg";
  570.             break;    
  571.             
  572.         case "photo09.jpg":
  573.             photos.image="photo08.jpg";
  574.             break;    
  575.             
  576.         case "photo10.jpg":
  577.             photos.image="photo09.jpg";
  578.             break;    
  579.             
  580.         case "photo11.jpg":
  581.             photos.image="photo10.jpg";
  582.             break;    
  583.             
  584.         case "photo12.jpg":
  585.             photos.image="photo11.jpg";
  586.             break;                
  587.                 
  588.                         
  589.  
  590.         }
  591.  
  592. }
  593.  
  594.