PDA

View Full Version : loading different mp3


edweb
03-30-2003, 08:50 PM
hi all, i've made a a music control and volume bar. the code is:

var volumePercent = 0 ;
textVolume = volumePercent + "%" ;
volumeFill._xscale = 0 ;
var mySound = new Sound () ;
mySound.attachSound ("Ambient") ;
mySound.setVolume (volumePercent * 2) ;

of course when i press play the code do this:

on (release) {
mySound.stop () ;
mySound.start (0 , 10000) ;
}


the funny part now is, how can i use for example 6 mp3 and when i press on button 1, it load another mp3?

thank's in advance

farafiro
03-31-2003, 10:32 AM
just add a vraiable like (i), and rename all the files like sound1, sound2,.....
and on the buttonon(release){
i++
if(i>=6) i=0
mySound.stop () ;
mySound.attachSound("sound"+i)
mySound.start () ;
}

edweb
04-01-2003, 03:04 PM
Hi master,
i want 2 explain my idea.
i got 8 different mp3 (Ambient,Jungle,Jazz, Latin,Funk, etc) ok?
u know, my trouble at the moment when i import to library the soundAmbient then i click on linkable>export to the first frame and every thing is ok.

on the play button i have this

on (release) {
mySound.start (0 , 10000) ;
}


my big problem is, if i import the every mp3 , them export for Actionscript, my original mp3 ambient do not work properly, even the volume (bar i already posted the script)

how can i use 8 different buttons to change music using the same play() and stop () button ?

thank' s 4 ur big big help

farafiro
04-02-2003, 04:58 AM
i think in the 8 buttons u put a code likeon(release){
stopAllSounds()
mySound.attachSound("whatEverTheSound")
}if it didn't do the job, post the fla