Go Back   CodingForums.com > :: Client side development > JavaScript programming > Post a JavaScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 3.00 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-29-2003, 06:01 AM   PM User | #16
zoobie
Senior Coder

 
Join Date: Jun 2002
Location: ColoRockyz
Posts: 1,642
Thanks: 1
Thanked 0 Times in 0 Posts
zoobie has a little shameless behaviour in the past
Not resource to flash but use real audio?
I think real-whateveritsnameisnow-audio died...
Seriously...you should check out flash...yes, it's complicated...but once you start getting the hang of it, you'll see the light...
__________________
Zoobie or not Zoobie...That is the problem.
<body onUnload="flush( ! )">
zoobie is offline   Reply With Quote
Old 09-29-2003, 07:17 AM   PM User | #17
stunix
Registered User

 
Join Date: Aug 2003
Location: Wales
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
stunix is an unknown quantity at this point
On the subject of Real, i use Real Helix for streaming audio and video, which will quite happily stream .mp3, .mpg, etc either directly or as part of a .ram playlist, however you really dont want to be encoding audio as a Real format, or your client will have to subscribe to the Real family too, which has grown up to be quite an expencive lock in format! If you search around, you may still be able to find a "Lame" mp3 encoder, or try this lil app
http://my.execpc.com/~sfritz/rc-mp3/


found the below script in my collections, which preloads embeds in netscape and uses bgsound in IE, i also believe flash to be a last resort, due to the expence and potential non install of the plugin or firewall restrictions.


3 parts to this script
===============================================
part 1
===============================================
<!-- -->
<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] = "Chimes.wav";
aySound[1] = "Ding.wav";
// DO NOT edit below this line

IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 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><!-- -->

==============================================
part 2 ----- after body tag

<BGSOUND ID="auIEContainer">
==============================================
part 3

place withen your link: onMouseOver="playSound(0)" onMouseOut="stopSound(0)"

EXAMPLE
------------
<A HREF="YourPage.html" onMouseOver="playSound(0)"
onMouseOut="stopSound(0)"></A>

Last edited by stunix; 09-29-2003 at 07:21 AM..
stunix is offline   Reply With Quote
Old 09-29-2003, 10:28 AM   PM User | #18
zoobie
Senior Coder

 
Join Date: Jun 2002
Location: ColoRockyz
Posts: 1,642
Thanks: 1
Thanked 0 Times in 0 Posts
zoobie has a little shameless behaviour in the past
Ha ha! I used to use that old script...ahh yes...horse and buggy days.
*clicks the unsubscribe button*
__________________
Zoobie or not Zoobie...That is the problem.
<body onUnload="flush( ! )">
zoobie is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:44 PM.


Advertisement
Log in to turn off these ads.