Read binary resource from HTTPService
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="myHTTPService.send()"> <mx:Script> import mx.controls.Image; import mx.controls.Alert; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import flash.utils.describeType; function resultHandler(event:ResultEvent):void { var img:Image = new Image(); var byteLoader:Loader=new Loader(); var byteArray:ByteArray=new ByteArray(); byteArray.writeUTFBytes(event.result as String); byteLoader.loadBytes(byteArray); var bitMap:Bitmap=Bitmap(byteLoader.content); img.source = bitMap; myVBox.addChild(img); } </mx:Script> <mx:HTTPService id="myHTTPService" url="http://localhost/a.png" result="resultHandler(event)" /> <mx:VBox id="myVBox"/> </mx:Application>