Mega Code Archive

 
Categories / Flex / Graphics
 

Bind Image to a variable

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">     <mx:Script>              [Embed(source="a.png")]         [Bindable]         public var CompassImage:Class;        </mx:Script>     <mx:Image x="10" y="10" id="compass" source="{CompassImage}"/> </mx:Application>