LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-14-2007, 12:48 PM
Davegreen1 Davegreen1 is offline
Registered User
 
Join Date: Mar 2006
Posts: 21
Rep Power: 0
Davegreen1 is on a distinguished road
MP3 player question

I have created my own little mp3 player and have about 5 songs (so far) to choose from different buttons on the fla.
However what I have noticed is that I can stop the song and get the frame head to go and stream to the next song but the first song is still streaming.
Again if I hit another button that also streams another song, obviously until they are all fully loaded and if I hit enough (songs) streams, obviously the computer slows down and songs start breaking up !
Is there a way to "kill" the streaming process ?

This code is on my first frame
Code:
music1=new Sound();
music1.loadSound("Wake UP MP3 edit.mp3",true);
currentTrack=music1;

//button controls
wakeUp_btn.onRelease = function() {
	currentTrack.stop();
	gotoAndStop(1);
};
yummy_btn.onRelease=function(){
	currentTrack.stop();
	gotoAndStop(5);
}
bigGreen_btn.onRelease=function(){
	currentTrack.stop();
	gotoAndStop(10);
}
swim_btn.onRelease=function(){
	currentTrack.stop();
	gotoAndStop(15);
}
peaceful_btn.onRelease=function(){
	currentTrack.stop();
	gotoAndStop(20);
}


play_btn.onRelease = function() {
	currentTrack.start();
};
stop_btn.onRelease = function() {
	currentTrack.stop();
};

//mp3 song display
this.onEnterFrame=function(){
	songName_txt.text=music1.id3.songname.toUpperCase();
	
}
stop();
The buttons then take you to another part of the frame head with the following code obviously music2 changes to music3 and so on....
Code:
music2=new Sound();
music2.loadSound("Yummy Scrummy Mummy MP3 edit.mp3",true);
currentTrack=music2;

this.onEnterFrame=function(){
	songName_txt.text=music2.id3.songname.toUpperCase();

}
stop();

Flash can't stop the first loadSound. In another words, it stops the sound, but the loading process continues wich causes the user to download 2 files or how many I press, which is not good....

Another way I thought of doing it was to create an external swf and have the music in that, to load an unload, but that seems long winded.

Thanks for anyone's help

Cheers,

Dave

Last edited by [PAUL FERRIE] : 08-14-2007 at 01:09 PM Reason: tagged code
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The News From Adobe on the Future of Flash Platform FlashMove Chit Chat Lobby 0 11-10-2011 09:55 AM
Hidden button with mp3 player - working too well! help! 47rickym Flash CS3 / Flash 9 0 02-02-2009 04:55 PM
custom mp3 player VaNc3y Newbies 1 04-11-2007 05:09 PM
MP3 Player Will Not Work Online Gosta Newbies 12 12-18-2005 05:42 PM
Exciting new FLV / MP3 player... pushstream New Softwares 0 06-21-2005 09:52 PM




All times are GMT. The time now is 09:02 PM.