4 Replies Latest reply on Aug 17, 2006 11:20 AM by asiabackpacker

    Cannot Read ID3 Tags in Flash

    asiabackpacker Level 1
      I have tried everything that I can find online, and in this forum, and I cannot get any ID3 tags from any MP3 files to display in Flash. I even copied and pasted the code in the Flash help, but even this didn't work. Any ideas?? There doesn't seem to be a lot of documentation on this, but it seems like it should be super easy to do.

      Here is the code I am using now:

      var song:Sound = new Sound();
      song.onID3 = function () {
      display_txt.text = "Artist: " + song.id3.TPE1 + newline;
      display_txt.text += "Song: " + song.id3.TIT2;
      song.loadSound("MP3s/myfile.mp3", true);

      "Artist" and "song" just come up as undefined. They are most definitely defined in my file, and I have tried different versions of ID3 tags. Nothing is working. It is obviously something so incredibly obvious that I can't figure out what it is.

      Thanks for any help!
        • 1. Cannot Read ID3 Tags in Flash
          .:}x-=V!P=-x{:. Level 3
          are you exporting for Flash Player 7?
          if you are using Flash Player 6
          song.id3.artist - instead of - song.id3.TPE1
          song.id3.songname - instead of - song.id3.TIT2
          • 2. Re: Cannot Read ID3 Tags in Flash
            asiabackpacker Level 1
            I am exporting to 7. I tried your suggestion, and exporting to 6, but that didn't work either.

            What is going on here? Does this work for everyone else?

            Thanks for trying!
            • 3. Re: Cannot Read ID3 Tags in Flash
              funkysoul Level 4
              to able to identify the ID3 tags, flash must download the complete file before showing it, that doesn't happen automatically unless you create a function that check when the files has been completely downloaded.
              • 4. Re: Cannot Read ID3 Tags in Flash
                asiabackpacker Level 1
                OK, if anyone cares to know, this is what I was doing wrong (I knew it was something stupid).

                I opened the file in iTunes to edit the ID3 attributes. But what I forgot is that when you open a file in iTunes, it copies it to the location of your iTunes library. So the file I was editing the ID3 attributes of in iTunes, and the file that my MP3 player was loading were actually two separate files.

                Can anyone say, "*******"? jk...

                Actually, Funksoul, your feedback helped me get to the answer, because once I added a function to check when the file has been downloaded, and I saw I was still having the same problem, i knew it HAD to be something stupid. But you are right, whatever I could have done it still wouldn't have worked without that function.

                So, THANK YOU THANK YOU THANK YOU!!!

                You guys are like having a community of experts on call 24/7. Thanks for the quick responses, too!