home *** CD-ROM | disk | FTP | other *** search
Wrap
/* http://www.theskinsfactory.com info@theskinsfactory.com Amped2 WMP 9Series skin (XP) */ function remoteStartUp() { volume.value = player.settings.volume; theme.savePreference( 'remoteViewer', "true" ); htcpStartupRemote(); // checkPlayerState(); } function remoteShutDown() { } function remoteCall() { if("true"==theme.loadPreference("remoteCallPl")) { toggleView('plView','plViewer') theme.savePreference("remoteCallPl", "false"); } if("true"==theme.loadPreference("remoteCallEq")) { toggleView('eqView','eqViewer') theme.savePreference("remoteCallEq", "false"); } if("true"==theme.loadPreference("remoteCallVis")) { toggleView('visView','visViewer') theme.savePreference("remoteCallVis", "false"); } htcpMain(); theme.savePreference('htcpTimerStatus',"false"); } function mainStartUp() { htcpSetTimerStatus(); htcpSetTimer(); htcpSetID(); loadMainPrefs(); theme.savePreference("vidViewer", "false"); checkPlayerState(); updateMetadata('status'); } function checkPlayerState() { if (player) { switch (player.playState) { case 2: case 3: //playing if(("false"==theme.loadPreference("vidViewer"))&&player.currentMedia.ImageSourceWidth>0) { sampleAlpha(); theme.openView('videoView'); theme.savePreference('htcpTimerStatus', "false" ); if("true"==theme.loadPreference("visViewer")){ theme.savePreference("visViewer", "false"); theme.closeView( "visView" ); } break } break; } } if(!player.controls.isAvailable("Stop")) { } } // metadata function updateMetadata(type){ if("status"==type){ if(player.openState!=13) return; var metaAuthor = player.currentMedia.getItemInfo("author"); if (metaAuthor != "") { metaAuthor += " - "; } metadata.value = player.status; if (metadata.value != "") { metadata.value += " - "; } metadata.value += metaAuthor; }else if("playlist"==type){ if(player.currentPlaylist.count==0) return; var metaAuthor = player.currentMedia.getItemInfo("author"); if (metaAuthor != "") { metaAuthor += " - "; } if(player.openState!=13){ metadata.value = metaAuthor; } }else{ metadata.value = player.status; metadata.scrolling = (metadata.textWidth>metadata.width); return; } metadata.value += player.currentmedia.name; metadata.scrolling = (metadata.textWidth>metadata.width); } // open file function openFile() { var media = theme.openDialog('FILE_OPEN','FILES_ALLMEDIA'); if(media) { player.URL = media; player.controls.play(); } } function viewHotKeys() { switch(event.keycode) { case 122: case 90: player.controls.previous(); break; case 120: case 88: player.controls.play(); break; case 99: case 67: player.controls.pause(); break; case 118: case 86: player.controls.stop(); break; case 98: case 66: player.controls.next(); break; case 108: case 76: openFile(); break; } } function viewResizer(event) { switch(event.keycode) { case 37: view.width-=20; break; case 38: view.height-=20 break; case 39: view.width+=20; break; case 40: view.height+=20; break; } } function updateToolTip(id,button,tip) { if("true"==theme.loadPreference( id )) { eval( button +".upToolTip = locHide" + tip + ".toolTip" ); } else { eval( button +".upToolTip = locShow" + tip + ".toolTip" ); } } function updateSeekToolTip() { if(player.openState!=13) return; var seekHours = Math.floor((seek.value / 3600)); if (seekHours < 10) seekHours = "0" + seekHours; var seekMinutes = Math.floor((seek.value - (seekHours*3600))/60); if (seekMinutes < 10) seekMinutes = "0" + seekMinutes; var seekSeconds = Math.floor((seek.value - (seekMinutes*60) - (seekHours*3600))); if (seekSeconds < 10) seekSeconds = "0" + seekSeconds; var seekString; if (seekHours==00) { seekString = ""; } else { seekString = seekHours + ":"; } seekString += seekMinutes + ":" + seekSeconds; seek.toolTip = seekString; seek.toolTip += " / "; seek.toolTip += player.currentMedia.DurationString; } function updateVolToolTip(id) { vol = ""; vol += player.settings.volume; eval(id + ".toolTip = vol" ); } function updateShuffRep() { if(player.settings.getMode('shuffle')) { shuffleButton.down = true; }else{ shuffleButton.down = false; } if(player.settings.getMode('loop')) { repeatButton.down = true; }else{ repeatButton.down = false; } } // function volKey(event) { switch(event.keycode) { case 39: case 38: if(player.settings.volume < 95) { player.settings.volume+=5; }else{ player.settings.volume = 100; } break; case 37: case 40: if(player.settings.volume > 5) { player.settings.volume-=5; }else{ player.settings.volume = 0; } break; } player.settings.mute = false; } function seekKey(event) { switch(event.keycode) { case 37: case 40: if(player.controls.currentPosition > 10) { player.controls.currentPosition-=10; }else{ player.controls.currentPosition = 0; } break; case 39: case 38: if(player.controls.currentPosition < player.currentMedia.duration) { player.controls.currentPosition+=10; }else{ player.controls.currentPosition = player.currentMedia.duration; } break; } } // view toggle function toggleView(name,id) { if("true"==theme.loadPreference(id)) { theme.savePreference(id, "false"); theme.closeView( name ); }else{ sampleAlpha(); theme.openView( name ); } } function closeView(id) { theme.savePreference(id, "false"); if( id=="vidViewer" ) { player.controls.stop(); //theme.savePreference("vidCheck", "false"); theme.savePreference("vidViewer", "false"); } view.close(); } function autoSizeView(width,height) { var viewSize = theme.loadPreference( width ); if( "--" != viewSize ) { view.width = viewSize; }else{ view.width = view.minWidth; } viewSize = theme.loadpreference( height ); if( "--" != viewSize ) { view.height = viewSize; }else{ view.height = view.minHeight; } } function saveViewSize(width,height) { theme.savepreference( width , view.width ); theme.savepreference( height , view.height ); } // preferences function loadMainPrefs(){ htcpStartup(); sampleAlpha(); if ("true"==theme.loadPreference("plViewer")) { theme.openView( 'plView' ); } if ("true"==theme.loadPreference("eqViewer")) { theme.openView( 'eqView' ); } if ("true"==theme.loadPreference("visViewer")) { theme.openView( 'visView' ); } if ("true"==theme.loadPreference("remoteViewer")) { theme.openView( 'remoteView' ); } } function saveMainPrefs() { } function mainShutDown() { saveMainPrefs(); } // // // /* Hyper-Transient Color PhasingÖ (HTCP) Hyper-Transient Color Phasing is a trademark of The Skins Factory, Inc. Patent Pending. All scripts related to Hyper-Transient Color Phasing are Copyright ⌐ 2003. The Skins Factory, Inc. All Rights Reserved. Private use only. Sale, duplication, or other transfer of this material is strictly prohibited. */ function blendFrameFast(win, num, blend) { for(x=1; x<9; x++) { eval( win + x + "_" + num + ".alphaBlend = '" + blend + "';" ); } } function blendFrameSlow(win, num, blend, speed) { for(x=1; x<9; x++) { eval( win + x + "_" + num + ".alphaBlendTo(" + blend + "," + speed + ");" ); } } function htcpSetMsg() { var val = theme.loadPreference('htcpMsg'); if(val=='--') { theme.savePreference('htcpMsg','true'); } } function htcpMsgToggle() { if("true"==theme.loadPreference("htcpMsg")){ theme.savePreference('htcpMsg', "false" ); msgButton.down = true; } else { theme.savePreference('htcpMsg', "true" ); msgButton.down = false; } } function htcpSetTimerStatus() { var val = theme.loadPreference('htcpTimerStatus'); if(val=='--') { theme.savePreference('htcpTimerStatus',"false"); } } function htcpSetTimer() { var val = theme.loadPreference('htcpTimer'); if(val=='--') { theme.savePreference('htcpTimer',1000); } } function htcpSetID() { var val = theme.loadPreference('htcpID'); if(val=='--') { theme.savePreference('htcpID','5'); } } function htcpTimerPause() { if("true"==theme.loadPreference("htcpTimerStatus")){ theme.savePreference('htcpTimerStatus', "false" ); htcpValue.value = htcpPause.toolTip; htcpAdjust.toolTip = htcp2.toolTip; htcpAdjust.enabled = false; } else { theme.savePreference('htcpTimerStatus', "true" ); htcpAdjust.enabled = true; htcpSliderUpdate(); htcpAdjust.toolTip = htcp1.toolTip; } } var mainStatus = 1; var htcpStatus = 0; function htcpStartup() { var mainColor = theme.loadPreference('htcpID'); if(mainColor==1) { mainBack2.alphaBlend = 255; mainStatus = 1; htcpStatus = 0; time.foregroundColor = "#a2d626"; } else if(mainColor==2) { mainBack3.alphaBlend = 255; mainStatus = 2; htcpStatus = 1; time.foregroundColor = "#2885d8"; } else if(mainColor==3) { mainBack3.alphaBlend = 255; mainBack4.alphaBlend = 255; mainStatus = 3; htcpStatus = 2; time.foregroundColor = "#ff1203"; } else if(mainColor==4) { mainBack5.alphaBlend = 255; mainStatus = 4; htcpStatus = 3; time.foregroundColor = "#ff7f04"; } else if(mainColor==5) { mainBack5.alphaBlend = 0; mainStatus = 5; htcpStatus = 4; time.foregroundColor = "#d1d9e3"; } htcpMain(); theme.savePreference('htcpTimerStatus', 'true' ); } function htcpMain() { var mainTimer = theme.loadPreference('htcpTimer'); if("true"==theme.loadPreference('htcpTimerStatus')) { if(mainStatus==1&&htcpStatus==0) { mainBack2.alphaBlendTo(255,mainTimer); mainStatus++ theme.savePreference('htcpID','1'); time.foregroundColor = "#a2d626"; } else if(mainStatus==2&&htcpStatus==1) { mainBack3.alphaBlendTo(255,mainTimer); mainStatus++ theme.savePreference('htcpID','2'); time.foregroundColor = "#2885d8"; } else if(mainStatus==3&&htcpStatus==2) { mainBack4.alphaBlendTo(255,mainTimer); mainStatus++ theme.savePreference('htcpID','3'); time.foregroundColor = "#ff1203"; } else if(mainStatus==4&&htcpStatus==3) { mainBack5.alphaBlendTo(255,mainTimer); mainStatus++ theme.savePreference('htcpID','4'); time.foregroundColor = "#ff7f04"; } else if(mainStatus==5&&htcpStatus==4) { mainBack5.alphaBlendTo(0,mainTimer); mainStatus = 1; theme.savePreference('htcpID','5'); time.foregroundColor = "#d1d9e3"; mainBack2.alphaBlend = 0; mainBack3.alphaBlend = 0; mainBack4.alphaBlend = 0; } // var viewTimer = theme.loadPreference('htcpViewTimer'); // view.timerInterval = (Math.round(viewTimer)) + (Math.round(mainTimer)); } } function htcpCheck() { htcpStatus++ if(htcpStatus==5) { htcpStatus = 0; } } function sampleAlpha() { var htcpAlpha = theme.loadPreference('htcpID'); if(htcpAlpha==1) { htcpOpac = mainBack2.alphaBlend; theme.savePreference('winAlpha',htcpOpac); } else if(htcpAlpha==2) { htcpOpac = mainBack3.alphaBlend; theme.savePreference('winAlpha',htcpOpac); } else if(htcpAlpha==3) { htcpOpac = mainBack4.alphaBlend; theme.savePreference('winAlpha',htcpOpac); } else if(htcpAlpha==4) { htcpOpac = mainBack5.alphaBlend; theme.savePreference('winAlpha',htcpOpac); } else if(htcpAlpha==5) { htcpOpac = mainBack5.alphaBlend; theme.savePreference('winAlpha',htcpOpac); } } var remoteStatus = 1; function htcpStartupRemote() { var htcpAlpha = theme.loadPreference('htcpID'); var winColor = theme.loadPreference('winAlpha'); if(htcpAlpha==1) { remoteBack2.alphaBlend = winColor; remoteStatus = 0; } else if(htcpAlpha==2) { remoteBack2.alphaBlend = 255; remoteBack3.alphaBlend = winColor; remoteStatus = 1; } else if(htcpAlpha==3) { remoteBack3.alphaBlend = 255; remoteBack4.alphaBlend = winColor; remoteStatus = 2; } else if(htcpAlpha==4) { remoteBack4.alphaBlend = 255; remoteBack5.alphaBlend = winColor; remoteStatus = 3; } else if(htcpAlpha==5) { remoteBack5.alphaBlend = winColor; remoteStatus = 4; } htcpRemote(); } function htcpRemote() { var winTimer = theme.loadPreference('htcpTimer'); var htcpAlpha = theme.loadPreference('htcpID'); if(htcpAlpha==1&&remoteStatus==0) { remoteBack2.alphaBlendTo(255,winTimer); remoteStatus++; } else if(htcpAlpha==2&&remoteStatus==1) { remoteBack3.alphaBlendTo(255,winTimer); remoteStatus++; } else if(htcpAlpha==3&&remoteStatus==2) { remoteBack4.alphaBlendTo(255,winTimer); remoteStatus++; } else if(htcpAlpha==4&&remoteStatus==3) { remoteBack5.alphaBlendTo(255,winTimer); remoteStatus++; } else if(htcpAlpha==5&&remoteStatus==4) { remoteBack5.alphaBlendTo(0,winTimer); remoteStatus = 0; remoteBack2.alphaBlend = 0; remoteBack3.alphaBlend = 0; remoteBack4.alphaBlend = 0; } } var plStatus = 1; function htcpStartupPl() { var htcpAlpha = theme.loadPreference('htcpID'); var winColor = theme.loadPreference('winAlpha'); if(htcpAlpha==1) { blendFrameFast('pl',2,winColor); plStatus = 0; playlist1.itemPlayingBackgroundColor = "#a2d626"; playlist1.itemPlayingColor = "#000000"; } else if(htcpAlpha==2) { blendFrameFast('pl',2,255); blendFrameFast('pl',3,winColor); plStatus = 1; playlist1.itemPlayingBackgroundColor = "#2885d8"; playlist1.itemPlayingColor = "#ffffff"; } else if(htcpAlpha==3) { blendFrameFast('pl',2,255); blendFrameFast('pl',3,255); blendFrameFast('pl',4,winColor); plStatus = 2; playlist1.itemPlayingBackgroundColor = "#ff1203"; playlist1.itemPlayingColor = "#ffffff"; } else if(htcpAlpha==4) { blendFrameFast('pl',3,255); blendFrameFast('pl',4,255); blendFrameFast('pl',5,winColor); plStatus = 3; playlist1.itemPlayingBackgroundColor = "#ff7f04"; playlist1.itemPlayingColor = "#ffffff"; } else if(htcpAlpha==5) { blendFrameFast('pl',5,winColor); plStatus = 4; playlist1.itemPlayingBackgroundColor = "#d1d9e3"; playlist1.itemPlayingColor = "#000000"; } htcpPl(); } function htcpPl() { var winTimer = theme.loadPreference('htcpTimer'); var htcpAlpha = theme.loadPreference('htcpID'); if(htcpAlpha==1&&plStatus==0) { blendFrameSlow('pl',2,255,winTimer); plStatus++; playlist1.itemPlayingBackgroundColor = "#a2d626"; playlist1.itemPlayingColor = "#000000"; } else if(htcpAlpha==2&&plStatus==1) { blendFrameFast('pl',2,255); blendFrameSlow('pl',3,255,winTimer); plStatus++; playlist1.itemPlayingBackgroundColor = "#2885d8"; playlist1.itemPlayingColor = "#ffffff"; } else if(htcpAlpha==3&&plStatus==2) { blendFrameFast('pl',3,255); blendFrameSlow('pl',4,255,winTimer); plStatus++; playlist1.itemPlayingBackgroundColor = "#ff1203"; playlist1.itemPlayingColor = "#ffffff"; } else if(htcpAlpha==4&&plStatus==3) { blendFrameFast('pl',4,255); blendFrameSlow('pl',5,255,winTimer); plStatus++; playlist1.itemPlayingBackgroundColor = "#ff7f04"; playlist1.itemPlayingColor = "#ffffff"; } else if(htcpAlpha==5&&plStatus==4) { blendFrameSlow('pl',5,0,winTimer); plStatus = 0; playlist1.itemPlayingBackgroundColor = "#d1d9e3"; playlist1.itemPlayingColor = "#000000"; blendFrameFast('pl',2,0); blendFrameFast('pl',3,0); blendFrameFast('pl',4,0); } } var eqStatus = 1; function htcpStartupEq() { var htcpAlpha = theme.loadPreference('htcpID'); var winColor = theme.loadPreference('winAlpha'); if(htcpAlpha==1) { blendFrameFast('eq',2,winColor); eqStatus = 0; } else if(htcpAlpha==2) { blendFrameFast('eq',2,255); blendFrameFast('eq',3,winColor); eqStatus = 1; } else if(htcpAlpha==3) { blendFrameFast('eq',3,255); blendFrameFast('eq',4,winColor); eqStatus = 2; } else if(htcpAlpha==4) { blendFrameFast('eq',4,255); blendFrameFast('eq',5,winColor); eqStatus = 3; } else if(htcpAlpha==5) { blendFrameFast('eq',5,winColor); eqStatus = 4; } htcpEq(); } function htcpEq() { var winTimer = theme.loadPreference('htcpTimer'); var htcpAlpha = theme.loadPreference('htcpID'); if(htcpAlpha==1&&eqStatus==0) { blendFrameSlow('eq',2,255,winTimer); eqStatus++; toggleSliderColor('2'); } else if(htcpAlpha==2&&eqStatus==1) { blendFrameSlow('eq',3,255,winTimer); eqStatus++; toggleSliderColor('3'); } else if(htcpAlpha==3&&eqStatus==2) { blendFrameSlow('eq',4,255,winTimer); eqStatus++; toggleSliderColor('4'); } else if(htcpAlpha==4&&eqStatus==3) { blendFrameSlow('eq',5,255,winTimer); eqStatus++; toggleSliderColor('5'); } else if(htcpAlpha==5&&eqStatus==4) { blendFrameSlow('eq',5,0,winTimer); eqStatus = 0; toggleSliderColor('1'); blendFrameFast('eq',2,0); blendFrameFast('eq',3,0); blendFrameFast('eq',4,0); } } var visStatus = 1; function htcpStartupVis() { var htcpAlpha = theme.loadPreference('htcpID'); var winColor = theme.loadPreference('winAlpha'); if(htcpAlpha==1) { blendFrameFast('vis',2,winColor); visStatus = 0; } else if(htcpAlpha==2) { blendFrameFast('vis',2,255); blendFrameFast('vis',3,winColor); visStatus = 1; } else if(htcpAlpha==3) { blendFrameFast('vis',3,255); blendFrameFast('vis',4,winColor); visStatus = 2; } else if(htcpAlpha==4) { blendFrameFast('vis',4,255); blendFrameFast('vis',5,winColor); visStatus = 3; } else if(htcpAlpha==5) { blendFrameFast('vis',5,winColor); visStatus = 4; } htcpVis(); } function htcpVis() { var winTimer = theme.loadPreference('htcpTimer'); var htcpAlpha = theme.loadPreference('htcpID'); if(htcpAlpha==1&&visStatus==0) { blendFrameSlow('vis',2,255,winTimer); visStatus++; } else if(htcpAlpha==2&&visStatus==1) { blendFrameSlow('vis',3,255,winTimer); visStatus++; } else if(htcpAlpha==3&&visStatus==2) { blendFrameSlow('vis',4,255,winTimer); visStatus++; } else if(htcpAlpha==4&&visStatus==3) { blendFrameSlow('vis',5,255,winTimer); visStatus++; } else if(htcpAlpha==5&&visStatus==4) { blendFrameSlow('vis',5,0,winTimer); visStatus = 0; blendFrameFast('vis',2,0); blendFrameFast('vis',3,0); blendFrameFast('vis',4,0); } } var vidStatus = 1; function htcpStartupVid() { var htcpAlpha = theme.loadPreference('htcpID'); var winColor = theme.loadPreference('winAlpha'); if(htcpAlpha==1) { blendFrameFast('vid',2,winColor); vidDrawer2.alphaBlend = winColor; vidStatus = 0; } else if(htcpAlpha==2) { blendFrameFast('vid',2,255); blendFrameFast('vid',3,winColor); vidDrawer2.alphaBlend = 255; vidDrawer3.alphaBlend = winColor; vidStatus = 1; } else if(htcpAlpha==3) { blendFrameFast('vid',2,255); blendFrameFast('vid',3,255); blendFrameFast('vid',4,winColor); vidDrawer2.alphaBlend = 255; vidDrawer3.alphaBlend = 255; vidDrawer4.alphaBlend = winColor; vidStatus = 2; } else if(htcpAlpha==4) { blendFrameFast('vid',3,255); blendFrameFast('vid',4,255); blendFrameFast('vid',5,winColor); vidDrawer3.alphaBlend = 255; vidDrawer4.alphaBlend = 255; vidDrawer5.alphaBlend = winColor; vidStatus = 3; } else if(htcpAlpha==5) { blendFrameFast('vid',5,winColor); vidDrawer5.alphaBlend = winColor; vidStatus = 4; } htcpVid(); } function htcpVid() { var winTimer = theme.loadPreference('htcpTimer'); var htcpAlpha = theme.loadPreference('htcpID'); if(htcpAlpha==1&&vidStatus==0) { blendFrameSlow('vid',2,255,winTimer); vidDrawer2.alphaBlendTo(255,winTimer); vidStatus++; } else if(htcpAlpha==2&&vidStatus==1) { blendFrameFast('vid',2,255); blendFrameSlow('vid',3,255,winTimer); vidDrawer3.alphaBlendTo(255,winTimer); vidStatus++; } else if(htcpAlpha==3&&vidStatus==2) { blendFrameFast('vid',3,255); blendFrameSlow('vid',4,255,winTimer); vidDrawer4.alphaBlendTo(255,winTimer); vidStatus++; } else if(htcpAlpha==4&&vidStatus==3) { blendFrameFast('vid',4,255); blendFrameSlow('vid',5,255,winTimer); vidDrawer5.alphaBlendTo(255,winTimer); vidStatus++; } else if(htcpAlpha==5&&vidStatus==4) { blendFrameSlow('vid',5,0,winTimer); vidDrawer5.alphaBlendTo(0,winTimer); vidStatus = 0; blendFrameFast('vid',2,0); blendFrameFast('vid',3,0); blendFrameFast('vid',4,0); vidDrawer2.alphaBlend = 0; vidDrawer3.alphaBlend = 0; vidDrawer4.alphaBlend = 0; } } // // // // playlist function loadPlPrefs() { theme.savePreference( 'plViewer', "true" ); autoSizeView('plWidth','plHeight'); var index = 0; playlist1.setColumnResizeMode( index++, "AutosizeData" ); playlist1.setColumnResizeMode( index++, "Stretches" ); playlist1.setColumnResizeMode( index++, "AutosizeHeader" ); playlist1.setColumnResizeMode( index++, "AutosizeHeader" ); playlist1.setColumnResizeMode( index++, "AutosizeHeader" ); playlist1.setColumnResizeMode( index++, "AutosizeHeader" ); htcpStartupPl(); } function savePlPrefs(){ saveViewSize('plWidth','plHeight'); } // eq settings function loadEQPrefs(){ theme.savePreference( 'eqViewer', "true" ); view.width = view.minWidth; view.height = view.minHeight; htcpStartupEq(); } function updateBalToolTip(){ balance.toolTip = ""; balance.toolTip += player.settings.balance; } function toggleSpeaker(){ if(eq.speakerSize==2){ eq.speakerSize = -1; } eq.speakerSize++ } function toggleSliderColor(id) { for(x=1; x<=10 ; x++) { eval("eq" + x + ".foregroundImage='eq_slider_" + id + ".png'"); } eval("truBass.foregroundImage='srs_slider_" + id + ".png'"); eval("wowEffect.foregroundImage='srs_slider_" + id + ".png'"); eval("balance.thumbImage='eq_thumb_" + id + ".png'"); } // visualizations function loadVisPrefs(){ theme.savePreference( 'visViewer', "true" ); visEffects.currentEffectType = mediacenter.effectType; visEffects.currentPreset = mediacenter.effectPreset; autoSizeView('visWidth','visHeight'); htcpStartupVis(); checkVisualsPlayerState(); } function saveVisPrefs(){ mediacenter.effectType = visEffects.currentEffectType; mediacenter.effectPreset = visEffects.currentPreset; saveViewSize('visWidth','visHeight'); } function checkVisualsPlayerState(){ if (player){ switch (player.playState){ case 3: //playing //visMask.visible = true; break; } } if (!player.controls.isAvailable("Stop")) { //visMask.visible = false; } } // video settings function loadVidPrefs(){ theme.savePreference( 'vidViewer', "true" ); var _drawerStatus = theme.loadPreference('drawerStatus'); if (_drawerStatus != '--') { drawerStatus = (_drawerStatus.toLowerCase() == 'true') ? false : true; } else { drawerStatus = true; } checkSnapStatus(); checkVideoPlayerState(); htcpStartupVid(); updateZoomToolTip(); toggleVidDrawer(); } function saveVidPrefs(){ theme.savePreference('drawerStatus',drawerStatus); } function loadVidSize(){ var vidSizer = theme.loadPreference( "videoWidth" ); if( "--" != vidSizer ) { view.width = vidSizer; } vidSizer = theme.loadpreference( "videoHeight" ); if( "--" != vidSizer ) { view.height = vidSizer; } } function saveVidSize(){ theme.savepreference( "videoWidth", view.width ); theme.savepreference( "videoHeight", view.height ); theme.savePreference("vidSnapper" , "false"); vidZoom.upToolTip = vidSetTip.toolTip; mediacenter.videoZoom = 50; } function videoZoom(){ if("false"==theme.loadPreference("vidSnapper")){ mediacenter.videoZoom = 50; } if(mediacenter.videoZoom < 76){ mediacenter.videoZoom = 100; }else if(mediacenter.videoZoom <101){ mediacenter.videoZoom = 150; }else if(mediacenter.videoZoom < 156){ mediacenter.videoZoom = 200; }else{ mediacenter.videoZoom = 75; } SnapToVideo(); updateZoomToolTip(); } function updateZoomToolTip(){ vidZoom.upToolTip = vidZoomIn.toolTip + mediacenter.videoZoom + vidZoomMid.toolTip; if(mediacenter.videoZoom < 76){ nextZoom = 100; }else if(mediacenter.videoZoom <101){ nextZoom = 150; }else if(mediacenter.videoZoom < 156){ nextZoom = 200; }else{ nextZoom = 75; } vidZoom.upToolTip += nextZoom + vidZoomOut.toolTip; if("false"==theme.loadPreference("vidSnapper")){ vidZoom.upToolTip = vidSetTip.toolTip; } } function SnapToVideo(){ theme.savePreference("vidSnapper" , "true"); var zoom = mediacenter.videoZoom; var viewWidth = (player.currentMedia.imageSourceWidth * (zoom/100.00)); var viewHeight = (player.currentMedia.imageSourceHeight * (zoom/100.00)); view.width = viewWidth + 42; view.height = viewHeight + 129; } function checkSnapStatus(){ if(player.openState!=13) return; if("false"==theme.loadPreference("vidSnapper")){ loadVidSize(); }else{ SnapToVideo(); } } function checkVideoPlayerState(){ if (player){ switch (player.playState){ case 3: //playing if(!player.currentMedia.ImageSourceWidth>0){ theme.savePreference('vidViewer', "false"); view.close(); break; } vidBack.visible = false; videoFrame.visible = true; if(!player.fullScreen){ checkSnapStatus(); } break; case 8: return; break; } vidResize.enabled = true; vidZoom.enabled = true; } if (!player.controls.isAvailable("Stop")) { videoFrame.visible = false; vidResize.enabled = false; vidZoom.enabled = false; vidBack.visible = true; view.width = 317; view.height = 261; } } function toggleVidDrawer(){ if(!drawerStatus){ vidDrawer.moveTo(0,view.height-93,500); vidDrawerFrame.visible = true; vidDrawerButton.down = true; drawerStatus = !drawerStatus; }else{ vidDrawer.moveTo(0,view.height-180,500); drawerStatus = !drawerStatus; } } function checkVidDrawer(){ drawerStatus = drawerStatus; vidDrawerFrame.visible = drawerStatus; }