Imajine Blog Imajine Articles
Contact Me

Extract and view .mp3 file details - Name of the song, Album, and Artist

ID3 tags are data fields added to MP3 file, which contains information such as the name of a song, album, and artist of MP3 files.

We will use 'Sound.id3' property to extract these information.

In our script, we shall,

  • Write code to create text field at runtime
  • Create a sound object and attach external mp3 file to it
  • Extract ID3 tags data (if it exists in the MP3 file), that is 'Name of the song', 'Album' and 'Artist' of the mp3 file and allot to the text field created.

Follow the steps below to achieve our goal,

  • Create a fla file called 'id3.fla'
  • Select 'Frame1' and paste the below code in the 'Action' window

    this.createTextField("display_txt", 10, 85, 50, 300, 100); display_txt.autoSize = "left";
    //display_txt.textColor = 0xFFFFFF;
    display_txt.multiline = true;

    var song_sound:Sound = new Sound();
    song_sound.onLoad = function()
    {
    song_sound.start();
    };

    song_sound.onID3 = function():Void
    {
    display_txt.text += "Artist:\t" + song_sound.id3.artist + "\n";
    display_txt.text += "Song:\t" + song_sound.id3.songname + "\n";
    };

    song_sound.loadSound("http://www.imajine.in/tutorials/flash/sound2.mp3");

  • Press 'Ctrl' + 'Enter' to view ID3 Tags if it exists in the mp3 file.

Tags: Display song details, Display name of the song, Album and artist, id3 tags, Load external MP3 file into flash, Preload MP3 File, play mp3 file, Sound Object in Flash, Preload and play music, music play and stop button, Volume control, Sound control

Download Free Photo Gallery

Download Free Photo Gallery

You can download Imajine's Scrapbook Photo Gallery absolutely free of cost and to customize , you need no knowledge of Adobe Flash.  Click here to view Scrapbook Photo Gallery / download

Tutorials
Flash Tutorials
Horizontal 3D Carousel
MP3 Player
Scrapbook Photo Gallery
Text Enhancement
Color object
Glow effect using actionscript
Drawing with actionscript
Blur Effect
Load external .mp3 file
Preload external .mp3 file
Sound Controller
Set volume of externally .mp3 file
View MP3 song details
Actionscript blur effect
Actionscript fade in / out effect
Fireworks Tutorials
Custom Stroke
Typography / Ink blot effect
Photograph focus effect
Rainbow Pattern
Inset Text Effect
Fuzzy Light Blending Mode
Little bulb effect
Old paper effect
'Post it' effect
Hand drawn designs
Black/White and Sepia tone
Water color painting effect
Vintage effect on vector graphics
Solid color, black/white
Photoshop Tutorials
Photo editing
Purple Haze

Portfolio

Logos
Website design
CMS Customization
Flash
Web development
Print


Download free textures and patterns and use it for your personal use.

Click here to download Textures and Patterns.

Download free birthday cards

Free Birthday Cards
Click here to view Imajine's free downloadable birthday cards for personal and corporate use. Imajine's birthday cards are in jpeg format so it is faster to download and send in your wishes to your friends and family.
Bookmark and Share Tell a Friend jayanthi.varma@imajine.in  |  © 2008 Imajine