Simple XML adjusting HELP needed for AS3 MP3 list

hello

I am new to XML and I have tweaked a mp3 player from a Lynda.com file to do exactly what I need it to except for one small thing…

I need for each song to be able to load different album artwork independently,
right now the jpeg is assigned to all the songs in the playlist.

I did the tutorial and while it made sense.
this “final” example goes far beyond the scope of the tutorial (he leaves it as an example of what could be done if you know what you are doing (I don’t))

so any help would be greatly appreciated.

this is the way the xml file is set up.


<album cover="audio/lp1/1a.jpg">	
<song>
		<file>audio/lp1/01 songf.mp3</file>
		<name>song - info - 2009</name>
		<link></link>
	</song>
</album>

  • I have tried a variety of things involving the tag and the album cover assignment code w/o any luck

and this is the external .as file that calls the data from said xml


package com.lynda.audio
{
	import com.lynda.ui.*;
	
	import flash.display.*;
	import flash.events.*;
	import flash.media.*;
	import flash.net.*;
	import flash.system.*;
	
	import gs.TweenLite;

	public class PlayerDocument extends MovieClip
	{
		private var imageLoader:Loader = new Loader();
		public var xmlFile:String = "xml/music.xml";
		public var album:XML;
		public var model:PlayerModel;
		public var all_mc:MovieClip;
		
		
		public function PlayerDocument()
		{
			all_mc = new MovieClip();
			list.y = 340;
			list.x = 50;
			player_mc.y = 300;
			player_mc.x = 50;
			player_mc.alpha = list.alpha = .5;
			addChild(imageLoader);
			imageLoader.x = 50;
			imageLoader.alpha = 0;
			addChild(list);
			model = new PlayerModel();
			list.ItemClass = ListItem;
			model.addEventListener(Event.COMPLETE, xmlLoaded);			
			model.load(new URLRequest(xmlFile));
			player_mc.addEventListener(Player.SONG_PLAYING, songIsPlaying);
			list.visible = false;			
		}
		
		
		private function songIsPlaying(event:Event):void
		{
			list.setCurrentIndex(model.currentIndex);
		}
		
		private function xmlLoaded(event:Event):void
		{
			album = model.data;
			imageLoader.load(new URLRequest(album.@cover));
			TweenLite.to(imageLoader, 1,{ alpha:1});
			for(var i:uint = 0; i < album.song.length(); i++)
			{
				list.addItem(album.song*.name);
			}
			list.addEventListener(Event.CHANGE, listChanged);
			all_mc.addChild(player_mc);
			all_mc.addChild(list);
			all_mc.addEventListener(MouseEvent.ROLL_OVER, allOver);
			all_mc.addEventListener(MouseEvent.ROLL_OUT, allOut);
			addChild(all_mc);
			player_mc.init(model);
			
		}
		
		private function allOver(event:MouseEvent):void
		{
			list.visible = true;
			TweenLite.to(player_mc, .5, {y:300, alpha:.95});//,onUpdate:updateAll
			TweenLite.to(list, .5, {y:340, alpha:.95});
		}
		
		private function allOut(event:Event):void
		{
			TweenLite.to(player_mc, .5, {y:300, alpha:.5});//,onUpdate:updateAll
			TweenLite.to(list, .5, {y:340, alpha:0});
		}
		
		private function updateAll():void
		{
			list.y = player_mc.y; + 25;
			list.alpha = player_mc.alpha;
		}

		private function listChanged(event:Event):void
		{
			if(list.currentIndex != model.currentIndex || !player_mc.sound)
			{
				model.setCurrentIndex(list.currentIndex);
			}
		}
		
	}
}