Using Filereference to load image from server not local disk


I am currently using filereference in as3 to load a file from the users local disk and display instantly within a loader on the stage. This works fine but i am now needing to load files that are already stored on a server not the local disk, is this possible?

I have tried loading the url into a loader object but this takes far too long if the image is quite big where is filereference is almost instant.

My current code is:

var mFileReference:FileReference;
browseButton.addEventListener(MouseEvent.CLICK, onBrowseButtonClicked);

function onBrowseButtonClicked(event:MouseEvent):void {
	mFileReference=new FileReference();
	mFileReference.addEventListener(Event.SELECT, onFileSelected);
	var swfTypeFilter:FileFilter = new FileFilter("JPG/PNG Files","*.jpeg; *.jpg;*.gif;*.png");
	var allTypeFilter:FileFilter = new FileFilter("All Files (*.*)","*.*");
	mFileReference.browse([swfTypeFilter, allTypeFilter]);

function onFileSelected(event:Event):void {
	mFileReference.addEventListener(Event.COMPLETE, onFileLoaded);

function onFileLoaded(event:Event):void {
	var as FileReference;
	var data:ByteArray=fileReference["data"];
	mFileReference.removeEventListener(Event.COMPLETE, onFileLoaded);
	var movieClipLoader:Loader=new Loader();
	movieClipLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onMovieClipLoaderComplete);

function onMovieClipLoaderComplete(event:Event):void {
	var as Loader;

Is there anyway i can take out the browse and selected stages and just load the server based image? Any help would really be appreciated


Of course you can load remote files, but there’s no magic that can change the time difference between a locally loaded file, and one that’s being loaded over a network. If this time to load is an issue, then work on optimising the stored file to only the quality and resolution necessary to display at screen resolution.

Thanks Eastcoast, i had funnily enough thought of doing that as my only option so i am now going to use the imagejpeg function in php to roduce a very low quality version which should hopefully speed up the loading issue