Load and Display an Image
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:VBox width="400" height="300"> <mx:Script> import mx.core.BitmapAsset; [Embed(source="a.png")] private var flag:Class; private function imgMod():void { var asset:BitmapAsset = new flag() as BitmapAsset; img3rd.source = asset; } </mx:Script> <mx:Image source="a.png"/> <mx:Image source="{flag}"/> <mx:Image id="img3rd" creationComplete="imgMod()"/> </mx:VBox> </mx:Application>