Bind icon to class
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> [Bindable] [Embed(source="a.png")] private var Icon:Class; </mx:Script> <mx:Button label="[Embed(source='a.png')]" icon="{Icon}" /> <mx:Button label="@Embed('a.png')" icon="@Embed('a.png')" /> </mx:Application>