Hi guys !
I'm new to AS3, but I have to get this project done for class, and I can't really understand how to do it.
I searched the forums and the internet, but did not find that much information. I found most of this code on the Internet though, and while I quite understand it, I don't master AS3 enough to be able to program it myself.
Could you guys please help me a bit with this ?
This is what I'm trying to achieve :
- A background music looping in the back, that starts with the opening of the swf and never stops. I think I achieved that with this bit of code :
// bg music
var music:Sound = new Sound(new URLRequest("music1.mp3")); // same folder
sc = music.play();
One thing though : it would be cool to loop it, and I don't know how to do that.
- I also need various small sound clips to be played randomly, above the aforementioned background music.I'm using this, which kinda works, although I'd like to have more control over the randomness. Ideally the clips should not play twice in a row. I don't know how to do that.
var songs:Array=new Array("sound1.mp3","sound2.mp3");
- Finally I need to jump from frame to frame randomly to play various animations. For example :
Project starts, background music starts playing, we hear random sounds played one after the other, while some animations can be seen on screen, playing in a random order.
I have no idea how to achieve that.
Thank you for your help ! I'll be trying to find it out on my own, but any help will be appreciated.