STEP 1

download the following package: http://code.google.com/p/id3imagereader/downloads/list

unzip the package and place the com map on your desktop.

STEP 2

launch adobe flash or another flash editor.
Create a new .fla file and save it to the desktop. Set the main class for the .fla file, and open that as class.
You also need a correct encoded mp3 file with embedded cover art! Place the mp3 file on your dekstop

STEP3

Now we are going to write some code,
firts we'll setup the main class and function, we also need to import some packages including the ID3img package.

Your code should look like this:
*the name example1 depends on how you called the .as file.

package
{
    import flash.display.MovieClip;
    import com.ashworks.ID3img;
    import flash.events.*;
    import flash.display.Sprite;
    import flash.display.Bitmap;
    import flash.net.URLRequest;

    public class example1 extends MovieClip
    {
        public function example1()
        {


        }
    }
}


STEP4

In the function example1() we create a variable called imageloader like this:

var imgloader:ID3img = new ID3img(new URLRequest("[your mp3 file name]"),true,400,400);
imgloader.addEventListener(Event.ID3, onImgLoaded);


the 400,400 stands for the width and height of the image you create with this function
We also add an eventlistener for the imgloader. See above code.

STEP 5

now we write to code for the eventlistener

function onImgLoaded( e:Event ):void
{
 var holder:Sprite = new Sprite();
 holder.addChild(new Bitmap(e.target.bitmapData.clone()));
 addChild(holder);
 }


first we create an new sprite called holder.
Next we add a new Bitmap to holder.
And last we add the holder to the stage.

STEP 6

your final code should look like this:


package
{
    import flash.display.MovieClip;
    import com.ashworks.ID3img;
    import flash.events.*;
    import flash.display.Sprite;
    import flash.display.Bitmap;
    import flash.net.URLRequest;

    public class example1 extends MovieClip
    {
        public function example1()
        {
            var imgloader:ID3img = new ID3img(new URLRequest("mp3/3.mp3"),true,400,400);
            imgloader.addEventListener(Event.ID3, onImgLoaded);

            function onImgLoaded( e:Event ):void
            {
                var holder:Sprite = new Sprite();
                holder.addChild(new Bitmap(e.target.bitmapData.clone()));
                addChild(holder);
            }
        }
    }
}



Hope you enjoyed it!