home *** CD-ROM | disk | FTP | other *** search
- //This script has been, in part, adapted from several other skins available on the web.
- //You know it's bad when a person can learn more from looking at other skins than he can
- //from the Skin Programming Reference at Microsoft!
-
- //DMv2.0, as a whole, is copywrited ⌐ 2003 DReaMer. All rights reserved. However, if you see
- //part of this code that could be useful to you in creating your own skin, please feel free
- //to "Cut and Paste". After all, how could one possibly copywrite pieces of code that are
- //essential to get a skin to "act" correctly?
-
- //This is my second attempt at skinning. And I am still learning the ropes of
- //my graphics program. The DMv2.0 is fully functional and probably has a bug or two in it.
-
- var col_group1 = true;
- var colors_Open = true;
- var pick_isOpen = false;
- var vidIsRunning = false;
- var videoIsVisible = false;
- var visualIsVisible = false;
- var emptyDrawerOpen = false;
- var visual_isOpen = false;
- var cont_isOpen = false;
- var vis_On = false;
- var rd_isOpen = false;
- var ld_isOpen = false;
- var detatched_closed = true;
- var optns_Open = false;
- var ops_R_Opening = false;
-
- function OnPlayStateChange(){
- if (player.PlayState == psUndefined || player.PlayState == psPlaying){
- Play();}}
-
- function OnOpenStateChange(){
- switch (player.OpenState){
- case osUndefined:
- UpdateMetadata();
- break;
- Play();
- case osMediaOpen:
- UpdateMetadata();
- Play();
- break;}}
-
- function Play(){
- if (player.currentMedia.ImageSourceWidth>0){
- vidIsRunning=true;
- StartVideo();}
- UpdateMetadata();
- player.controls.play();}
-
- function Stop(){
- player.controls.stop();}
-
- function StartVideo(){
- var i
- videoIsVisible = false;
- openEmpty('vid');
- vidIsRunning = true;}
-
- function Stop(){
- player.controls.stop();}
-
- function UpdateMetadata(){
- metadata.value = "½ ";
- artistname = player.currentmedia.getiteminfo("#author");
- if (artistname == "") { artistname = player.currentmedia.getiteminfo("author"); }
- if (artistname != "") { artistname += " - "; }
- metadata.value += artistname;
- metadata.value += player.currentmedia.name;
- metadata.value += " ╗";
- metadata.scrolling = (metadata.textWidth>metadata.width);}
-
- function visOnOff2(){
- if(vis_On){
- vis2.visible = false;
- vis_On = false;
- visOn1.visible = true;
- visOff1.visible = false;
- } else {
- vis2.visible = true;
- vis_On = true;
- visOff1.visible = true;
- visOn1.visible = false;}}
-
- function Fullscreen(){
- vidscreen.fullscreen = true;}
-
- function loadColorPrefs(){
- var temp3 = theme.loadPreference('butColor');
- if (temp3!="--") {hidden3.backgroundColor = temp3;}}
-
- function saveColorPrefs(){
- theme.savePreference('butColor', hidden.backgroundColor);}
-
- function LoadColor(){
- if(hidden3.backgroundColor == "#FF0000"){
- LoadRed();}
- if(hidden3.backgroundColor == "#FFA500"){
- LoadOrange();}
- if(hidden3.backgroundColor == "#FFFF00"){
- LoadYellow();}
- if(hidden3.backgroundColor == "#008000"){
- LoadGreen();}
- if(hidden3.backgroundColor == "#00FFFF"){
- LoadCyan();}
- if(hidden3.backgroundColor == "#0000FF"){
- LoadBlue();}
- if(hidden3.backgroundColor == "#800080"){
- LoadPurple();}
- if(hidden3.backgroundColor == "#FF00FF"){
- LoadMagenta();}
- if(hidden3.backgroundColor == "#C71585"){
- LoadRaspberry();}
- if(hidden3.backgroundColor == "#000000"){
- LoadBlack();}
- }
- function LoadRed(){
- visConButs1.image = "Vis-NePr-Red-up.png";
- visConButs1.hoverImage = "Vis-NePr-Red-hov.png";
- visConButs1.downImage = "Vis-NePr-Red-dwn.png";
- visOn1.image = "Vis-On-Red-up.png";
- visOn1.hoverImage = "Vis-On-Red-hov.png";
- visOn1.downImage = "Vis-On-Red-dwn.png";
- visOff1.image = "Vis-Off-Red-up.png";
- visOff1.hoverImage = "Vis-Off-Red-hov.png";
- visOff1.downImage = "Vis-Off-Red-dwn.png";
- vidConback1.backgroundImage = "VidCon-Red.png";
- brightness1.foregroundImage = contrast1.foregroundImage = hue1.foregroundImage = saturation1.foregroundImage = "Vid-Slot-Red.png";}
- function LoadOrange(){
- visConButs1.image = "Vis-NePr-Orange-up.png";
- visConButs1.hoverImage = "Vis-NePr-Orange-hov.png";
- visConButs1.downImage = "Vis-NePr-Orange-dwn.png";
- visOn1.image = "Vis-On-Orange-up.png";
- visOn1.hoverImage = "Vis-On-Orange-hov.png";
- visOn1.downImage = "Vis-On-Orange-dwn.png";
- visOff1.image = "Vis-Off-Orange-up.png";
- visOff1.hoverImage = "Vis-Off-Orange-hov.png";
- visOff1.downImage = "Vis-Off-Orange-dwn.png";
- vidConback1.backgroundImage = "VidCon-Orange.png";
- brightness1.foregroundImage = contrast1.foregroundImage = hue1.foregroundImage = saturation1.foregroundImage = "Vid-Slot-Orange.png";}
- function LoadYellow(){
- visConButs1.image = "Vis-NePr-Yellow-up.png";
- visConButs1.hoverImage = "Vis-NePr-Yellow-hov.png";
- visConButs1.downImage = "Vis-NePr-Yellow-dwn.png";
- visOn1.image = "Vis-On-Yellow-up.png";
- visOn1.hoverImage = "Vis-On-Yellow-hov.png";
- visOn1.downImage = "Vis-On-Yellow-dwn.png";
- visOff1.image = "Vis-Off-Yellow-up.png";
- visOff1.hoverImage = "Vis-Off-Yellow-hov.png";
- visOff1.downImage = "Vis-Off-Yellow-dwn.png";
- vidConback1.backgroundImage = "VidCon-Yellow.png";
- brightness1.foregroundImage = contrast1.foregroundImage = hue1.foregroundImage = saturation1.foregroundImage = "Vid-Slot-Yellow.png";}
- function LoadGreen(){
- visConButs1.image = "Vis-NePr-Red-up.png";
- visConButs1.hoverImage = "Vis-NePr-Red-hov.png";
- visConButs1.downImage = "Vis-NePr-Red-dwn.png";
- visOn1.image = "Vis-On-Red-up.png";
- visOn1.hoverImage = "Vis-On-Red-hov.png";
- visOn1.downImage = "Vis-On-Red-dwn.png";
- visOff1.image = "Vis-Off-Red-up.png";
- visOff1.hoverImage = "Vis-Off-Red-hov.png";
- visOff1.downImage = "Vis-Off-Red-dwn.png";
- vidConback1.backgroundImage = "VidCon-Red.png";
- brightness1.foregroundImage = contrast1.foregroundImage = hue1.foregroundImage = saturation1.foregroundImage = "Vid-Slot-Red.png";}
- function LoadCyan(){
- visConButs1.image = "Vis-NePr-Cyan-up.png";
- visConButs1.hoverImage = "Vis-NePr-Cyan-hov.png";
- visConButs1.downImage = "Vis-NePr-Cyan-dwn.png";
- visOn1.image = "Vis-On-Cyan-up.png";
- visOn1.hoverImage = "Vis-On-Cyan-hov.png";
- visOn1.downImage = "Vis-On-Cyan-dwn.png";
- visOff1.image = "Vis-Off-Cyan-up.png";
- visOff1.hoverImage = "Vis-Off-Cyan-hov.png";
- visOff1.downImage = "Vis-Off-Cyan-dwn.png";
- vidConback1.backgroundImage = "VidCon-Cyan.png";
- brightness1.foregroundImage = contrast1.foregroundImage = hue1.foregroundImage = saturation1.foregroundImage = "Vid-Slot-Cyan.png";}
- function LoadBlue(){
- visConButs1.image = "Vis-NePr-Blue-up.png";
- visConButs1.hoverImage = "Vis-NePr-Blue-hov.png";
- visConButs1.downImage = "Vis-NePr-Blue-dwn.png";
- visOn1.image = "Vis-On-Blue-up.png";
- visOn1.hoverImage = "Vis-On-Blue-hov.png";
- visOn1.downImage = "Vis-On-Blue-dwn.png";
- visOff1.image = "Vis-Off-Blue-up.png";
- visOff1.hoverImage = "Vis-Off-Blue-hov.png";
- visOff1.downImage = "Vis-Off-Blue-dwn.png";
- vidConback1.backgroundImage = "VidCon-Blue.png";
- brightness1.foregroundImage = contrast1.foregroundImage = hue1.foregroundImage = saturation1.foregroundImage = "Vid-Slot-Blue.png";}
- function LoadPurple(){
- visConButs1.image = "Vis-NePr-Purple-up.png";
- visConButs1.hoverImage = "Vis-NePr-Purple-hov.png";
- visConButs1.downImage = "Vis-NePr-Purple-dwn.png";
- visOn1.image = "Vis-On-Purple-up.png";
- visOn1.hoverImage = "Vis-On-Purple-hov.png";
- visOn1.downImage = "Vis-On-Purple-dwn.png";
- visOff1.image = "Vis-Off-Purple-up.png";
- visOff1.hoverImage = "Vis-Off-Purple-hov.png";
- visOff1.downImage = "Vis-Off-Purple-dwn.png";
- vidConback1.backgroundImage = "VidCon-Purple.png";
- brightness1.foregroundImage = contrast1.foregroundImage = hue1.foregroundImage = saturation1.foregroundImage = "Vid-Slot-Purple.png";}
- function LoadMagenta(){
- visConButs1.image = "Vis-NePr-Magenta-up.png";
- visConButs1.hoverImage = "Vis-NePr-Magenta-hov.png";
- visConButs1.downImage = "Vis-NePr-Magenta-dwn.png";
- visOn1.image = "Vis-On-Magenta-up.png";
- visOn1.hoverImage = "Vis-On-Magenta-hov.png";
- visOn1.downImage = "Vis-On-Magenta-dwn.png";
- visOff1.image = "Vis-Off-Magenta-up.png";
- visOff1.hoverImage = "Vis-Off-Magenta-hov.png";
- visOff1.downImage = "Vis-Off-Magenta-dwn.png";
- vidConback1.backgroundImage = "VidCon-Magenta.png";
- brightness1.foregroundImage = contrast1.foregroundImage = hue1.foregroundImage = saturation1.foregroundImage = "Vid-Slot-Magenta.png";}
- function LoadRaspberry(){
- visConButs1.image = "Vis-NePr-Rasberry-up.png";
- visConButs1.hoverImage = "Vis-NePr-Rasberry-hov.png";
- visConButs1.downImage = "Vis-NePr-Rasberry-dwn.png";
- visOn1.image = "Vis-On-Rasberry-up.png";
- visOn1.hoverImage = "Vis-On-Rasberry-hov.png";
- visOn1.downImage = "Vis-On-Rasberry-dwn.png";
- visOff1.image = "Vis-Off-Rasberry-up.png";
- visOff1.hoverImage = "Vis-Off-Rasberry-hov.png";
- visOff1.downImage = "Vis-Off-Rasberry-dwn.png";
- vidConback1.backgroundImage = "VidCon-Rasberry.png";
- brightness1.foregroundImage = contrast1.foregroundImage = hue1.foregroundImage = saturation1.foregroundImage = "Vid-Slot-Rasberry.png";}
- function LoadBlack(){
- visConButs1.image = "Vis-NePr-Black-up.png";
- visConButs1.hoverImage = "Vis-NePr-Black-hov.png";
- visConButs1.downImage = "Vis-NePr-Black-dwn.png";
- visOn1.image = "Vis-On-Black-up.png";
- visOn1.hoverImage = "Vis-On-Black-hov.png";
- visOn1.downImage = "Vis-On-Black-dwn.png";
- visOff1.image = "Vis-Off-Black-up.png";
- visOff1.hoverImage = "Vis-Off-Black-hov.png";
- visOff1.downImage = "Vis-Off-Black-dwn.png";
- vidConback1.backgroundImage = "VidCon-Black.png";
- brightness1.foregroundImage = contrast1.foregroundImage = hue1.foregroundImage = saturation1.foregroundImage = "Vid-Slot-Black.png";}
-
- var g_fExpectingSizeChange = false;
- var g_fUserHasSized = false;
-
- function AllowResizeVideo(){
- mediacenter.videoStretchToFit=true;
- mediacenter.videoShrinkToFit=true;
- return;}
-
- function moveVisControlsDet(){
- if (visual_isOpen) {
- visControl2.moveTo(view.width-210,view.height-126,500);
- visual_isOpen = false;
- openVisCon2.upTooltip = "Open Visualization Controls";
- } else {
- visControl2.moveTo(view.width-130,view.height-126,500);
- visual_isOpen = true;
- openVisCon2.upTooltip = "Close Visualization Controls";}}
-
- function moveVidControlsDet(){
- if (cont_isOpen) {
- vidControl2.moveTo(90,view.height-126,400);
- cont_isOpen = false;
- openVidCon2.upTooltip = "Open Image Controls";
- } else {
- vidControl2.moveTo(0,view.height-126,400);
- cont_isOpen = true;
- openVidCon2.upTooltip = "Close Image Controls";}}
-
- function ZoomVideo(){
- g_fUserHasSized = true;
-
- mediacenter.videoStretchToFit = false;
- mediacenter.videoShrinkToFit = false;
-
- if( mediacenter.videoZoom < 51 ){
- mediacenter.videoZoom = 100;}
- else if( mediacenter.videoZoom < 101 ){
- mediacenter.videoZoom = 200;}
- else{
- mediacenter.videoZoom = 50;}
- SnapToVideo();}
-
- function SnapToVideo(){
- if((!g_fUserHasSized && mediacenter.videoStretchToFit) || !mediacenter.videoStretchToFit){
- var zoom = mediacenter.videoStretchToFit ? 100 : mediacenter.videoZoom;
- var x = (player.currentMedia.imageSourceWidth * (zoom / 100.0));
- var y = (player.currentMedia.imageSourceHeight * (zoom / 100.0));
- g_fExpectingSizeChange = true;
- view.width = x + 202;
- view.height = y + 58;
- g_fExpectingSizeChange = false;}
- else{
- view.height= player.currentMedia.imageSourceHeight + 58;
- view.width= player.currentMedia.imageSourceWidth + 202;}
- vidinfo.value = "Zoom: " + mediacenter.videoZoom + "%";}
-
- function ZoomVideoUp(){
- g_fUserHasSized = true;
- mediacenter.videoStretchToFit = false;
- mediacenter.videoShrinkToFit = false;
- if( mediacenter.videoZoom < 51 ){
- mediacenter.videoZoom = 100;}
- else if( mediacenter.videoZoom < 101 ){
- mediacenter.videoZoom = 200;}
- SnapToVideo();}
-
- function ZoomVideoDown(){
- if( mediacenter.videoZoom > 199 ){
- mediacenter.videoZoom = 100;
- } else if( mediacenter.videoZoom > 99 ){
- mediacenter.videoZoom = 50;}
- SnapToVideo();}
-
- function reAtt(){
- theme.closeView('detatched_video');
- theme.closeView('Detatched');
- theme.currentViewID="Attatched";}
-
- function OnLoadVideo(){
- view.height=player.currentMedia.imageSourceHeight + 58;
- view.width=player.currentMedia.imageSourceWidth + 202;
- visual.visible=true;
- vidIsRunningC = (player.currentMedia.ImageSourceWidth>0);
- if(vidIsRunningC){
- visual.visible=false;
- SnapToVideo();}}
-
- function vidSize(){
- mediacenter.videoZoom = 100;}