home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 November / Chip_2004-11_cd1.bin / opsys / wmakeup / downloads / Rave-MP.wmz / rave.js < prev    next >
Text (UTF-16)  |  2004-08-26  |  72KB  |  1,653 lines

  1. /*
  2.     The Skins Factory
  3.     http://www.theskinsfactory.com
  4.     info@theskinsfactory.com
  5.     
  6.     RaveMP
  7. */
  8.  
  9.  
  10. function introAnim()
  11. {
  12.     view.timerInterval = 0;
  13.     mainScreen.alphaBlendTo(0,700);
  14. }
  15.  
  16. /*
  17.     skin preview
  18. */
  19.  
  20. function onLoadSkinPreview()
  21. {
  22.     if(player){}
  23.     view.width = 0;
  24.     view.height = 0;
  25.     view.backgroundImage = "";
  26.     theme.currentViewID = "controlView";
  27. }
  28.  
  29. /*
  30.     skin startup & exit / (remote) control view
  31. */
  32.  
  33. function onLoadSkin()
  34. {
  35.  
  36.     theme.savePreference("vidViewer", "false");
  37.     theme.savePreference("exitView", "false");
  38.  
  39.     if ("true"==theme.loadPreference("plViewer"))
  40.     {
  41.         theme.openView( 'plView' );
  42.     }
  43.  
  44.     if ("true"==theme.loadPreference("eqViewer"))
  45.     {
  46.         theme.openView( 'eqView' );
  47.     }
  48.  
  49.     if ("true"==theme.loadPreference("visViewer"))
  50.     {
  51.         theme.openView( 'visView' );
  52.     }
  53.  
  54.     if ("true"==theme.loadPreference("infoViewer"))
  55.     {
  56.         theme.openView( 'infoView' );
  57.     }
  58.  
  59.     theme.openView('mainView');
  60.  
  61. }
  62.  
  63. function onCloseSkin()
  64. {
  65.     theme.savePreference("exitView", "false");
  66. }
  67.  
  68. var controlStatus = true;
  69.  
  70. function checkRemoteViewStatus()
  71. {
  72.  
  73.     if(controlStatus)
  74.     {
  75.         onChangeControlPlayerState();
  76.         controlStatus = !controlStatus;
  77.     }
  78.     else
  79.     {
  80.         if("true"==theme.loadPreference("remoteCallPl"))
  81.         {
  82.             toggleView('plView','plViewer')
  83.             theme.savePreference("remoteCallPl", "false");
  84.         }
  85.         if("true"==theme.loadPreference("remoteCallEq"))
  86.         {
  87.             toggleView('eqView','eqViewer')
  88.             theme.savePreference("remoteCallEq", "false");
  89.         }
  90.         if("true"==theme.loadPreference("remoteCallVis"))
  91.         {
  92.             toggleView('visView','visViewer')
  93.             theme.savePreference("remoteCallVis", "false");
  94.         }
  95.         if("true"==theme.loadPreference("remoteCallInfo"))
  96.         {
  97.             toggleView('infoView','infoViewer')
  98.             theme.savePreference("remoteCallInfo", "false");
  99.         }
  100.     //
  101.         if("true"==theme.loadPreference("minimizeView"))
  102.         {
  103.             view.minimize();
  104.             theme.savePreference("minimizeView", "false");
  105.         }
  106.         if("true"==theme.loadPreference("exitView"))
  107.         {
  108.             
  109.             view.close();
  110.         }
  111.     }
  112. }
  113.  
  114.  
  115. function onChangeControlPlayerState(){
  116.  
  117.     if (player)
  118.     {
  119.         switch (player.playState)
  120.         {
  121.  
  122.             case 2:
  123.             case 3:     //playing
  124.  
  125.                 if(("false"==theme.loadPreference("vidViewer"))&&player.currentMedia.ImageSourceWidth>0)
  126.                 {
  127.                     theme.openView('videoView');
  128.                 
  129.                 }
  130.                 break;
  131.         }
  132.     }
  133. }
  134.  
  135. /*
  136.     main mode startup & exit
  137. */
  138.  
  139. function onLoadMain(){
  140.  
  141.     volume.value = player.settings.volume;
  142.     
  143.     theme.savePreference("exitView", "false");
  144.  
  145.     htcpSetTimerStatus();
  146.     htcpSetTimer();
  147.     htcpSetID();
  148.  
  149.     htcpStartup();
  150.     htcpMain();
  151.  
  152.     onChangeMainPlayerState();
  153.     updateMetadata('status');
  154.  
  155.     var prefStatus = theme.loadPreference( 'seekStatus' )
  156.     
  157.     if( prefStatus != '--' )
  158.     {
  159.         seekStatus = ( prefStatus.toLowerCase() == 'true') ? false : true;
  160.     }
  161.     else
  162.     {
  163.         seekStatus = true
  164.     }
  165.  
  166.     SetTimeShowState();
  167.  
  168.     var val = theme.loadPreference('htcpID');
  169.     
  170.     mainScreen.backgroundImage = "m_screen_off_" + val + ".png";
  171. }
  172.  
  173.  
  174. function onCloseMain() {
  175.     theme.savePreference("exitView", "true");
  176.     theme.savePreference('seekStatus',seekStatus);
  177. }
  178.  
  179.  
  180. function onChangeMainPlayerState(){
  181.  
  182.     if (player){
  183.         switch (player.playState){
  184.  
  185.             case 2:
  186.                 
  187.                 break;
  188.             case 3:     //playing
  189.                 
  190.                 break;
  191.             case 8:
  192.                 return;
  193.                 break;
  194.             }
  195.         }
  196.  
  197.     if (!player.controls.isAvailable("Stop")) {
  198.         
  199.     }
  200.  
  201. }
  202.  
  203. /*
  204.     other view methods
  205. */
  206.  
  207. function onVolInc()
  208. {
  209.     if(player.settings.volume < 96)
  210.     {
  211.         player.settings.volume+=4;
  212.     }else{
  213.         player.settings.volume = 100;
  214.     }
  215.  
  216.     player.settings.mute = false;
  217.     volume.toolTip = locVol.toolTip;
  218. }
  219.  
  220. function onVolDec()
  221. {
  222.     if(player.settings.volume > 4)
  223.     {
  224.         player.settings.volume-=4;
  225.     }else{
  226.         player.settings.volume = 0;
  227.     }
  228.     
  229.     player.settings.mute = false;
  230.     
  231.     volume.toolTip = locVol.toolTip;
  232. }
  233.  
  234. // sound preferences
  235. function loadSoundPref(){
  236.     var val = theme.loadPreference('soundFX');
  237.     if(val=='--'){
  238.         theme.savePreference("soundFX", "true");
  239.     }
  240. }
  241.  
  242. function checkSoundPref(type){
  243.     if("true"==theme.loadPreference("soundFX")){
  244.         theme.playSound( type );
  245.     }
  246. }
  247.  
  248.  
  249. var seekStatus = true;
  250.  
  251. function drawSeekDigits( seconds )
  252. {
  253.     if(player.currentPlaylist.count==0) return;
  254.  
  255.     if( !seekStatus )
  256.     {
  257.         seconds = player.currentMedia.duration - seconds;
  258.     }
  259.  
  260.     frame = 20
  261.     seconds = seconds - seconds % 1;
  262.  
  263.     time4.left = -( seconds % 10 ) * frame;
  264.  
  265.     seconds = seconds - ( seconds % 10);
  266.     time3.left = -( ( seconds % 60 ) / 10 ) * frame;
  267.  
  268.     seconds = seconds - ( seconds % 60 );
  269.     seconds = seconds / 60;
  270.     time2.left = -( seconds % 10 ) * frame;
  271.  
  272.     seconds = seconds - ( seconds % 10 );
  273.     time1.left = -( seconds / 10 ) * frame;
  274. }
  275.  
  276. function SetTimeShowState()
  277. {
  278.  
  279.     seekStatus = !seekStatus;
  280.  
  281.     if( seekStatus )
  282.     {
  283.         timeDash.visible = false;
  284.         time1.upToolTip = time2.upToolTip = time3.upToolTip = time4.upToolTip = timeElapsed.toolTip;
  285.     }
  286.     else
  287.     {
  288.         timeDash.visible = true;
  289.         time1.upToolTip = time2.upToolTip = time3.upToolTip = time4.upToolTip = timeRemaining.toolTip;
  290.     }
  291.  
  292.     seconds = seek.value;
  293.  
  294.     drawSeekDigits( seconds );
  295. }
  296.  
  297. function updateMetadata(type){
  298.     if("status"==type){
  299.         if(player.openState!=13) return;
  300.  
  301.         var metaAuthor = player.currentMedia.getItemInfo("author");
  302.  
  303.         if (metaAuthor != "") {
  304.             metaAuthor += " - ";
  305.         }
  306.  
  307.         metadata.value = player.status;
  308.  
  309.         if (metadata.value != "") {
  310.             metadata.value += " - ";
  311.         }
  312.  
  313.         metadata.value += metaAuthor;
  314.     }else if("playlist"==type){
  315.         if(player.currentPlaylist.count==0) return;
  316.  
  317.         var metaAuthor = player.currentMedia.getItemInfo("author");
  318.  
  319.         if (metaAuthor != "") {
  320.             metaAuthor += " - ";
  321.         }
  322.  
  323.         if(player.openState!=13){
  324.             metadata.value = metaAuthor;
  325.         }
  326.     }else{
  327.         metadata.value = player.status;
  328.         metadata.scrolling = (metadata.textWidth>metadata.width);
  329.         return;
  330.     }
  331.  
  332.     metadata.value += player.currentmedia.name;
  333.     metadata.scrolling = (metadata.textWidth>metadata.width);
  334.  
  335. }
  336.  
  337. function openMediaFile( media )
  338. {
  339.     if(media=='file')media = theme.openDialog('FILE_OPEN','FILES_ALLMEDIA');
  340.     if(media)
  341.     {
  342.         player.URL = media;
  343.         player.controls.play();
  344.     }
  345. }
  346.  
  347. function updateToolTip(id,button,tip)
  348. {
  349.     if("true"==theme.loadPreference( id ))
  350.     {
  351.         eval( button +".upToolTip = locHide" + tip + ".toolTip" );
  352.     }
  353.     else
  354.     {
  355.         eval( button +".upToolTip = locShow" + tip + ".toolTip" );
  356.     }
  357. }
  358.  
  359. function updateSeekToolTip()
  360. {
  361.     if(player.openState!=13) return;
  362.  
  363.     var seekHours = Math.floor((seek.value / 3600));
  364.     if (seekHours < 10) seekHours = "0" + seekHours;
  365.  
  366.     var seekMinutes = Math.floor((seek.value - (seekHours*3600))/60);
  367.     if (seekMinutes < 10) seekMinutes = "0" + seekMinutes;
  368.  
  369.     var seekSeconds = Math.floor((seek.value - (seekMinutes*60) - (seekHours*3600)));
  370.     if (seekSeconds < 10) seekSeconds = "0" + seekSeconds;
  371.  
  372.     var seekString;
  373.  
  374.     if (seekHours==00)
  375.     {
  376.         seekString = "";
  377.     }
  378.     else
  379.     {
  380.         seekString = seekHours + ":";
  381.     }
  382.  
  383.     seekString += seekMinutes + ":" + seekSeconds;
  384.  
  385.     seek.toolTip = seekString;
  386.     seek.toolTip += " / ";
  387.     seek.toolTip += player.currentMedia.DurationString;
  388.  
  389. }
  390.  
  391. function updateVolToolTip(id)
  392. {
  393.     vol = "";
  394.     vol += player.settings.volume;
  395.     eval(id + ".toolTip = vol" );
  396. }
  397.  
  398.  
  399. function onShuffRepeatModeChange()
  400. {
  401.     if(player.settings.getMode('shuffle'))
  402.     {
  403.         shuffleButton.down = true;
  404.     }else{
  405.         shuffleButton.down = false;
  406.     }
  407.  
  408.     if(player.settings.getMode('loop'))
  409.     {
  410.         repeatButton.down = true;
  411.     }else{
  412.         repeatButton.down = false;
  413.     }
  414.  
  415. }
  416.  
  417.  
  418. function onVolKeyPress(event)
  419. {
  420.     switch(event.keycode)
  421.     {
  422.         case 39:
  423.         case 38:
  424.             if(player.settings.volume < 95)
  425.             {
  426.                 player.settings.volume+=5;
  427.             }else{
  428.                 player.settings.volume = 100;
  429.             }
  430.             break;
  431.         case 37:
  432.         case 40:
  433.             if(player.settings.volume > 5)
  434.             {
  435.                 player.settings.volume-=5;
  436.             }else{
  437.                 player.settings.volume = 0;
  438.             }
  439.             break;
  440.     }
  441.     player.settings.mute = false;
  442. }
  443.  
  444. function onSeekKeyPress(event)
  445. {
  446.     if(player.openState!=13) return;
  447.     switch(event.keycode)
  448.     {
  449.         case 37:
  450.         case 40:
  451.             if(player.controls.currentPosition > 10)
  452.             {
  453.                 player.controls.currentPosition-=10;
  454.             }else{
  455.                 player.controls.currentPosition = 0;
  456.             }
  457.             break;
  458.         case 39:
  459.         case 38:
  460.             if(player.controls.currentPosition < player.currentMedia.duration)
  461.             {
  462.                 player.controls.currentPosition+=10;
  463.             }else{
  464.                 player.controls.currentPosition = player.currentMedia.duration;
  465.             }
  466.             break;
  467.     }
  468. }
  469.  
  470. /*
  471.     view global methods
  472. */
  473.  
  474. function toggleView(name,id)
  475. {
  476.     if("true"==theme.loadPreference(id))
  477.     {
  478.         theme.savePreference(id, "false");
  479.         theme.closeView( name );
  480.     }else{
  481.         theme.openView( name );
  482.     }
  483. }
  484.  
  485. function onViewClose(id)
  486. {
  487.     theme.savePreference(id, "false");
  488.     if( id=="vidViewer" )
  489.     {
  490.         player.controls.stop();
  491.         //theme.savePreference("vidCheck", "false");
  492.         theme.savePreference("vidViewer", "false");
  493.     }
  494.     view.close();
  495. }
  496.  
  497. function autoSizeView(width,height)
  498. {
  499.     var viewSize = theme.loadPreference( width );
  500.  
  501.     if( "--" != viewSize )
  502.     {
  503.         view.width = viewSize;
  504.     }else{
  505.         view.width = view.minWidth;
  506.     }
  507.  
  508.     viewSize = theme.loadpreference( height );
  509.  
  510.     if( "--" != viewSize )
  511.     {
  512.         view.height = viewSize;
  513.     }else{
  514.         view.height = view.minHeight;
  515.     }
  516. }
  517.  
  518. function saveViewSize(width,height)
  519. {
  520.     theme.savepreference( width , view.width );
  521.     theme.savepreference( height , view.height );
  522. }
  523.  
  524. function onHotKeyPress()
  525. {
  526.     switch(event.keycode)
  527.     {
  528.         case 122:
  529.         case 90:
  530.             player.controls.previous();
  531.             break;
  532.         case 120:
  533.         case 88:
  534.             player.controls.play();
  535.             break;
  536.         case 99:
  537.         case 67:
  538.             player.controls.pause();
  539.             break;
  540.         case 118:
  541.         case 86:
  542.             player.controls.stop();
  543.             break;
  544.         case 98:
  545.         case 66:
  546.             player.controls.next();
  547.             break;
  548.         case 108:
  549.         case 76:
  550.             openMediaFile();
  551.             break;
  552.     }
  553. }
  554.  
  555. function onViewResize(event)
  556. {
  557.  
  558.     var size = 20
  559.     
  560.     switch(event.keycode)
  561.     {
  562.         case 37:
  563.             view.width-=size;
  564.             break;
  565.         case 38:
  566.             view.height-=size
  567.             break;
  568.         case 39:
  569.             view.width+=size;
  570.             break;
  571.         case 40:
  572.             view.height+=size;
  573.             break;
  574.     }
  575. }
  576.  
  577.  
  578.  
  579. /*
  580.     playlist window load & exit
  581. */
  582.  
  583. function onLoadPl()
  584. {
  585.     theme.savePreference( 'plViewer', "true" );
  586.  
  587.     playlist1.backgroundColor = "#84d9ff";
  588.     playlist1.foregroundcolor = "#32004b";
  589.     playlist1.itemPlayingColor = "#ffffff"
  590.     playlist1.itemPlayingBackgroundColor = "#84d9ff"
  591.     playlist1.disabledItemColor = "#666666"
  592.  
  593.     autoSizeView('plWidth','plHeight');
  594.  
  595.     var index = 0;
  596.  
  597.     playlist1.setColumnResizeMode( index++, "AutosizeData" );
  598.     playlist1.setColumnResizeMode( index++, "Stretches" );
  599.     playlist1.setColumnResizeMode( index++, "AutosizeHeader" );
  600.     playlist1.setColumnResizeMode( index++, "AutosizeHeader" );
  601.     playlist1.setColumnResizeMode( index++, "AutosizeHeader" );
  602.     playlist1.setColumnResizeMode( index++, "AutosizeHeader" );
  603.  
  604.     htcpStartupPl()
  605. }
  606.  
  607. function onClosePl()
  608. {
  609.     saveViewSize('plWidth','plHeight');
  610. }
  611.  
  612. /*
  613.     equalizer window load & exit
  614. */
  615.  
  616. function onLoadEq(){
  617.     theme.savePreference( 'eqViewer', "true" );
  618.     view.width = view.minWidth;
  619.     view.height = view.minHeight;
  620.  
  621.     htcpStartupEq();
  622. }
  623.  
  624.  
  625. function updateBalToolTip(){
  626.     balance.toolTip = "";
  627.     balance.toolTip += player.settings.balance;
  628. }
  629.  
  630. function toggleSpeaker(){
  631.     if(eq.speakerSize==2){
  632.         eq.speakerSize = -1;
  633.     }
  634.     eq.speakerSize++
  635.  
  636. }
  637.  
  638. function setSrsEffect()
  639. {
  640.     eq.enhancedAudio = !eq.enhancedAudio
  641.  
  642.     if(eq.enhancedAudio)
  643.     {
  644.         speakerText.alphaBlendTo(255,300);
  645.         btnLabelTruBass.alphaBlendTo(255,300);
  646.         btnLabelWowEffect.alphaBlendTo(255,300);
  647.         truBass.visible = wowEffect.visible = true;
  648.         btnSrs.upToolTip = eqSrsOff.toolTip
  649.         btnSrs.image = "eq_srs_on_no.png";
  650.         btnSrs.hoverImage = "eq_srs_on_hov.png";
  651.         btnSrs.downImage = "eq_srs_on_do.png";
  652.     }
  653.     else
  654.     {
  655.         speakerText.alphaBlendTo(100,300);
  656.         btnLabelTruBass.alphaBlendTo(100,300);
  657.         btnLabelWowEffect.alphaBlendTo(100,300);
  658.         truBass.visible = wowEffect.visible = false;
  659.         btnSrs.upToolTip = eqSrsOn.toolTip;
  660.         btnSrs.image = "eq_srs_no.png";
  661.         btnSrs.hoverImage = "eq_srs_hov.png";
  662.         btnSrs.downImage = "eq_srs_do.png";
  663.     }
  664. }
  665.  
  666. /*
  667.     visuals window load & exit
  668. */
  669.  
  670. function onLoadVis(){
  671.     theme.savePreference( 'visViewer', "true" );
  672.  
  673.     visEffects.currentEffectType = mediacenter.effectType;
  674.     visEffects.currentPreset = mediacenter.effectPreset;
  675.  
  676.     autoSizeView('visWidth','visHeight');
  677.  
  678.     htcpStartupVis();
  679. }
  680.  
  681. function onCloseVis(){
  682.     mediacenter.effectType = visEffects.currentEffectType;
  683.     mediacenter.effectPreset = visEffects.currentPreset;
  684.  
  685.     saveViewSize('visWidth','visHeight');
  686. }
  687.  
  688. function onChangeVisualsPlayerState(){
  689.  
  690.     if (player){
  691.         switch (player.playState){
  692.             case 3:     //playing
  693.                 //visMask.visible = true;
  694.                 if(player.currentMedia.ImageSourceWidth>0){
  695.                     theme.savePreference('visViewer', "false");
  696.                     view.close();
  697.                 }
  698.                 break;
  699.  
  700.             }
  701.         }
  702.  
  703.     if (!player.controls.isAvailable("Stop")) {
  704.         //visMask.visible = false;
  705.     }
  706. }
  707.  
  708.  
  709. function onChangeVis(){
  710.     visEffectsText.visible = true;
  711.     visEffectsText.value = visEffects.currentEffectTitle + ": " + visEffects.currentPresetTitle;
  712.     visView.timerInterval = 6000;
  713. }
  714.  
  715. function hideVisText(){
  716.     visEffectsText.visible = false;
  717.     visView.timerInterval = 0;
  718. }
  719.  
  720. /*
  721.     video load & exit
  722. */
  723.  
  724. function onLoadVid(){
  725.     theme.savePreference( 'vidViewer', "true" );
  726.  
  727.     var prefStatus = theme.loadPreference( 'drawerStatus' )
  728.     
  729.     if( prefStatus != '--' )
  730.     {
  731.         drawerStatus = ( prefStatus.toLowerCase() == 'true') ? false : true;
  732.     }
  733.     else
  734.     {
  735.         drawerStatus = true
  736.     }
  737.  
  738.     checkSnapStatus();
  739.     onChangeVidPlayerState();
  740.     updateZoomToolTip();
  741.     toggleVidDrawer('0');
  742.     checkVidDrawer();
  743.     htcpStartupVid();
  744. }
  745.  
  746. function onCloseVid(){
  747.     theme.savePreference('drawerStatus',drawerStatus);
  748. }
  749.  
  750. function loadVidSize(){
  751.     var vidSizer = theme.loadPreference( "videoWidth" );
  752.  
  753.     if( "--" != vidSizer )
  754.     {
  755.         view.width = vidSizer;
  756.     }
  757.     vidSizer = theme.loadpreference( "videoHeight" );
  758.  
  759.     if( "--" != vidSizer )
  760.     {
  761.         view.height = vidSizer;
  762.     }
  763. }
  764.  
  765. function onVidSetSize(){
  766.     theme.savepreference( "videoWidth", view.width );
  767.     theme.savepreference( "videoHeight", view.height );
  768.     theme.savePreference("vidSnapper" , "false");
  769.     btnZoom.upToolTip = vidSetTip.toolTip;
  770.     mediacenter.videoZoom = 50;
  771. }
  772.  
  773. function onVideoZoom(){
  774.     if("false"==theme.loadPreference("vidSnapper")){
  775.         mediacenter.videoZoom = 50;
  776.     }
  777.     if(mediacenter.videoZoom < 76){
  778.         mediacenter.videoZoom = 100;
  779.     }else if(mediacenter.videoZoom <101){
  780.         mediacenter.videoZoom = 150;
  781.     }else if(mediacenter.videoZoom < 156){
  782.         mediacenter.videoZoom = 200;
  783.     }else{
  784.         mediacenter.videoZoom = 75;
  785.     }
  786.     SnapToVideo();
  787.     updateZoomToolTip();
  788. }
  789.  
  790. function updateZoomToolTip(){
  791.  
  792.     btnZoom.upToolTip = vidZoomIn.toolTip + mediacenter.videoZoom + vidZoomMid.toolTip;
  793.  
  794.     if(mediacenter.videoZoom < 76){
  795.         nextZoom = 100;
  796.     }else if(mediacenter.videoZoom <101){
  797.         nextZoom = 150;
  798.     }else if(mediacenter.videoZoom < 156){
  799.         nextZoom = 200;
  800.     }else{
  801.         nextZoom = 75;
  802.     }
  803.  
  804.     btnZoom.upToolTip += nextZoom + vidZoomOut.toolTip;
  805.     
  806.     if("false"==theme.loadPreference("vidSnapper")){
  807.         btnZoom.upToolTip = vidSetTip.toolTip;
  808.     }
  809. }
  810.  
  811. function SnapToVideo(){
  812.  
  813.     theme.savePreference("vidSnapper" , "true");
  814.  
  815.     var zoom = mediacenter.videoZoom;
  816.     var viewWidth = (player.currentMedia.imageSourceWidth * (zoom/100.00));
  817.     var viewHeight = (player.currentMedia.imageSourceHeight * (zoom/100.00));
  818.  
  819.     view.width = viewWidth + 40;
  820.     view.height = viewHeight + 125;
  821. }
  822.  
  823. function checkSnapStatus(){
  824.     if(player.openState!=13) return;
  825.     if("false"==theme.loadPreference("vidSnapper")){
  826.         loadVidSize();
  827.     }else{
  828.         SnapToVideo();
  829.     }
  830. }
  831.  
  832. function onChangeVidPlayerState(){
  833.     if (player){
  834.         switch (player.playState){
  835.             case 2:
  836.             case 3:     //playing
  837.                 if(!player.currentMedia.ImageSourceWidth>0){
  838.                     theme.savePreference('vidViewer', "false");
  839.                     view.close();
  840.                     break;
  841.                 }
  842.                 vidBack1.visible = vidBack2.visible = vidBack3.visible = vidBack4.visible = false;
  843.                    //vidBack.alphaBlend = 0;
  844.                 videoFrame.visible = true;
  845.                 if(!player.fullScreen){
  846.                     checkSnapStatus();
  847.                 }
  848.                 
  849.                 btnVidResize.enabled = true;
  850.                 btnZoom.enabled = true;
  851.                 // DEBUG::DEBUG
  852.                 return;
  853.                 break;
  854.             case 8:
  855.                 return;
  856.                 break;
  857.             }
  858.     
  859.         }
  860.  
  861.     if (!player.controls.isAvailable("Stop"))
  862.     {
  863.         videoFrame.visible = false;
  864.         btnVidResize.enabled = false;
  865.         btnZoom.enabled = false;
  866.         vidBack1.visible = vidBack2.visible = vidBack3.visible = vidBack4.visible = true;
  867.            //vidBack.alphaBlendTo(255,600);
  868.         view.width = 308;
  869.         view.height = 245;
  870.         
  871.     }
  872.  
  873. }
  874.  
  875. var drawerStatus = false;
  876.  
  877. function toggleVidDrawer(speed){
  878.     if(!drawerStatus){
  879.         vidDrawer.moveTo(0,view.height-75,speed);
  880.         
  881.         vidDrawerFrame.visible = true;
  882.         btnVidDrawer.down = true;
  883.         //btnVidDrawer.downImage = "vid_drawer_do1.png";
  884.         drawerStatus = !drawerStatus;
  885.     }else{
  886.         vidDrawer.moveTo(0,view.height-150,speed);
  887.         
  888.         //btnVidDrawer.downImage = "vid_drawer_do.png";
  889.         drawerStatus = !drawerStatus;
  890.     }
  891. }
  892.  
  893. function checkVidDrawer(){
  894.     drawerStatus = drawerStatus;
  895.     vidDrawerFrame.visible = drawerStatus;
  896. }
  897.  
  898.  
  899. /*
  900.     All scripts are Copyright © 2004. The Skins Factory, Inc. All Rights Reserved.
  901.     Private use only. Sale, duplication, or other transfer of this material is strictly prohibited. 
  902. */
  903.  
  904. function colorPlayer()
  905. {
  906.     theme.savePreference('htcpTimerStatus', 'true' );
  907.     htcpMain();
  908.     theme.savePreference('htcpTimerStatus',"false");
  909. }
  910.  
  911. function blendFrameFast(win, num, blend)
  912. {
  913.     for(x=1; x<9; x++)
  914.     {
  915.         eval( win + x + "_" + num + ".alphaBlend = '" + blend + "';" );
  916.     }
  917. }
  918.  
  919. function blendFrameSlow(win, num, blend, speed)
  920. {
  921.     for(x=1; x<9; x++)
  922.     {
  923.         eval( win + x + "_" + num + ".alphaBlendTo(" + blend + "," + speed + ");" );
  924.     }
  925. }
  926.  
  927. // disabled for this version
  928.  
  929. function htcpSetMsg()
  930. {
  931.     var val = theme.loadPreference('htcpMsg');
  932.     if(val=='--')
  933.     {
  934.         theme.savePreference('htcpMsg','true');
  935.     }
  936. }
  937.  
  938. function htcpMsgToggle()
  939. {
  940.     if("true"==theme.loadPreference("htcpMsg")){
  941.         theme.savePreference('htcpMsg', "false" );
  942.         msgButton.down = true;
  943.     }
  944.     else
  945.     {
  946.         theme.savePreference('htcpMsg', "true" );
  947.         msgButton.down = false;
  948.     }
  949. }
  950.  
  951.  
  952. function htcpSetTimerStatus()
  953. {
  954.     var val = theme.loadPreference('htcpTimerStatus');
  955.     if(val=='--')
  956.     {
  957.         theme.savePreference('htcpTimerStatus',"false");
  958.     }
  959. }
  960.  
  961. function htcpSetTimer()
  962. {
  963.     var val = theme.loadPreference('htcpTimer');
  964.     if(val=='--')
  965.     {
  966.         theme.savePreference('htcpTimer',700);
  967.     }
  968. }
  969.  
  970. function htcpSetID()
  971. {
  972.     var val = theme.loadPreference('htcpID');
  973.     if(val=='--')
  974.     {
  975.         theme.savePreference('htcpID','4');
  976.     }
  977. }
  978.  
  979. function htcpTimerPause()
  980. {
  981.     if("true"==theme.loadPreference("htcpTimerStatus")){
  982.         theme.savePreference('htcpTimerStatus', "false" );
  983.         htcpValue.value = htcpPause.toolTip;
  984.         htcpAdjust.toolTip = htcp2.toolTip;
  985.         htcpAdjust.enabled = false;
  986.     }
  987.     else
  988.     {
  989.         theme.savePreference('htcpTimerStatus', "true" );
  990.         htcpAdjust.enabled = true;
  991.         htcpSliderUpdate();
  992.         htcpAdjust.toolTip = htcp1.toolTip;
  993.     }
  994. }
  995.  
  996. // main vars
  997.  
  998. var mainStatus = 1;
  999. var htcpStatus = 0;
  1000.  
  1001. function htcpStartup()
  1002. {
  1003.     var mainColor = theme.loadPreference('htcpID');
  1004.  
  1005.     if(mainColor==1)
  1006.     {
  1007.         mainBack2.alphaBlend = 255;
  1008.         mainStatus = 1;
  1009.         htcpStatus = 0;
  1010.         metadata.foregroundColor = "#261c18";
  1011.     }
  1012.     else if(mainColor==2)
  1013.     {
  1014.         mainBack3.alphaBlend = 255;
  1015.         mainStatus = 2;
  1016.         htcpStatus = 1;
  1017.         metadata.foregroundColor = "#040404";
  1018.     }
  1019.     else if(mainColor==3)
  1020.     {
  1021.         mainBack4.alphaBlend = 255;
  1022.         mainStatus = 3;
  1023.         htcpStatus = 2;
  1024.         metadata.foregroundColor = "#261c18";
  1025.     }
  1026.     else if(mainColor==4)
  1027.     {
  1028.         mainBack4.alphaBlend = 0;
  1029.         mainStatus = 4;
  1030.         htcpStatus = 3;
  1031.         metadata.foregroundColor = "#32004b"; // white body
  1032.     }
  1033.  
  1034.     
  1035.     htcpMain();
  1036.     theme.savePreference('htcpTimerStatus', 'true' );
  1037. }
  1038.  
  1039. function htcpMain()
  1040. {
  1041.     var mainTimer = theme.loadPreference('htcpTimer');
  1042.  
  1043.     if("true"==theme.loadPreference('htcpTimerStatus'))
  1044.     {
  1045.     
  1046.         // hide the buttons
  1047.         mainScreenButtons.visible = false;
  1048.     
  1049.         if(mainStatus==1&&htcpStatus==0)
  1050.         {
  1051.             mainBack2.alphaBlendTo(255,mainTimer);
  1052.             mainStatus++
  1053.             theme.savePreference('htcpID','1');
  1054.             
  1055.             mainScreenButtons.image = "m_set_no_2.png";
  1056.             mainScreenButtons.hoverImage = "m_set_hov_2.png";
  1057.             mainScreenButtons.downImage = "m_set_do_2.png";
  1058.             seek.image = "seek_2.png";
  1059.             time1.image = "time_1_2.png";
  1060.             time2.image = "time_2_2.png";
  1061.             time3.image = "time_3_2.png";
  1062.             time4.image = "time_4_2.png";
  1063.             timeSign.image = "time_sign_2.png";
  1064.             
  1065.             metadata.foregroundColor = "#221916"; // red body
  1066.         }
  1067.         else if(mainStatus==2&&htcpStatus==1)
  1068.         {
  1069.             mainBack3.alphaBlendTo(255,mainTimer);
  1070.             mainStatus++
  1071.             theme.savePreference('htcpID','2');
  1072.             
  1073.             mainScreenButtons.image = "m_set_no_3.png";
  1074.             mainScreenButtons.hoverImage = "m_set_hov_3.png";
  1075.             mainScreenButtons.downImage = "m_set_do_3.png";
  1076.             seek.image = "seek_3.png";
  1077.             time1.image = "time_1_3.png";
  1078.             time2.image = "time_2_3.png";
  1079.             time3.image = "time_3_3.png";
  1080.             time4.image = "time_4_3.png";
  1081.             timeSign.image = "time_sign_3.png";
  1082.             
  1083.             metadata.foregroundColor = "#000000";    // blue body
  1084.         }
  1085.         else if(mainStatus==3&&htcpStatus==2)
  1086.         {
  1087.             mainBack4.alphaBlendTo(255,mainTimer);
  1088.             mainStatus++
  1089.             theme.savePreference('htcpID','3');
  1090.             
  1091.             mainScreenButtons.image = "m_set_no_2.png";
  1092.             mainScreenButtons.hoverImage = "m_set_hov_2.png";
  1093.             mainScreenButtons.downImage = "m_set_do_2.png";
  1094.             seek.image = "seek_2.png";
  1095.             time1.image = "time_1_2.png";
  1096.             time2.image = "time_2_2.png";
  1097.             time3.image = "time_3_2.png";
  1098.             time4.image = "time_4_2.png";
  1099.             timeSign.image = "time_sign_2.png";
  1100.             
  1101.             metadata.foregroundColor = "#221916";  // green body
  1102.         }
  1103.         else if(mainStatus==4&&htcpStatus==3)
  1104.         {
  1105.             mainBack4.alphaBlendTo(0,mainTimer);
  1106.             mainStatus = 1;
  1107.             theme.savePreference('htcpID','4');
  1108.             
  1109.             mainScreenButtons.image = "m_set_no_1.png";
  1110.             mainScreenButtons.hoverImage = "m_set_hov_1.png";
  1111.             mainScreenButtons.downImage = "m_set_do_1.png";
  1112.             seek.image = "seek_1.png";
  1113.             time1.image = "time_1_1.png";
  1114.             time2.image = "time_2_1.png";
  1115.             time3.image = "time_3_1.png";
  1116.             time4.image = "time_4_1.png";
  1117.             timeSign.image = "time_sign_1.png";
  1118.             
  1119.             metadata.foregroundColor = "#2D0043";  // white body
  1120.  
  1121.             mainBack2.alphaBlend = 0;
  1122.             mainBack3.alphaBlend = 0;
  1123.         }
  1124.  
  1125.         
  1126. //        var viewTimer = theme.loadPreference('htcpViewTimer');
  1127. //        view.timerInterval = (Math.round(viewTimer)) + (Math.round(mainTimer));
  1128.  
  1129.     }
  1130. }
  1131.  
  1132. function htcpCheck()
  1133. {
  1134.     htcpStatus++
  1135.  
  1136.     if(htcpStatus==4)
  1137.     {
  1138.         htcpStatus = 0;
  1139.     }
  1140.  
  1141.     // show the buttons
  1142.     mainScreenButtons.visible = true;
  1143. }
  1144.  
  1145. var plStatus = 1;
  1146.  
  1147. function htcpStartupPl()
  1148. {
  1149.  
  1150.     
  1151.     var htcpAlpha = theme.loadPreference('htcpID');
  1152.     //var winColor = theme.loadPreference('winAlpha');
  1153.     var winColor = 255
  1154.  
  1155.     if(htcpAlpha==1)
  1156.     {
  1157.         blendFrameFast('pl',2,winColor);
  1158.         plStatus = 0;
  1159.         playlist1.backgroundColor = "#d4ad33";
  1160.         playlist1.foregroundcolor = "#261c18";
  1161.         playlist1.itemPlayingColor = "#ffffff"
  1162.         playlist1.itemPlayingBackgroundColor = "#261c18"
  1163.         playlist1.disabledItemColor = "#666666"
  1164.         
  1165.     }
  1166.     else if(htcpAlpha==2)
  1167.     {
  1168.         blendFrameFast('pl',2,255);
  1169.         blendFrameFast('pl',3,winColor);
  1170.         plStatus = 1;
  1171.         playlist1.backgroundColor = "#d4ad33";
  1172.         playlist1.foregroundcolor = "#261c18";
  1173.         playlist1.itemPlayingColor = "#ffffff"
  1174.         playlist1.itemPlayingBackgroundColor = "#261c18"
  1175.         playlist1.disabledItemColor = "#666666"
  1176.     }
  1177.     else if(htcpAlpha==3)
  1178.     {
  1179.         //blendFrameFast('pl',2,255);
  1180.         blendFrameFast('pl',3,255);
  1181.         blendFrameFast('pl',4,winColor);
  1182.         plStatus = 2;
  1183.         playlist1.backgroundColor = "#99de53";
  1184.         playlist1.foregroundcolor = "#000000";
  1185.         playlist1.itemPlayingColor = "#ffffff"
  1186.         playlist1.itemPlayingBackgroundColor = "#000000"
  1187.         playlist1.disabledItemColor = "#666666"
  1188.     }
  1189.     else if(htcpAlpha==4)
  1190.     {
  1191.  
  1192.         blendFrameFast('pl',4,0);
  1193.         plStatus = 3;
  1194.         playlist1.backgroundColor = "#84d9ff";
  1195.         playlist1.foregroundcolor = "#32004b";
  1196.         playlist1.itemPlayingColor = "#ffffff"
  1197.         playlist1.itemPlayingBackgroundColor = "#32004b"
  1198.         playlist1.disabledItemColor = "#666666"
  1199.     }
  1200.     
  1201.     htcpPl();
  1202. }
  1203.  
  1204. function htcpPl()
  1205. {
  1206.  
  1207.     var winTimer = theme.loadPreference('htcpTimer');
  1208.     var htcpAlpha = theme.loadPreference('htcpID');
  1209.  
  1210.     if(htcpAlpha==1&&plStatus==0)
  1211.     {
  1212.         blendFrameSlow('pl',2,255,winTimer);
  1213.         plStatus++;
  1214.         playlist1.backgroundColor = "#d4ad33";
  1215.         playlist1.foregroundcolor = "#221916";
  1216.         playlist1.itemPlayingColor = "#ffffff"
  1217.         playlist1.itemPlayingBackgroundColor = "#221916"
  1218.         playlist1.disabledItemColor = "#666666"
  1219.     }
  1220.     else if(htcpAlpha==2&&plStatus==1)
  1221.     {
  1222.         blendFrameFast('pl',2,255);
  1223.         blendFrameSlow('pl',3,255,winTimer);
  1224.         plStatus++;
  1225.         playlist1.backgroundColor = "#99de53";
  1226.         playlist1.foregroundcolor = "#000000";
  1227.         playlist1.itemPlayingColor = "#ffffff"
  1228.         playlist1.itemPlayingBackgroundColor = "#000000"
  1229.         playlist1.disabledItemColor = "#666666"
  1230.     }
  1231.     else if(htcpAlpha==3&&plStatus==2)
  1232.     {
  1233.         blendFrameFast('pl',3,255);
  1234.         blendFrameSlow('pl',4,255,winTimer);
  1235.         plStatus++;
  1236.         playlist1.backgroundColor = "#d4ad33";
  1237.         playlist1.foregroundcolor = "#221916";
  1238.         playlist1.itemPlayingColor = "#ffffff"
  1239.         playlist1.itemPlayingBackgroundColor = "#221916"
  1240.         playlist1.disabledItemColor = "#666666"
  1241.     }
  1242.     else if(htcpAlpha==4&&plStatus==3)
  1243.     {
  1244.         blendFrameSlow('pl',4,0,winTimer);
  1245.         plStatus = 0
  1246.         playlist1.backgroundColor = "#84d9ff";
  1247.         playlist1.foregroundcolor = "#2D0043";
  1248.         playlist1.itemPlayingColor = "#ffffff"
  1249.         playlist1.itemPlayingBackgroundColor = "#2D0043"
  1250.         playlist1.disabledItemColor = "#666666"
  1251.     
  1252.         blendFrameFast('pl',2,0);
  1253.         blendFrameFast('pl',3,0);
  1254.     }
  1255.  
  1256. }
  1257.  
  1258. var eqStatus = 1;
  1259.  
  1260. function htcpStartupEq()
  1261. {
  1262.  
  1263.     
  1264.     var htcpAlpha = theme.loadPreference('htcpID');
  1265.     //var winColor = theme.loadPreference('winAlpha');
  1266.     var winColor = 255
  1267.  
  1268.     if(htcpAlpha==1)
  1269.     {
  1270.         blendFrameFast('eq',2,winColor);
  1271.         eqBack2.alphaBlend = 255;
  1272.         htcpEqSet2();
  1273.         eqStatus = 0;
  1274.         
  1275.     }
  1276.     else if(htcpAlpha==2)
  1277.     {
  1278.         blendFrameFast('eq',2,255);
  1279.         blendFrameFast('eq',3,winColor);
  1280.         eqBack3.alphaBlend = 255;
  1281.         htcpEqSet3();
  1282.         eqStatus = 1;
  1283.     }
  1284.     else if(htcpAlpha==3)
  1285.     {
  1286.         //blendFrameFast('eq',2,255);
  1287.         blendFrameFast('eq',3,255);
  1288.         blendFrameFast('eq',4,winColor);
  1289.         eqBack4.alphaBlend = 255;
  1290.         htcpEqSet2();
  1291.         eqStatus = 2;
  1292.     }
  1293.     else if(htcpAlpha==4)
  1294.     {
  1295.  
  1296.         blendFrameFast('eq',4,0);
  1297.         eqBack4.alphaBlend = 0;
  1298.         htcpEqSet1();
  1299.         eqStatus = 3;
  1300.     }
  1301.     
  1302.     htcpEq();
  1303. }
  1304.  
  1305. function htcpEq()
  1306. {
  1307.  
  1308.     var winTimer = theme.loadPreference('htcpTimer');
  1309.     var htcpAlpha = theme.loadPreference('htcpID');
  1310.     
  1311.     if(htcpAlpha==1&&eqStatus==0)
  1312.     {
  1313.         blendFrameSlow('eq',2,255,winTimer);
  1314.         eqBack2.alphaBlendTo(255,winTimer);
  1315.         htcpEqSet2();
  1316.         eqStatus++;
  1317.     }
  1318.     else if(htcpAlpha==2&&eqStatus==1)
  1319.     {
  1320.         blendFrameFast('eq',2,255);
  1321.         blendFrameSlow('eq',3,255,winTimer);
  1322.         eqBack3.alphaBlendTo(255,winTimer);
  1323.         htcpEqSet3();
  1324.         eqStatus++;
  1325.     }
  1326.     else if(htcpAlpha==3&&eqStatus==2)
  1327.     {
  1328.         blendFrameFast('eq',3,255);
  1329.         blendFrameSlow('eq',4,255,winTimer);
  1330.         eqBack4.alphaBlendTo(255,winTimer);
  1331.         htcpEqSet2();
  1332.         eqStatus++;
  1333.     }
  1334.     else if(htcpAlpha==4&&eqStatus==3)
  1335.     {
  1336.         blendFrameSlow('eq',4,0,winTimer);
  1337.         eqBack4.alphaBlendTo(0,winTimer);
  1338.         eqStatus = 0
  1339.         htcpEqSet1();
  1340.     
  1341.         eqBack2.alphaBlend = 0;
  1342.         eqBack3.alphaBlend = 0;
  1343.         blendFrameFast('eq',2,0);
  1344.         blendFrameFast('eq',3,0);
  1345.     }
  1346.  
  1347. }
  1348.  
  1349.  
  1350. function htcpEqSet1()
  1351. {
  1352.     eqBackGroup1.visible = false;
  1353.     eqBackGroup3.visible = false;
  1354.  
  1355.     eqNav.image = "eq_nav_no_1.png";
  1356.     eqNav.hoverImage = "eq_nav_hov_1.png";
  1357.     eqNav.downImage = "eq_nav_do_1.png";
  1358.     srsSet.image = "eq_srs_no_1.png";
  1359.     srsSet.hoverImage = "eq_srs_hov_1.png";
  1360.     srsSet.downImage = "eq_srs_do_1.png";
  1361.     
  1362.     balance.thumbImage = "bal_thumb_1.png";
  1363.     truBass.foregroundImage = "srs_slider_1.png";
  1364.     wowEffect.foregroundImage = "srs_slider_1.png";
  1365.  
  1366.     eqPresetText.foregroundColor = "#2D0043";
  1367.     balanceText.foregroundColor= "#2D0043";
  1368.     SrsWowText.foregroundColor= "#2D0043";
  1369.     SrsSpeaker.foregroundColor= "#2D0043";
  1370.     SrsTruBass.foregroundColor= "#2D0043";
  1371.     SrsWowEffect.foregroundColor= "#2D0043";
  1372.  
  1373.     eq1.foregroundImage = "eq_slider_1.png";
  1374.     eq2.foregroundImage = "eq_slider_1.png";
  1375.     eq3.foregroundImage = "eq_slider_1.png";
  1376.     eq4.foregroundImage = "eq_slider_1.png";
  1377.     eq5.foregroundImage = "eq_slider_1.png";
  1378.     eq6.foregroundImage = "eq_slider_1.png";
  1379.     eq7.foregroundImage = "eq_slider_1.png";
  1380.     eq8.foregroundImage = "eq_slider_1.png";
  1381.     eq9.foregroundImage = "eq_slider_1.png";
  1382.     eq10.foregroundImage = "eq_slider_1.png";
  1383. }
  1384.  
  1385. function htcpEqSet2()
  1386. {
  1387.     eqBackGroup1.visible = false;
  1388.     eqBackGroup3.visible = false;
  1389.     
  1390.     eqNav.image = "eq_nav_no_2.png";
  1391.     eqNav.hoverImage = "eq_nav_hov_2.png";
  1392.     eqNav.downImage = "eq_nav_do_2.png";
  1393.     srsSet.image = "eq_srs_no_2.png";
  1394.     srsSet.hoverImage = "eq_srs_hov_2.png";
  1395.     srsSet.downImage = "eq_srs_do_2.png";
  1396.     
  1397.     balance.thumbImage = "bal_thumb_2.png";
  1398.     truBass.foregroundImage = "srs_slider_2.png";
  1399.     wowEffect.foregroundImage = "srs_slider_2.png";
  1400.  
  1401.     eqPresetText.foregroundColor = "#221916";
  1402.     balanceText.foregroundColor= "#221916";
  1403.     SrsWowText.foregroundColor= "#221916";
  1404.     SrsSpeaker.foregroundColor= "#221916";
  1405.     SrsTruBass.foregroundColor= "#221916";
  1406.     SrsWowEffect.foregroundColor= "#221916";
  1407.     
  1408.     eq1.foregroundImage = "eq_slider_2.png";
  1409.     eq2.foregroundImage = "eq_slider_2.png";
  1410.     eq3.foregroundImage = "eq_slider_2.png";
  1411.     eq4.foregroundImage = "eq_slider_2.png";
  1412.     eq5.foregroundImage = "eq_slider_2.png";
  1413.     eq6.foregroundImage = "eq_slider_2.png";
  1414.     eq7.foregroundImage = "eq_slider_2.png";
  1415.     eq8.foregroundImage = "eq_slider_2.png";
  1416.     eq9.foregroundImage = "eq_slider_2.png";
  1417.     eq10.foregroundImage = "eq_slider_2.png";
  1418. }
  1419.  
  1420. function htcpEqSet3()
  1421. {
  1422.     eqBackGroup1.visible = false;
  1423.     eqBackGroup3.visible = false;
  1424.     
  1425.     eqNav.image = "eq_nav_no_3.png";
  1426.     eqNav.hoverImage = "eq_nav_hov_3.png";
  1427.     eqNav.downImage = "eq_nav_do_3.png";
  1428.     srsSet.image = "eq_srs_no_3.png";
  1429.     srsSet.hoverImage = "eq_srs_hov_3.png";
  1430.     srsSet.downImage = "eq_srs_do_3.png";
  1431.     
  1432.     balance.thumbImage = "bal_thumb_3.png";
  1433.     truBass.foregroundImage = "srs_slider_3.png";
  1434.     wowEffect.foregroundImage = "srs_slider_3.png";
  1435.  
  1436.     eqPresetText.foregroundColor = "#000000";
  1437.     balanceText.foregroundColor= "#000000";
  1438.     SrsWowText.foregroundColor= "#000000";
  1439.     SrsSpeaker.foregroundColor= "#000000";
  1440.     SrsTruBass.foregroundColor= "#000000";
  1441.     SrsWowEffect.foregroundColor= "#000000";
  1442.  
  1443.     eq1.foregroundImage = "eq_slider_3.png";
  1444.     eq2.foregroundImage = "eq_slider_3.png";
  1445.     eq3.foregroundImage = "eq_slider_3.png";
  1446.     eq4.foregroundImage = "eq_slider_3.png";
  1447.     eq5.foregroundImage = "eq_slider_3.png";
  1448.     eq6.foregroundImage = "eq_slider_3.png";
  1449.     eq7.foregroundImage = "eq_slider_3.png";
  1450.     eq8.foregroundImage = "eq_slider_3.png";
  1451.     eq9.foregroundImage = "eq_slider_3.png";
  1452.     eq10.foregroundImage = "eq_slider_3.png";
  1453. }
  1454.  
  1455. var visStatus = 1;
  1456.  
  1457. function htcpStartupVis()
  1458. {
  1459.  
  1460.     
  1461.     var htcpAlpha = theme.loadPreference('htcpID');
  1462.     //var winColor = theme.loadPreference('winAlpha');
  1463.     var winColor = 255
  1464.  
  1465.     if(htcpAlpha==1)
  1466.     {
  1467.         blendFrameFast('vis',2,winColor);
  1468.         visStatus = 0;
  1469.         
  1470.     }
  1471.     else if(htcpAlpha==2)
  1472.     {
  1473.         blendFrameFast('vis',2,255);
  1474.         blendFrameFast('vis',3,winColor);
  1475.         visStatus = 1;
  1476.     }
  1477.     else if(htcpAlpha==3)
  1478.     {
  1479.         //blendFrameFast('vis',2,255);
  1480.         blendFrameFast('vis',3,255);
  1481.         blendFrameFast('vis',4,winColor);
  1482.         visStatus = 2;
  1483.     }
  1484.     else if(htcpAlpha==4)
  1485.     {
  1486.  
  1487.         blendFrameFast('vis',4,0);
  1488.         visStatus = 3;
  1489.     }
  1490.     
  1491.     htcpVis();
  1492. }
  1493.  
  1494. function htcpVis()
  1495. {
  1496.  
  1497.     var winTimer = theme.loadPreference('htcpTimer');
  1498.     var htcpAlpha = theme.loadPreference('htcpID');
  1499.  
  1500.     if(htcpAlpha==1&&visStatus==0)
  1501.     {
  1502.         blendFrameSlow('vis',2,255,winTimer);
  1503.         visStatus++;
  1504.     }
  1505.     else if(htcpAlpha==2&&visStatus==1)
  1506.     {
  1507.         blendFrameFast('vis',2,255);
  1508.         blendFrameSlow('vis',3,255,winTimer);
  1509.         visStatus++;
  1510.     }
  1511.     else if(htcpAlpha==3&&visStatus==2)
  1512.     {
  1513.         blendFrameFast('vis',3,255);
  1514.         blendFrameSlow('vis',4,255,winTimer);
  1515.         visStatus++;
  1516.     }
  1517.     else if(htcpAlpha==4&&visStatus==3)
  1518.     {
  1519.         blendFrameSlow('vis',4,0,winTimer);
  1520.         visStatus = 0
  1521.     
  1522.         blendFrameFast('vis',2,0);
  1523.         blendFrameFast('vis',3,0);
  1524.     }
  1525.  
  1526. }
  1527.  
  1528. var vidStatus = 1;
  1529.  
  1530. function htcpStartupVid()
  1531. {
  1532.  
  1533.     
  1534.     var htcpAlpha = theme.loadPreference('htcpID');
  1535.     //var winColor = theme.loadPreference('winAlpha');
  1536.     var winColor = 255
  1537.  
  1538.     if(htcpAlpha==1)
  1539.     {
  1540.         blendFrameFast('vid',2,winColor);
  1541.         vidDrawer2.alphaBlend = 255;
  1542.         vidBack2.alphaBlend = 255;
  1543.         vidStatus = 0;
  1544.         
  1545.     }
  1546.     else if(htcpAlpha==2)
  1547.     {
  1548.         blendFrameFast('vid',2,255);
  1549.         blendFrameFast('vid',3,winColor);
  1550.         vidDrawer3.alphaBlend = 255;
  1551.         vidBack3.alphaBlend = 255;
  1552.         vidStatus = 1;
  1553.     }
  1554.     else if(htcpAlpha==3)
  1555.     {
  1556.         //blendFrameFast('vid',2,255);
  1557.         blendFrameFast('vid',3,255);
  1558.         blendFrameFast('vid',4,winColor);
  1559.         vidDrawer4.alphaBlend = 255;
  1560.         vidBack4.alphaBlend = 255;
  1561.         vidStatus = 2;
  1562.     }
  1563.     else if(htcpAlpha==4)
  1564.     {
  1565.  
  1566.         blendFrameFast('vid',4,0);
  1567.         vidDrawer4.alphaBlend = 0;
  1568.         vidBack4.alphaBlend = 0;
  1569.         vidStatus = 3;
  1570.     }
  1571.     
  1572.     htcpVid();
  1573. }
  1574.  
  1575. function htcpVid()
  1576. {
  1577.  
  1578.     var winTimer = theme.loadPreference('htcpTimer');
  1579.     var htcpAlpha = theme.loadPreference('htcpID');
  1580.  
  1581.     if(htcpAlpha==1&&vidStatus==0)
  1582.     {
  1583.         blendFrameSlow('vid',2,255,winTimer);
  1584.         vidDrawer2.alphaBlendTo(255,winTimer);
  1585.         vidBack2.alphaBlendTo(255,winTimer);
  1586.         brightnessText.foregroundColor = "#221916";
  1587.         contrastText.foregroundColor = "#221916";
  1588.         hueText.foregroundColor = "#221916";
  1589.         saturationText.foregroundColor = "#221916";
  1590.         brightness.thumbImage = "bal_thumb_2.png";
  1591.         contrast.thumbImage = "bal_thumb_2.png";
  1592.         hue.thumbImage = "bal_thumb_2.png";
  1593.         saturation.thumbImage = "bal_thumb_2.png";
  1594.         vidStatus++;
  1595.     }
  1596.     else if(htcpAlpha==2&&vidStatus==1)
  1597.     {
  1598.         blendFrameFast('vid',2,255);
  1599.         blendFrameSlow('vid',3,255,winTimer);
  1600.         vidDrawer3.alphaBlendTo(255,winTimer);
  1601.         vidBack3.alphaBlendTo(255,winTimer);
  1602.         brightnessText.foregroundColor = "#000000";
  1603.         contrastText.foregroundColor = "#000000";
  1604.         hueText.foregroundColor = "#000000";
  1605.         saturationText.foregroundColor = "#000000";
  1606.         brightness.thumbImage = "bal_thumb_3.png";
  1607.         contrast.thumbImage = "bal_thumb_3.png";
  1608.         hue.thumbImage = "bal_thumb_3.png";
  1609.         saturation.thumbImage = "bal_thumb_3.png";
  1610.         vidStatus++;
  1611.     }
  1612.     else if(htcpAlpha==3&&vidStatus==2)
  1613.     {
  1614.         blendFrameFast('vid',3,255);
  1615.         blendFrameSlow('vid',4,255,winTimer);
  1616.         vidDrawer4.alphaBlendTo(255,winTimer);
  1617.         vidBack4.alphaBlendTo(255,winTimer);
  1618.         brightnessText.foregroundColor = "#221916";
  1619.         contrastText.foregroundColor = "#221916";
  1620.         hueText.foregroundColor = "#221916";
  1621.         saturationText.foregroundColor = "#221916";
  1622.         brightness.thumbImage = "bal_thumb_2.png";
  1623.         contrast.thumbImage = "bal_thumb_2.png";
  1624.         hue.thumbImage = "bal_thumb_2.png";
  1625.         saturation.thumbImage = "bal_thumb_2.png";
  1626.         vidStatus++;
  1627.     }
  1628.     else if(htcpAlpha==4&&vidStatus==3)
  1629.     {
  1630.         blendFrameSlow('vid',4,0,winTimer);
  1631.         vidDrawer4.alphaBlendTo(0,winTimer);
  1632.         vidBack4.alphaBlendTo(0,winTimer);
  1633.         brightnessText.foregroundColor = "#2D0043";
  1634.         contrastText.foregroundColor = "#2D0043";
  1635.         hueText.foregroundColor = "#2D0043";
  1636.         saturationText.foregroundColor = "#2D0043";
  1637.         brightness.thumbImage = "bal_thumb_1.png";
  1638.         contrast.thumbImage = "bal_thumb_1.png";
  1639.         hue.thumbImage = "bal_thumb_1.png";
  1640.         saturation.thumbImage = "bal_thumb_1.png";
  1641.         vidStatus = 0
  1642.     
  1643.         vidBack2.alphaBlend = 0;
  1644.         vidBack3.alphaBlend = 0;
  1645.         vidDrawer2.alphaBlend = 0;
  1646.         vidDrawer3.alphaBlend = 0;
  1647.         blendFrameFast('vid',2,0);
  1648.         blendFrameFast('vid',3,0);
  1649.     }
  1650.  
  1651. }
  1652.  
  1653.