In my environment (a FLEX 4.5 desktop AIR project) the following is displaying the image :
<s:Image source="http://www.adobe.com/images/shared/product_mnemonics/50x50/flash_50x50.gif" />
Did you put the 'http' in front of your URL?
If you're in a Flex Web environment and the domain you're requesting the image is not the same from the one you're launching your app, you're violating the security sandbox policies, to resolve that you have to set up a cross domain policy... (please see http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf6167e-7fff.html#WS2d b454920e96a9e51e63e3d11c0bf69084-7f11)
That method is not a dynamic way of adding images. Infact My real problem was dynamically adding an image using the @Embed Statement. The reason i wanna do this is because i want the user to see what he has uploaded but i have found a way around it
My initial approach was to upload the image first and return the server path back to my flex app then which i tried to assign the returned path as the source property of the image control which didnt work as i expected. But now i found out that the FileReference class(as of FPV10) has the load() method which loads the image as a bytearrray in the FileReference's data Property...I use that and it work fine now! I didnt really need the server round trip to accomplish that!
I'm glad you found a solution. Just for information you won't ever be able
to embed an image at runtime (with a @Embed statement or what ever) as it is
done at compilation time (it would mean you're modyfing the compiled binary
at runtime !!!)
So to display an Bitmap with a s:Image (same withe s:BitmapImage) :AIR remote from an HTPP server : <s:Image source="http://www.server.com/image.png"/>AIR local from disk : <s:Image source="new File(path/to/image).url"/>Flex from binary : <s:Image source="<reference to a bitmap ByteArray>"/> (the byte array can be obtained from a FileReference or from any Bitmap object)