Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDev Shed Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old November 1st, 2001, 06:11 AM
mrfingers mrfingers is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: Denmark
Posts: 7 mrfingers User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation Problems with a script

Anyone have any Idea what is wrong with this script? I just can't get it to work an would really appritiate some help...

The script runs personalised real player with a play, stop, mute and volume control but for some reason these controls aren't working.

Any Ideas anyone....

Thanks for any help.

----File: Player.htm contains-----



<html>
<head>
<title>INFLUX SETS</title>

<script LANGUAGE="JavaScript">
<!--
var foo = true;
var playing = true;
var volumelevel = 5;

if (document.images)
{
image1act = new Image();
image1act.src = "images/play_active.gif";
image2act = new Image();
image2act.src = "images/stop_active.gif";

image1on = new Image();
image1on.src = "images/play_passive_mouse.gif";
image2on = new Image();
image2on.src = "images/stop_passive_mouse.gif";

image1off = new Image();
image1off.src = "images/play_passive.gif";
image2off = new Image();
image2off.src = "images/stop_passive.gif";

imagemuteon = new Image();
imagemuteon.src = "images/volume_mute.gif";
imagemuteoff = new Image();
imagemuteoff.src = "images/volume_mute2.gif";

volumeimages1on = new Image();
volumeimages2on = new Image();
volumeimages3on = new Image();
volumeimages4on = new Image();
volumeimages5on = new Image();
volumeimages6on = new Image();
volumeimages7on = new Image();
volumeimages8on = new Image();
volumeimages9on = new Image();

volumeimages1off = new Image();
volumeimages2off = new Image();
volumeimages3off = new Image();
volumeimages4off = new Image();
volumeimages5off = new Image();
volumeimages6off = new Image();
volumeimages7off = new Image();
volumeimages8off = new Image();
volumeimages9off = new Image();

volumeimages1on.src = "images/volume/vol1_pasive.gif";
volumeimages2on.src = "images/volume/vol2_pasive.gif";
volumeimages3on.src = "images/volume/vol3_pasive.gif";
volumeimages4on.src = "images/volume/vol4_pasive.gif";
volumeimages5on.src = "images/volume/vol5_pasive.gif";
volumeimages6on.src = "images/volume/vol6_pasive.gif";
volumeimages7on.src = "images/volume/vol7_pasive.gif";
volumeimages8on.src = "images/volume/vol8_pasive.gif";
volumeimages9on.src = "images/volume/vol9_pasive.gif";

volumeimages1off.src = "images/volume/vol1_active.gif";
volumeimages2off.src = "images/volume/vol2_active.gif";
volumeimages3off.src = "images/volume/vol3_active.gif";
volumeimages4off.src = "images/volume/vol4_active.gif";
volumeimages5off.src = "images/volume/vol5_active.gif";
volumeimages6off.src = "images/volume/vol6_active.gif";
volumeimages7off.src = "images/volume/vol7_active.gif";
volumeimages8off.src = "images/volume/vol8_active.gif";
volumeimages9off.src = "images/volume/vol9_active.gif";

}

function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
}
return 1;
}

function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "off.src");
}
/*
if (imgName.charAt(5) == "1") {
if (!playing)
{
document[imgName].src = eval(imgName + "off.src");
}
} else
{
if (playing)
{
document[imgName].src = eval(imgName + "off.src");
}
}
}
*/
return 1;
}

function volumeImages(ind)
{


for (i = 1; i<(ind+1); i++)
document["volumeimage" + i].src = eval("volumeimages" + i + "off.src");
for (i = ind+1; i<10; i++)
document["volumeimage" + i].src = eval("volumeimages" + i + "on.src");
return 1;
}

// -->
</script>
</head>

<body BGCOLOR="#000000" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" BACKGROUND="images/bot_back.gif">


<script LANGUAGE="JavaScript">
<!--
function mutePlayer() {
if (document.DRRadio.GetMute()) {
document.DRRadio.SetMute(false);
imgOn('imagemute');
}
else
{
document.DRRadio.SetMute(true);
imgOff('imagemute');
}
}

function startPlayer() {
// alert("du har tabt!" + document.DRRadio.CanPlay());

document.DRRadio.DoPlay();

playing = true;
document['image1'].src = eval("image1act.src");
document['image2'].src = eval("image2off.src");
}

function stopPlayer() {
document.DRRadio.DoStop();
playing = false;
document['image1'].src = eval("image1off.src");
document['image2'].src = eval("image2act.src");
}

function setVolume(ind)
{
document.DRRadio.SetVolume(Math.round((1/9) * ind * 100));
volumeImages(ind);
}
// -->
</script>
<!-- IE & NETSCAPE Real kode -->

<table border="0" cellpadding="2" cellspacing="2" width="221">

<tr>
<td width="118">
<div align="left"><font face="Verdana" size="1"><img src="images/dot20x30.gif" width="20" height="20">
<a HREF=# OnMouseDown=startPlayer(); OnMouseOver="if (!playing) imgOn('image1');" OnMouseOut="if (!playing) imgOff('image1');"><img SRC="images/play_active.gif" BORDER="0" WIDTH="22" HEIGHT="20" NAME="image1" ALT="Play"></a><A HREF=# OnMouseDown="stopPlayer();" OnMouseOver="if (playing) imgOn('image2');" OnMouseOut="if (playing) imgOff('image2');"><img SRC="images/stop_passive.gif" BORDER="0" WIDTH="22" HEIGHT="20" NAME="image2" ALT="Stop"></a>
</font></div>
</td>
<td width="92" valign=bottom><font face="Verdana" size="1">
<a HREF="javascript:mutePlayer();"><img SRC="images/volume_mute.gif" WIDTH="21" HEIGHT="20" BORDER="0" NAME="imagemute" ALT="Mute on/off"></a><A HREF=javascript:setVolume(1)><IMG SRC="images/volume/vol1_active.gif" NAME=volumeimage1 WIDTH=6 HEIGHT=20 BORDER=0></A><A HREF=javascript:setVolume(2)><IMG SRC="images/volume/vol2_active.gif" NAME=volumeimage2 WIDTH=6 HEIGHT=20 BORDER=0></A><A HREF=javascript:setVolume(3)><IMG SRC="images/volume/vol3_active.gif" NAME=volumeimage3 WIDTH=6 HEIGHT=20 BORDER=0></A><A HREF=javascript:setVolume(4)><IMG SRC="images/volume/vol4_active.gif" NAME=volumeimage4 WIDTH=6 HEIGHT=20 BORDER=0></A><A HREF=javascript:setVolume(5)><IMG SRC="images/volume/vol5_active.gif" NAME=volumeimage5 WIDTH=6 HEIGHT=20 BORDER=0></A><A HREF=javascript:setVolume(6)><IMG SRC="images/volume/vol6_active.gif" NAME=volumeimage6 WIDTH=6 HEIGHT=20 BORDER=0></A><A HREF=javascript:setVolume(7)><IMG SRC="images/volume/vol7_pasive.gif" NAME=volumeimage7 WIDTH=6 HEIGHT=20 BORDER=0></A><A HREF=javascript:setVolume(8)><IMG SRC="images/volume/vol8_pasive.gif" NAME=volumeimage8 WIDTH=6 HEIGHT=20 BORDER=0></A><A HREF=javascript:setVolume(9)><IMG SRC="images/volume/vol9_pasive.gif" NAME=volumeimage9 WIDTH=6 HEIGHT=20 BORDER=0></A>
</font></td>
</tr>

<tr>
<td colspan="2">
<div align="center">

<embed name="INFLUX" console="one" controls="StatusField" src="http://www.cafegrif.dk/music/DJ_MALACHY_HOMECOOKIN%27@LUFTKASTELLET_201001.rm" width="196" height="30" nojava="false" autostart="true" autoplay="true"></embed>

<script LANGUAGE="JavaScript">
function setfoovol()
{
var foo_vol = document.DRRadio.GetVolume();
// var foo_vol = 68;
foo_vol = Math.round((foo_vol/(100/9)));
setVolume(foo_vol);
}
setTimeout('setfoovol()',1000);
</script>

</div>
</td></tr>
</table>




<br>

<!-- START RedMeasure V4 - Java v1.1 Revision: 1.8 -->
<script language="JavaScript"><!--
var pCid="dk_dronline_0";
var w0=1;
var refR=escape(document.referrer);
if (refR.length>=252) refR=refR.substring(0,252)+"...";
//--></script>
<script language="JavaScript1.1"><!--
var w0=0;
//--></script>
<script language="JavaScript1.1"
src="http://server-dk.imrworldwide.com/a1.js">
</script>
<script language="JavaScript"><!--
if(w0){
var imgN='<img src="http://server-dk.imrworldwide.com/cgi-bin/count?ref='+
refR+'&cid='+pCid+'" width=1 height=1>';
if(navigator.userAgent.indexOf('Mac')!=-1){document.write(imgN);
}else{
document.write('<applet code="Measure.class" '+
'codebase="http://server-dk.imrworldwide.com/"'+'width=1 height=2>'+
'<param name="ref" value="'+refR+'">'+'<param name="cid" value="'+pCid+
'"><textflow>'+imgN+'</textflow></applet>');
}
}
document.write("<COMMENT>");
//-->
</script>
<noscript>
<img src="http://server-dk.imrworldwide.com/cgi-bin/count?cid=dk_dronline_0"
width=1 height=1>
</noscript>

<!-- END RedMeasure V4 -->
</html>

Reply With Quote
  #2  
Old November 1st, 2001, 07:46 PM
Zoko Siman's Avatar
Zoko Siman Zoko Siman is offline
Web Monkey
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: I refuse to be from anywhere, I am one with the internet
Posts: 76 Zoko Siman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to Zoko Siman Send a message via AIM to Zoko Siman
Wink Wrong forum

Hey Bro, you may get more responses (and ligitimate ones) if you post it in the correct forum next time ;-)

http://forums.devshed.com/forumdisp...id=1&daysprune=

Javascrpit forums are your friend.
__________________
Quick, think of something geeky to say before they catch on!
Mozilla is your friend!
Web Site

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDev Shed Lounge > Problems with a script


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway