Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / August 2007



Tip: Looking for answers? Try searching our database.

It's impossible to shuffle music?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
motiejuss - 31 Aug 2007 09:13 GMT
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);
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.