-
mp3 player
Hi everyone and apologies for my English, this is my question (AS2):
I'm currently working on a mp3 player, 3 tracks, so 3 frames with:
Code:
s = new Sound();
s.loadSound("url", true);
stopped=false;
paused=false;
stop();
The next and previous buttons code is respectively:
Code:
on(release) {
s.stop();
nextFrame();
}
and
Code:
on(release) {
s.stop();
prevFrame();
}
But I'd also would like that, if I press the "next" button while the last track (last frame, so frame 3) is playing it starts playing track 1 (on frame 1).
In other words if the current frame is the last frame, then go to and play frame 1. Same for the "previous" button.
Sorry, hope it makes sense, thanks in advance.
Also, at the moment when it has played one track it stops, wondering if it was possible to make it play all of them and then back to the first without pressing any button?
-
lemon juice hurts your eyes
Try naming your 1st frame "Track1" and on the btn action in your 3rd frame, replace nextFrame(); by gotoAndStop("Track1");
That would solve your first problem I think (I would also advice to name the other frames too, maybe it will come out handy in the future ...).
Florian
Florian Vanthuyne
WAR AGAINST SOLVED THREADS
mark yours as Resolved under Thread Tools!
-
Heehee but of course! Me silly, thanks SO much!
Second problem anyone?
-
s.onSoundComplete = function() {
this/_root.gotoAndStop(blahblah);
}
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|