Well here goes nothing

After about a few days of messing with loading id3 tags into flash I have come to find out that you can only use a id3’s from a loaded mp3, if the mp3 is a event. Ok no problem, my problem now is how would I add a preloader to show the percent loaded of the audio? So far this is my code see below, the id3 information is loaded into a dynamic textbox with the instance name info. How would I add a preloader to the income mp3? Also the code below is set on a button, and not on a frame if that helps any.


on (release) {
	myTrack = new Sound();
	function Music() {
		myTrack.start();
		if ((myTrack.getBytesLoaded() == myTrack.getBytesTotal()) && myTrack.duration>0) {
			info.text += "Song: "+myTrack.id3.songname+"  ";
			info.text += "Artist: "+myTrack.id3.artist+"  ";
			info.text += "Album: "+myTrack.id3.album+"  ";
			clearInterval(poll);
		}
	}
	myTrack.loadSound("myfile.mp3", false);
	poll = setInterval(Music, 1000);
}

Thanks in advance!!

why do you want to make a preloader for a mp3??? cant you just stream it? what is it exactly that you want to do? please be a little more specific

Grim

what about equalizer-like displays? Running the mp3 through swiftMP3 will give you that and amost immediately accessible ID3 tags. That or store the tags in a text file or xml and load that in to get the tags and song url instead of relying on the song url (file) itself. It might be a little more work but if you’re not dealing with 100+ in and out songs, its most likely more than worth it.

yoink

tit (heh) should have this but I thought Id throw it up anyway

song data given via xml. simple implementation, oh yeah, and a ticker text display

Thxs man!!! Works great!!!

no problem, anything for someone with the power to squish my head in the palm of their hand like it was a rotten tomato. :beam:

LOL…ya I probably could do that…I have palmed peoples heads b4…:crazy: