home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2001 August
/
PCWorld_2001-08_cd.bin
/
Software
/
Topware
/
winmpl71
/
mp71.exe
/
RCDATA
/
CABINET
/
Rusty.wmz
/
rusty.js
< prev
next >
Wrap
Text File
|
2001-03-02
|
3KB
|
113 lines
/*
⌐2000 Microsoft Corporation. All rights reserved.
*/
var visPane = 0;
var audPane = 1;
var vidPane = 2;
var currentPane = 0;
var vidIsRunning = false;
function Init()
{
pl.setColumnResizeMode(0, "Stretches");
pl.setColumnResizeMode(1, "AutoSizeData");
visEffects.currentEffectType = mediacenter.effectType;
visEffects.currentPreset = mediacenter.effectPreset;
OnOpenStateChange();
OnPlayStateChange();
}
function OnClose()
{
mediacenter.effectType = visEffects.currentEffectType;
mediacenter.effectPreset = visEffects.currentPreset;
}
function OnOpenStateChange()
{
if(player.OpenState == osMediaOpen)
{
vidIsRunning =
(player.currentMedia.ImageSourceWidth>0);
UpdateMetadata();
SetVisibility(vidIsRunning?vidPane:visPane);
}
}
function OnPlayStateChange()
{
bPlay.visible = true;
switch(player.PlayState)
{
case psStopped:
visEffects.visible = false;
break;
case psPlaying:
bPlay.visible = false;
visEffects.visible = !vidIsRunning;
UpdateMetadata();
break;
}
}
function UpdateMetadata()
{
metadata.value =
player.currentmedia.getiteminfo("author");
if(metadata.value != "")
{
metadata.value += " -- ";
}
metadata.value += player.currentmedia.name;
metadata.scrolling = (metadata.textWidth>metadata.width);
}
function SetVisibility(newPane)
{
bgVis.upToolTip = (vidIsRunning ?
xVisTt.toolTip : xVisTt.value);
switch(newPane)
{
case visPane:
visEffects.visible = true;
vid.visible =
sAud.visible = false;
break;
case audPane:
sAud.visible = true;
visEffects.visible =
vid.visible = false;
break;
case vidPane:
vid.visible = true;
visEffects.visible =
sAud.visible = false;
bgVis.upToolTip = "";
break;
}
currentPane = newPane;
}
function TogglePl()
{
sPl.visible =
pl.visible = !pl.visible;
view.height = (pl.visible ? 397 : 241);
}
function AdjustAudio()
{
eq.gainLevel2 = (8*bass.value + treble.value)/9;
eq.gainLevel3 = (7*bass.value + 2*treble.value)/9;
eq.gainLevel4 = (6*bass.value + 3*treble.value)/9;
eq.gainLevel5 = (5*bass.value + 4*treble.value)/9;
eq.gainLevel6 = (4*bass.value + 5*treble.value)/9;
eq.gainLevel7 = (3*bass.value + 6*treble.value)/9;
eq.gainLevel8 = (2*bass.value + 7*treble.value)/9;
eq.gainLevel9 = ( bass.value + 8*treble.value)/9;
}