8 Replies Latest reply on Oct 20, 2006 9:11 AM by jonnybennett

    mp3 tags

    jonnybennett Level 1
      Is it possible to extract the id3 tags for exteranally loaded mp3s?....

      also I am using and publishing as flash 8. I know it is possible to get the tags in version 6, but you have to wait until the mp3 is fully loaded, is this still the case for flash 8?

      Thanks J.
        • 1. Re: mp3 tags
          derobinson Level 1
          Yes it is (with some caveats, but...). Here's the LiveDocs to get you started:

          http://livedocs.macromedia.com/flash/8/main/00000676.html

          Good luck!
          • 2. Re: mp3 tags
            jonnybennett Level 1
            Hello, thanks for the resoponse, I had looked at the livedocs info whoich solved part of my problem, however I am now only experiencing a problem with the songname.

            mySound.id3.artist
            mySound.id3.songname

            flash does not seem to recognise 'songname' for some reason. If you paste it into your actionscript songname does not turn blue, like artist. However all the docs say that it should be songname... any one any ideas?
            • 3. Re: mp3 tags
              jonnybennett Level 1
              Sorry ignore, that post, i think the problem is with the idtags in the mp3, although it does seem stange that the 'songname' does not turn blue, anyway. Thanks.
              • 4. Re: mp3 tags
                kglad Adobe Community Professional & MVP
                i don't see a songname property. try:

                mySound.id3.songtitle
                • 5. Re: mp3 tags
                  jonnybennett Level 1
                  Thanks kglad for articulating what I tried to with the words... 'it doesn't turn blue!'.
                  However although it don't turn blue... mySound.id3.songname.. does appear to work, and songtitle doesn't.... I'm not saying you are wrong, as this would be like argueing with god, although I am not a religous man, i wouldn't want to upset you or the big man. Thanks anyway!.
                  • 6. Re: mp3 tags
                    kglad Adobe Community Professional & MVP
                    you're correct. i'm not sure why flash suggests songtitle is an id3 property, but that appears to be an error. songname and TIT2 should both return the song's name.

                    p.s. i'm not god (my wife bosses me around and surely that wouldn't happen if i were in charge) and i'm always happy to learn something new.
                    • 7. Re: mp3 tags
                      jonnybennett Level 1
                      Perhaps you're wife is god?
                      The search for god was probably not what macromedia or adobe had in mind for these forums, so I will stop, I have a slight further problem and that is that the Id3 tags are being called twice, at the begining and end of the song.

                      mySound.onID3 = function():Void {
                      tester.text += "Artist:" + mySound.id3.artist + "\n";
                      tester.text += "Title:" + mySound.id3.songname + "\n";
                      // i need to delete the functon here so that it doesn't get called twice.
                      }

                      onID3 is being called twice, as my output for tester.text is being repeated. I think this is becuase 'if you have ID3 V2 and ID3 V1, on will be called twice. ID3 V2 is at the start of the song. So the first onID3 will be ID3 V2. ID3 V1 is at the end of the song.'
                      Therefore how could I stop this onID3 function after the ID3V2 tags at the start are called.
                      I can't delete mySound, as that also holds the sound? is it possible to delete the function only... delete mySound.onID3() ?
                      • 8. Re: mp3 tags
                        jonnybennett Level 1
                        Unless anyone can think of a better way...

                        passOne=1;
                        mySound.onID3 = function():Void {
                        if (passOne==1){
                        tester.text += "Artist:" + mySound.id3.artist + "\n";
                        tester.text += "Title:" + mySound.id3.songname + "\n";}
                        delete passOne;}