SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict sstaubin01's Avatar
    Join Date
    Nov 2000
    Location
    Ont, Canada
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can someone help me with this error.

    error: object doesn't support this property or method
    line: 10
    char: 30 (actually, char 30 is the A in A.stop()

    Here's the code

    <html>
    <head>
    <script language="JavaScript">
    <!-- Sound Script Source
    var audioOn = false;
    function audioDo(doWhat,toWhat){
    if(audioOn){
    var A = eval('document.'+toWhat);
    if (A != null){
    if (doWhat=='stop') A.stop();
    else{
    if (navigator.appName == 'Netscape') A.play();
    else{
    if (document.M == null){
    document.M = false; var m;
    for(m in A) if (m == "ActiveMovie"){
    document.M = true; break;
    }
    }
    if (document.M) A.SelectionStart = 0;
    if (document.M) A.play();
    }
    }
    }
    }
    }
    //-->
    </script>

    <script language="JavaScript">
    <!-- Image Script Source
    function changePic(objName,picName)
    {objName.src=picName}
    //-->
    </script>

    </head>

    <body onLoad="audioOn=true">
    <div align="left">
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td width="1%">
    <p align="center"><a href="#"
    onmouseover="changePic(document.images[0],'images/NewMembersBlob2.GIF'); audioDo('play','BloopSound');"
    onmouseout="audioDo('stop','BloopSound')">
    <img border="0" src="images/NewMembersBlob1.GIF" width="115" height="77"></a><img border="0" src="images/NewMembersBlob2.GIF" width="1" height="1"></td>
    </tr>
    </table>
    </div>

    <p>
    <embed NAME="BloopSound" SRC="sounds/Bloop.wav" MASTERSOUND LOOP="false" AUTOSTART="false" AUTOREWIND="true" HIDDEN="true" WIDTH="0" HEIGHT="0">
    </p>
    Last edited by sstaubin01; Feb 20, 2001 at 22:55.

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Here's a script that has the advantage of working on both MSIE and Netscape.

    http://www.wsabstract.com/script/scr...oundlink.shtml
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  3. #3
    SitePoint Addict sstaubin01's Avatar
    Join Date
    Nov 2000
    Location
    Ont, Canada
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks again Kevin:

    This works on the machine I'm on now. I have to try it on my machine at home. The other script wasn't working on either although it was working before my drive was reformatted. The script never worked on Netscape. I've had to reinstall MSIE and Netscape which must have something to do with why the other script doesn't work. Have you any ideas why it doesn't work?

    Maybe now I can get back to the MySql Log Update problems I was having. I'm seeing a priority problem here. I choose to work on a mouseover sound problem before a database recovery problem. Lucky nobody's watching my workload. But let's face it, which one is more fun?.

    See ya soon on the MySql/PHP forum.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •