home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Animedia 1
/
ANIMEDIA1.ISO
/
Extra
/
mp71.exe
/
1033
/
RCDATA
/
CABINET
/
Optik.wmz
/
optik.js
< prev
next >
Wrap
Text File
|
2000-04-21
|
4KB
|
144 lines
/*
ゥ2000 Microsoft Corporation. All rights reserved.
*/
var noPane = 0;
var eqPane = 1;
var plPane = 2;
var vidPane = 3;
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();
bClose.enabled = !vidIsRunning;
// makes bClose show up when switching from video to audio
if(currentPane!=eqPane && currentPane!=plPane)
{
SetVisibility(vidIsRunning?vidPane:noPane);
}
}
}
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 StartVideo()
{
vidIsRunning = true;
SetVisibility(vidPane);
}
function EndVideo()
{
vidIsRunning = false;
bVis.enabled = true;
bVis.upToolTip = xVidVisTt.value;
}
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)
{
bClose.enabled = !vidIsRunning;
view.height = 378;
bEq.upToolTip = xEqTt.toolTip;
bPl.upToolTip = xPlTt.toolTip;
bVis.enabled = true;
bVis.upToolTip = (vidIsRunning ?
xVidVisTt.toolTip : xVidVisTt.value);
switch(newPane)
{
case noPane:
sWindow.visible =
sAudio.visible =
pl.visible =
vid.visible = false;
view.height = 286;
break;
case eqPane:
sWindow.visible =
sAudio.visible = true;
vid.visible =
pl.visible = false;
bEq.upToolTip = xEqTt.value;
break;
case plPane:
sWindow.visible =
pl.visible = true;
vid.visible =
sAudio.visible = false;
bPl.upToolTip = xPlTt.value;
break;
case vidPane:
sWindow.visible =
vid.visible = true;
sAudio.visible =
pl.visible = false;
bVis.upToolTip = "";
bVis.enabled = false;
break;
}
currentPane = newPane;
}
function AdjustEQ()
{
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;
}