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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Playing sounds randomly

Status
Not open for further replies.

HumanBean

Technical User
Oct 1, 2004
13
AR
Hi everyone

I have this personal site I'm working on, and I'm having some trouble with a sound issue...

I've some loop tracks that play in the background, with this code:

MySound = new Sound(this);
MySound.attachSound("sound1");
MySound.start(0, 999);
MySound = new Sound(this);
MySound.attachSound("sound2");
MySound.start(0, 999);
MySound = new Sound(this);
MySound.attachSound("sound3");
MySound.start(0, 999);


Now, besides those three loops, I want some small sounds to play random... I think this site has something like that
So what I need to learn is how to tell this other sound files (let's say, "sound4", "sound5" and "sound6") to play randomly once in a while.
I hope you can help me

Thanks in advance,
Guido
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top