Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

preload sound function

Status
Not open for further replies.

callhandler

Programmer
Oct 25, 2002
11
US
I have almost complete Javascript routine to preload sound files on a page (I have a browser based telephone that interfaces with the real world telephone system!)

Basically I create a whole lot of <EMBED>s with the names sound0, sound1, sound2, etc.

I want to create a simple loop to to check the readyState (to ensure the files are loaded before displying the full page).

if (document.all.sound0.readyState=='complete') ..etc.

what syntax do I use in this if clause to check the readyState for sound'n'?
 
I guess I worked it out (obviously I am a JavaScript beginner) ...

If (document.all[&quot;sound&quot;+n].readyState=='complete') ....

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top