#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    Denmark
    Posts
    7
    Rep 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>
  2. #2
  3. Web Monkey
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    I refuse to be from anywhere, I am one with the internet
    Posts
    76
    Rep Power
    13

    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/forumdispl...d=1&daysprune=

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

IMN logo majestic logo threadwatch logo seochat tools logo