PDA

View Full Version : Adding random delays?


itsudemo
08-31-2005, 10:53 AM
This may sound a bit odd. Does anyone know how to add a random delay time before a sound plays, and set it between specific parameters? For example, I have sounds x, y, and z, and I want them all to play but not all come up simultaneously as bgsounds. I'd also like the timing to be different each time the page loads, rather than just preload a bunch of silence to each one - but, I want them to always play in a specific order, so they can't all be completely random. Like, say:

Sound X occurs between 1 and 30 seconds after the page loads
Sound Y occurs between 30 and 60 seconds
Sound Z occurs between 45 seconds and 85 seconds
etc. etc.

I'm not sure if this can be done with bgsound or if I'd have to use some other tag or format (in Flash I'm thinking?) Anyone has any ideas it'd be much appreciated.

Thanks