Use HTTPService to load an image file
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <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 faultHandler(event:FaultEvent):void { Alert.show(event.fault.faultString); } function resultHandler(event:ResultEvent):void { Alert.show(describeType(event.result)); } </mx:Script> <mx:HTTPService id="myHTTPService" url="http://localhost/a.png" fault="faultHandler(event)" result="resultHandler(event)" /> <mx:VBox id="myVBox" width="100%" height="100%" /> <mx:Button label="Invoke HTTPService" click="myHTTPService.send()" /> </mx:Application>