home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Plus! (NZ) 2001 September
/
PCW0901.iso
/
Essent
/
MediaPlayer
/
mp71.exe
/
RCDATA
/
CABINET
/
Toothy.wmz
/
toothy.js
< prev
next >
Wrap
Text File
|
2001-03-02
|
2KB
|
101 lines
/*
⌐2000 Microsoft Corporation. All rights reserved.
*/
var noPane = 0;
var audPane = 1;
var plPane = 2;
var vidPane = 3;
var currentPane = 0;
var widthClosed = 330;
var widthOpened = 586;
var vidIsRunning = false;
function Init()
{
pl.setColumnResizeMode(0, "Stretches");
pl.setColumnResizeMode(1, "AutoSizeData");
OnOpenStateChange();
OnPlayStateChange();
if(vidIsRunning)
{
SetVisibility(vidPane);
}
}
function OnOpenStateChange()
{
if(player.OpenState == osMediaOpen)
{
vidIsRunning =
(player.currentMedia.ImageSourceWidth>0);
UpdateMetadata();
bClose.enabled = !vidIsRunning;
// makes bClose show up when switching from video to audio
}
}
function OnPlayStateChange()
{
visEffects.visible = !vidIsRunning &&
(player.playstate == psPlaying ||
player.playstate == psPaused);
}
function UpdateMetadata()
{
metadata.value =
player.currentmedia.getiteminfo("author");
}
function SetVisibility(newPane)
{
bClose.enabled = !vidIsRunning;
view.width = widthOpened;
switch(newPane)
{
case noPane:
sBalloon.visible =
sAudio.visible =
pl.visible =
vid.visible = false;
view.width = widthClosed;
break;
case audPane:
sBalloon.visible =
sAudio.visible = true;
pl.visible =
vid.visible = false;
break;
case plPane:
sBalloon.visible =
pl.visible = true;
sAudio.visible =
vid.visible = false;
break;
case vidPane:
sBalloon.visible =
vid.visible = true;
sAudio.visible =
pl.visible = false;
break;
}
currentPane = newPane;
}
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;
}