<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
width="72"
height="64"
alpha="1"
borderStyle="none"
horizontalScrollPolicy="off" verticalScrollPolicy="off"
dropShadowColor="#000000" backgroundAlpha="1"
shadowDistance="2" buttonMode="true" backgroundImage="@Embed(source='../assets/processing.swf')">
<mx:Script>
<![CDATA[
import flash.events.IOErrorEvent;
import flash.events.MouseEvent;
[Embed(source="../assets/error.png")]
private var AlbumArt:Class;
private function errorLoading(event:IOErrorEvent):void{
img.source = AlbumArt;
img.toolTip = "sem imagem";
this.setStyle("backgroundImage", undefined);
}
private function loaded(event:Event):void {
this.setStyle("backgroundImage", undefined);
}
]]>
</mx:Script>
<mx:Image id="img" x="6" y="2" width="60" toolTip="{data.title}" init="loaded(event)" ioError="errorLoading(event)" source="{data.src}"/>
</mx:Canvas>