Hi,
I have created my own Flash website using "Flash Slide Presentation". And when
people go to site, it's playing a song. For example "Song1". It's any script,
that can play several songs each time I am going to site?
var Song1:Sound = new Sound();
Song1.attachSound("music/Song1.mp3");
Song1.loadSound("music/Song1.mp3", true);
How can I make, that it plays a different song when people click on site link?
song2, song3,... ?
kglad - 31 Aug 2007 14:32 GMT
if you have sNum number of sounds (Song1.mp3, Song2.mp3, ... , SongsNum.mp3),
you can use:
var Song1:Sound = new Sound();
Song1.attachSound("music/Song1.mp3");
Song1.loadSound("music/Song"+Math.ceil(Math.random()*(sNum))+".mp3", true);