Sound control / MP3 Player

I am trying to create a MP3 player for a website i have built for a client, i found a tutorial in a book i bought not long ago called The complete Flash MX handbook, and its made by ComputerArts magazine.

I followed the whole tutorial and kept checking it to see if it works while i was doing things to it. But i cant seem to get the buttons to work :-\

I have uploaded the FLA to:
http://www.jmmedia.co.uk/kaljao/mp3player.fla

and the SWF to:
http://www.jmmedia.co.uk/kaljao/mp3player.swf

So you can see if i am doing somert wrong :crazy:

I also noticed that the files were very blurry, how do i stop this from happening to?

Hope you can help me

Jason

P.S if i cant fix this is there any good tutorials online for Sound control??

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=13133

Hows that going to help me?

Did you check the post?

Yes, just a lot of links, but what bit are u answering? the bit saying about a tutorial?

[SIZE=3]Useful Tutorials and Resources!

Flash Sounds

http://flashkit.com/soundfx/
http://www.computerarts.co.uk/downl...lashSounds1.asp
http://www.flashsound.com/[/SIZE]

:wink:

Although the code is barely commented, it’s really simple. I think you won’t have any problems with it. =)

Is that the way you wanted it? :stuck_out_tongue:

Yes cheers m8, i noticed that once you click play, it plays 1 song, then the next, how do i make it loop the first song etc

Ehmm… I’m not sure that I understand your question… care to explain a bit? :-\

Ok, i have them sounds, they are about 10 seconds long, once you click play the first track plays, and after that track has finished it plays next track, how do i stop it from doing that?

I want it to continuously loop 1 track till the user clicks skip track button.

Oh!! :stuck_out_tongue:

Replace the whole onSoundComplete handler with this line of code:

track.onSoundComplete = track.start;

=)

ok cheers dude!

No problem. :wink:

m8 when i listen to it now, it doesnt play next rack which is good :slight_smile: but how do i make it continuously play that 1 track

The code I gave you works fine, I just tested it. :-\

? ok w8 heres the code i got!

// playlist
var tracks = [“anothergangsta.mp3”, “120talk.mp3”], i = 0;
// define sound object
track = new Sound();
// load first track
track.loadSound(tracks*, true);
// onSoundComplete play next track
track.onSoundComplete = track.start;{
i = (i+1)%tracks.length;
this.loadSound(tracks*, true);
};
// stop track
stopBTN.onRelease = function() {
track.stop();
};
// play track
playBTN.onRelease = function() {
track.loadSound(tracks*, true);
};
// play next track
nextBTN.onRelease = function() {
i = Math.min(i+1, tracks.length-1);
track.loadSound(tracks*, true);
};
// play previous track
prevBTN.onRelease = function() {
i = Math.max(0, i-1);
track.loadSound(tracks*, true);
};

// playlist
var tracks = ["anothergangsta.mp3", "120talk.mp3"], i = 0;
// define sound object
track = new Sound();
// load first track
track.loadSound(tracks*, true);
// onSoundComplete loop track
track.onSoundComplete = track.start;
// stop track
stopBTN.onRelease = function() {
track.stop();
};
// play track
playBTN.onRelease = function() {
track.loadSound(tracks*, true);
};
// play next track
nextBTN.onRelease = function() {
i = Math.min(i+1, tracks.length-1);
track.loadSound(tracks*, true);
};
// play previous track
prevBTN.onRelease = function() {
i = Math.max(0, i-1);
track.loadSound(tracks*, true);
};

Ok , cool it works, i think i did it right but i noticed that it doesnt loop when you goto control > test movie.

Cheers for all your help man
i am very grateful

You’re welcome. =)

And it also worked for me when testing the movie in Flash. :crazy: :stuck_out_tongue: