Hi Guys
I have this code:
Code:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.controls.Image;
[Embed(source="/assets/logo.swf")]
[Bindable]
public var imgCls:Class;
private function testPrint():void
{
var testImage:Image = new Image();
testImage.source = "{imgCls}";
this.addChild(testImage);
}
]]>
</mx:Script>
<mx:Button label="Icon Button 1" icon="{imgCls}" click="testPrint()"/>
<mx:Button label="Icon Button 2" icon="{imgCls}"/>
</mx:Application>
Based on an example from the adobe site. The images in the buttons work fine but the image that is attached just appears as a broken image. I've been trying to get this to work since Friday and it seems like it should be very simple!
Hope someone can help.
Thanks