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??
system
July 9, 2003, 11:29am
2
system
July 9, 2003, 11:30am
3
Hows that going to help me?
system
July 9, 2003, 11:33am
5
Yes, just a lot of links, but what bit are u answering? the bit saying about a tutorial?
system
July 9, 2003, 11:36am
6
system
July 9, 2003, 12:23pm
7
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?
system
July 9, 2003, 12:46pm
8
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? :-\
system
July 9, 2003, 1:09pm
10
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.
system
July 9, 2003, 1:15pm
11
Oh!!
Replace the whole onSoundComplete handler with this line of code:
track.onSoundComplete = track.start;
=)
system
July 9, 2003, 1:38pm
14
m8 when i listen to it now, it doesnt play next rack which is good but how do i make it continuously play that 1 track
system
July 9, 2003, 1:43pm
15
The code I gave you works fine, I just tested it. :-\
system
July 9, 2003, 1:46pm
16
? 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);
};
system
July 9, 2003, 1:49pm
17
// 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);
};
system
July 9, 2003, 1:53pm
18
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
system
July 9, 2003, 1:54pm
19
You’re welcome. =)
And it also worked for me when testing the movie in Flash. :crazy: