Groups | Blog | Home
all groups > flash (macromedia) > june 2004 >

flash (macromedia) : simple mp3 player -- HELP!!



YunDe
6/9/2004 10:09:11 PM
I'm creating a VERY simple mp3 player, one song, with just a play and stop
button. I've figured that part out, using the streaming mp3 behavior and the
stop all sounds behavior. the only thing left is to get the song to play
automatically on startup. How would I do this? I also need to make is so that
when it does load on startup, when the visitor presses the play button, it
doesn't play on top of the song already playing.

can anyone help me with this?
urami_
6/10/2004 8:14:29 AM
[quoted text, click to view]

you said you use streaming, than should not be a problem because
streaming do start automatically .
In regard to overlapping, it should not as well because flash can stream one file
of the same name at the time , it will just stop the sound and load over again.
So my guess is you do it incorrectly and would be great if you explain what you
did so far or upload problematic sample because it's hard to guess w/o seeing it.

Till than a very basic load play and stop would be :

//to load and play
mySound = new Sound();
mySound.loadSound("file.mp3", true);

to stop

mySound.stop();

to play it again from button :

on (release) {
mySound = new Sound();
mySound.loadSound("file.mp3", true);
}

to control it's volume

on (release) {
mySound.setVolume(50);
}

or

on (release) {
mySound.setVolume(10);
}

or back to full
on (release) {
mySound.setVolume(100);
}

--

Regards


urami_*



<no>
http://flashfugitive.com/
</no>

AddThis Social Bookmark Button