home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 July
/
Chip_2003-07_cd1.bin
/
zkuste
/
wmakeup
/
download
/
bruteforce.wmz
/
bruteforce.js
next >
Wrap
Text (UTF-16)
|
2003-04-10
|
25KB
|
642 lines
/*
http://www.theskinsfactory.com
info@theskinsfactory.com
version b
*/
function mainStartUp(){
volume.value = player.settings.volume;
loadMainPrefs();
checkPlayerState();
}
function checkPlayerState(){
if (player){
switch (player.playState){
case 0: //undefined
break;
case 1: //stopped
break;
case 2: //paused
break;
case 3: //playing
if(player.currentMedia.ImageSourceWidth>0){
theme.openView('videoView');
if("true"==theme.loadPreference("visViewer")){
theme.savePreference("visViewer", "false");
theme.closeView( "visView" );
}
break
}
break;
case 6: //buffering
break;
case 7: //waiting
break;
case 8: //media ended
break;
case 9: //Transitioning
break;
case 10: //Ready
break;
}
}
if (!player.controls.isAvailable("Stop")) {
}
updateMetadata();
}
// metadata
function updateMetadata(){
if(player.openState!=13) return;
metadata.value = player.status;
authorppl = player.currentmedia.getiteminfo("#author");
if (authorppl == "") {
authorppl = player.currentmedia.getiteminfo("author");
}
if (authorppl != "") {
authorppl += " - ";
}
if (metadata.value != "") {
metadata.value += " - ";
}
metadata.value += authorppl;
metadata.value += player.currentmedia.name;
metadata.scrolling = (metadata.textWidth>metadata.width);
}
// intro shutter
function introAnim(){
shutterSub.backgroundImage = "shutter_open.gif";
introPannels.backgroundImage = "intro_pannels.gif";
view.timerInterval = 0;
}
var shutterStatus = false;
function shutterToggle(){
if(!shutterStatus){
shutterSub.backgroundImage = "shutter_close.gif";
introPannels.backgroundImage = "";
shutterStatic.visible = true;
mainBackFrame.visible = false;
shutterStatus = !shutterStatus;
}else{
shutterSub.backgroundImage = "shutter_open.gif";
shutterStatic.visible = false;
mainBackFrame.visible = true;
shutterStatus = !shutterStatus;
}
}
var squadStatus = false;
function toggleSquad(){
if(!squadStatus){
mainBackUnder.backgroundImage = "mainback_small.png";
mainView.height = "152";
mainBack.top = "0";
shutterSub.top = "6";
squadStatus = !squadStatus;
}else{
mainBackUnder.backgroundImage = "mainback.png";
mainView.height = "377";
mainBack.top = "225";
shutterSub.top = "231";
squadStatus = !squadStatus;
}
}
// button and hotkey definitions
// 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;
case 80:
case 102:
case 70:
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 = 'Hide " + tip + "'" );
}else{
eval( button +".upToolTip = 'Show " + tip + "'" );
}
}
function updateVolToolTip(){
volume.toolTip = "";
volume.toolTip += player.settings.volume;
}
function updateShuffRep(){
if(player.settings.getMode('shuffle')){
shuffleButton.down = true;
}else{
shuffleButton.down = false;
}
if(player.settings.getMode('loop')){
loopButton.down = true;
}else{
loopButton.down = false;
}
}
function volKey(event){
switch(event.keycode){
case 37:
case 38:
if(player.settings.volume < 95){
player.settings.volume+=5;
}else{
player.settings.volume = 100;
}
break;
case 39:
case 40:
if(player.settings.volume > 5){
player.settings.volume-=5;
}else{
player.settings.volume = 0;
}
break;
}
mute.down = false;
player.settings.mute = false;
}
// view toggle
function toggleView(name,id){
if("true"==theme.loadPreference(id)){
theme.savePreference(id, "false");
theme.closeView( name );
}else{
theme.openView( name );
}
}
function closeView(id){
theme.savePreference(id, "false");
if( id=="vidViewer" && player.currentMedia.ImageSourceWidth>0 ){
player.controls.stop();
}
view.close();
}
// preferences
function loadMainPrefs(){
if ("true"==theme.loadPreference("plViewer")){
theme.openView( 'plView' );
}
if ("true"==theme.loadPreference("visViewer")){
theme.openView( 'visView' );
}
if ("true"==theme.loadPreference("eqViewer")){
theme.openView( 'eqView' );
}
if ("true"==theme.loadPreference("infoViewer")){
theme.openView( 'infoView' );
}
}
function saveMainPrefs() {
}
function mainShutDown(){
saveMainPrefs();
}
// playlist
function loadPlPrefs(){
theme.savePreference( 'plViewer', "true" );
var dwScale = theme.loadPreference( "PlaylistWidth" );
if( "--" != dwScale )
{
plView.width = dwScale;
}
dwScale = theme.loadpreference( "PlaylistHeight" );
if( "--" != dwScale )
{
plView.height = dwScale;
}
plFrame.setColumnResizeMode( 0, "stretches" );
plFrame.setColumnResizeMode( 1, "autosizedata" );
plFrame.setColumnResizeMode( 2, "autosizedata" );
plFrame.setColumnResizeMode( 3, "autosizedata" );
}
function savePlPrefs(){
theme.savepreference( "PlaylistWidth", plView.width );
theme.savepreference( "PlaylistHeight", plView.height );
}
// equalizer
function loadEQPrefs(){
theme.savePreference( 'eqViewer', "true" );
}
// visualizations
function loadVisPrefs(){
theme.savePreference( 'visViewer', "true" );
visEffects.currentEffectType = mediacenter.effectType;
visEffects.currentPreset = mediacenter.effectPreset;
var dwScale = theme.loadPreference( "visWidth" );
if( "--" != dwScale )
{
visView.width = dwScale;
}else{
visView.width = 300;
}
dwScale = theme.loadpreference( "visHeight" );
if( "--" != dwScale )
{
visView.height = dwScale;
}else{
visView.width = 220;
}
checkVisualsPlayerState()
}
function saveVisPrefs(){
mediacenter.effectType = visEffects.currentEffectType;
mediacenter.effectPreset = visEffects.currentPreset;
theme.savepreference( "visWidth", visView.width );
theme.savepreference( "visHeight", visView.height );
}
function checkVisualsPlayerState(){
if (player){
switch (player.playState){
case 0: //undefined
break;
case 1: //stopped
break;
case 2: //paused
break;
case 3: //playing
//visMask.visible = true;
break;
case 6: //buffering
break;
case 7: //waiting
break;
case 8: //media ended
break;
case 9: //Transitioning
break;
case 10: //Ready
break;
}
}
if (!player.controls.isAvailable("Stop")) {
//visMask.visible = false;
}
}
function displayVisText(){
visEffectsText.visible = true;
visEffectsText.value = visEffects.currentEffectTitle + ": " + visEffects.currentPresetTitle;
visView.timerInterval = 6000
}
function hideVisText(){
visEffectsText.visible = false;
visView.timerInterval = 0
}
// video
function loadVidPrefs(){
var _drawerStatus = theme.loadPreference('drawerStatus');
if (_drawerStatus != '--') {
drawerStatus = (_drawerStatus.toLowerCase() == 'true') ? false : true;
} else {
drawerStatus = true;
}
checkSnapStatus();
checkVideoPlayerState();
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 = "Click To Set Video Size";
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 = "Video Size - [current: " + mediacenter.videoZoom + "%] - [next: ";
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 + "%]";
if("false"==theme.loadPreference("vidSnapper")){
vidZoom.upToolTip = "Click To Set Video Size";
}
}
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 + 58;
view.height = viewHeight + 210;
}
function checkSnapStatus(){
if("false"==theme.loadPreference("vidSnapper")){
loadVidSize();
}else{
SnapToVideo();
}
}
function checkVideoPlayerState(){
if (player){
switch (player.playState){
case 0: //undefined
break;
case 1: //stopped
break;
case 2: //paused
break;
case 3: //playing
centerBox.visible = true;
checkSnapStatus();
if(!player.currentMedia.ImageSourceWidth>0){
view.close();
break;
}
break;
case 6: //buffering
break;
case 7: //waiting
break;
case 8: //media ended
break;
case 9: //Transitioning
break;
case 10: //Ready
break;
}
vidResize.enabled = true;
vidZoom.visible = true;
}
if (!player.controls.isAvailable("Stop")) {
centerBox.visible = false;
vidResize.enabled = false;
vidZoom.visible = false;
view.width = 363;
view.height = 439;
}
}
var drawerStatus = false;
function toggleVidDrawer(){
if(!drawerStatus){
vidDrawer.moveTo(0,view.height-133,500);
vidDrawerButton.down = true;
drawerStatus = !drawerStatus;
}else{
vidDrawer.moveTo(0,view.height-270,500);
drawerStatus = !drawerStatus;
}
}
// info / content
function loadInfoPrefs(){
theme.savePreference( 'infoViewer', "true" );
}
var infoGo = 0;
function showInfo(menu,nav,infoGo){
infoMenuBack.visible = menu;
infoNavSub.visible = nav;
switch(infoGo){
case 0:
infoSub.backgroundImage = "";
break;
case 1:
infoMode = 1; // call sections
navGo = 1;
navLimit = 2;
infoNavNext();
break;
case 2:
infoMode = 2; // call sections
navGo = 1;
navLimit = 5;
infoNavNext();
break;
case 3:
infoMode = 3;
navGo = 1;
navLimit = 4;
infoNavNext();
break;
case 4: // screenshots
infoMode = 4;
navGo = 1;
navLimit = 3;
infoNavNext();
break;
}
}
navGo = 1;
function infoNavNext(){
infoSub.backgroundImage = "c_sub_" + infoMode + "_" + navGo + ".jpg";
navCheck();
}
function infoNavPrev(){
infoSub.backgroundImage = "c_sub_" + infoMode + "_" + navGo + ".jpg";
navCheck();
}
function navCheck(){
if(navGo==1){
navPrev.enabled = false;
navNext.enabled = true;
}else if(navGo==navLimit && infoMode==infoMode){ // enable / disable sections
navNext.enabled = false;
navPrev.enabled = true;
}else{
navNext.enabled = true;
navPrev.enabled = true;
}
}