Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Script needs updating for NS

    This script from JSK needs updating since Netscape no longer uses LiveAudio. I just need it to also play a .wav in NS with whatever plugin they may have. If they don't have the plugin, it should probably include an alert to tell them it's required to hear the audio. Thanks

    Edit: I've changed the LiveAudio to RealPlayer without success.


    <script LANGUAGE="JavaScript"><!--
    // Preload and play audio files with event handler (MouseOver sound)
    // designed by JavaScript Archive, (c)1999
    // Get more free javascripts at http://jsarchive.8m.com

    var aySound = new Array();
    // Below: source for sound files to be preloaded
    aySound[0] = "laser.wav";

    // DO NOT edit below this line
    document.write('<BGSOUND ID="auIEContainer">')
    IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
    NS = (navigator.appName=="Netscape" && navigator.plugins["RealPlayer"])? 1:0;
    ver4 = IE||NS? 1:0;
    onload=auPreload;

    function auPreload() {
    if (!ver4) return;
    if (NS) auEmb = new Layer(0,window);
    else {
    Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";
    document.body.insertAdjacentHTML("BeforeEnd",Str);
    }
    var Str = '';
    for (i=0;i<aySound.length;i++)
    Str += "<EMBED SRC='"+aySound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
    if (IE) auEmb.innerHTML = Str;
    else {
    auEmb.document.open();
    auEmb.document.write(Str);
    auEmb.document.close();
    }
    auCon = IE? document.all.auIEContainer:auEmb;
    auCon.control = auCtrl;
    }
    function auCtrl(whSound,play) {
    if (IE) this.src = play? aySound[whSound]:'';
    else eval("this.document.embeds[whSound]." + (play? "play()":"stop()"))
    }
    function playSound(whSound) { if (window.auCon) auCon.control(whSound,true); }
    function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); }
    //-->
    </script>
    Last edited by zoobie; 07-09-2003 at 07:16 AM.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So er... you pasting the script that needs changing, or is this the changed version?

    I don't do much audio these days, so forgive my ignorance, but if netscape (and so I presume, mozilla) don't use LiveAudio any more, what does it do to embed those kinds of sounds - or does it (hey ..cool if so) allow you to use <object> includes with a medai mime-type, and it just uses from whatever compatible plugin it can find in the OS ..?
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I've installed RealPlayer in NS7 and it still doesn't work. It should check for RealPlayer and an alert should notify them they need the plugin. Here's their plugins page: http://wp.netscape.com/plugins/index.html
    Last edited by zoobie; 07-09-2003 at 07:14 AM.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    What? No Nutscr...er...Netscapers in here wanna give it a shot?
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">


  •  

    Posting Permissions

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