n1ckle
02-06-2006, 06:46 AM
Hi,
I'm not a script literate person, but i've got this script off a website and there was a few problems with it.
<head>
<SCRIPT LANGUAGE = "JavaScript">
var streams = new Array();
streams[0] = new makeStream("Lapdance.mp3", "lap");
streams[1] = new makeStream("Trial.wpl", "The PLayerlist");
streams[2] = new makeStream("Lapdance.mp3", "Lapdance");
streams[3] = new makeStream("Georgia.mp3", "Georgia");
function makeStream(url, name) {
this.url = url;
this.name = name;
}
function handleControlsOnOffClick() {
if (document.mediaPlayer.showControls == true) {
document.mediaPlayer.showControls = false;
document.playerCtrl.controls.value = " Show Controls ";
}
else {
document.mediaPlayer.showControls = true;
document.playerCtrl.controls.value = " Hide Controls "
}
}
function handlePlayOrPauseClick(){
var state;
playerStatus = document.mediaPlayer.playState;
if (playerStatus == 6) {
document.mediaPlayer.play();
document.playerCtrl.playOrPause.value = " Pause ";
}
else if (playerStatus == 1) {
document.mediaPlayer.play();
document.playerCtrl.playOrPause.value = " Pause ";
}
else if (playerStatus == 2) {
document.mediaPlayer.pause();
document.playerCtrl.playOrPause.value = " Play ";
}
}
function changeSize(newSize) {
document.mediaPlayer.displaySize = newSize;
}
function change() {
var list = document.playerCtrl.streams;
var streamURL = list.options[list.selectedIndex].value;
document.mediaPlayer.stop();
document.playerCtrl.playOrPause.value = " Pause ";
document.mediaPlayer.fileName = streamURL;
}
</SCRIPT>
</head>
<body>
<OBJECT
ID="mediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
STANDBY="Loading Microsoft Windows Media Player components..."
TYPE="application/x-oleobject">
<PARAM NAME="fileName" VALUE="Lapdance.mp3">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="true">
</OBJECT><P>
<FORM NAME="playerCtrl">
<INPUT TYPE="button" VALUE=" Pause " NAME="PlayOrPause" onClick="handlePlayOrPauseClick()" STYLE = "font-family:courier">
<INPUT TYPE="button" VALUE=" Hide Controls " NAME="controls" onClick="handleControlsOnOffClick()" STYLE = "font-family:courier"><BR>
<INPUT TYPE="button" VALUE=" Small " NAME="small" onclick="changeSize(-1)" STYLE="font-family:courier">
<INPUT TYPE="button" VALUE=" Normal " NAME="normal" onclick="changeSize(0)" STYLE="font-family:courier">
<INPUT TYPE="button" VALUE=" Large " NAME="large" onclick="changeSize(2)" STYLE="font-family:courier"><BR><BR>
<SCRIPT LANGUAGE="JavaScript">
with (document) {
writeln('<SELECT NAME="streams" onChange="change()">');
for (var i = 0; i < streams.length; i++) {
writeln('<OPTION VALUE="', streams[i].url, '">', streams[i].name);
}
writeln('</SELECT>');
}
</SCRIPT>
its not exactly a major problem but i would like to know if anyone can help.
The size dosnt change, but i want to take out the resizing option completly and make the window smaller in width.
Also how do i get it to play a playerlist, ived tried making a playerlist with the files saved on the webpage alson with files stored on harddrive then uploaded to web page but doesnt seem to work.
Can some one help please.
I'm not a script literate person, but i've got this script off a website and there was a few problems with it.
<head>
<SCRIPT LANGUAGE = "JavaScript">
var streams = new Array();
streams[0] = new makeStream("Lapdance.mp3", "lap");
streams[1] = new makeStream("Trial.wpl", "The PLayerlist");
streams[2] = new makeStream("Lapdance.mp3", "Lapdance");
streams[3] = new makeStream("Georgia.mp3", "Georgia");
function makeStream(url, name) {
this.url = url;
this.name = name;
}
function handleControlsOnOffClick() {
if (document.mediaPlayer.showControls == true) {
document.mediaPlayer.showControls = false;
document.playerCtrl.controls.value = " Show Controls ";
}
else {
document.mediaPlayer.showControls = true;
document.playerCtrl.controls.value = " Hide Controls "
}
}
function handlePlayOrPauseClick(){
var state;
playerStatus = document.mediaPlayer.playState;
if (playerStatus == 6) {
document.mediaPlayer.play();
document.playerCtrl.playOrPause.value = " Pause ";
}
else if (playerStatus == 1) {
document.mediaPlayer.play();
document.playerCtrl.playOrPause.value = " Pause ";
}
else if (playerStatus == 2) {
document.mediaPlayer.pause();
document.playerCtrl.playOrPause.value = " Play ";
}
}
function changeSize(newSize) {
document.mediaPlayer.displaySize = newSize;
}
function change() {
var list = document.playerCtrl.streams;
var streamURL = list.options[list.selectedIndex].value;
document.mediaPlayer.stop();
document.playerCtrl.playOrPause.value = " Pause ";
document.mediaPlayer.fileName = streamURL;
}
</SCRIPT>
</head>
<body>
<OBJECT
ID="mediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
STANDBY="Loading Microsoft Windows Media Player components..."
TYPE="application/x-oleobject">
<PARAM NAME="fileName" VALUE="Lapdance.mp3">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="true">
</OBJECT><P>
<FORM NAME="playerCtrl">
<INPUT TYPE="button" VALUE=" Pause " NAME="PlayOrPause" onClick="handlePlayOrPauseClick()" STYLE = "font-family:courier">
<INPUT TYPE="button" VALUE=" Hide Controls " NAME="controls" onClick="handleControlsOnOffClick()" STYLE = "font-family:courier"><BR>
<INPUT TYPE="button" VALUE=" Small " NAME="small" onclick="changeSize(-1)" STYLE="font-family:courier">
<INPUT TYPE="button" VALUE=" Normal " NAME="normal" onclick="changeSize(0)" STYLE="font-family:courier">
<INPUT TYPE="button" VALUE=" Large " NAME="large" onclick="changeSize(2)" STYLE="font-family:courier"><BR><BR>
<SCRIPT LANGUAGE="JavaScript">
with (document) {
writeln('<SELECT NAME="streams" onChange="change()">');
for (var i = 0; i < streams.length; i++) {
writeln('<OPTION VALUE="', streams[i].url, '">', streams[i].name);
}
writeln('</SELECT>');
}
</SCRIPT>
its not exactly a major problem but i would like to know if anyone can help.
The size dosnt change, but i want to take out the resizing option completly and make the window smaller in width.
Also how do i get it to play a playerlist, ived tried making a playerlist with the files saved on the webpage alson with files stored on harddrive then uploaded to web page but doesnt seem to work.
Can some one help please.