Meaningless Drivel is fun!*
The moose likes Flex and the fly likes # in source of Image component Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "# in source of Image component" Watch "# in source of Image component" New topic
Author

# in source of Image component

Jisha Anand
Ranch Hand

Joined: Apr 02, 2009
Posts: 62

Hi All,

This might be a silly doubt for you Flex gurus; kindly forgive my ignorance as I am a newbie to Flex :-(. The issue is I have a Image component in my mxml. The 'source' of the same is a url of a png file from some other system. If I use the url in my web browser directly it works. But if I use the same in my Image component the image does not show up. The only reason I can see is because the source url contains '#' in it as the png name contains that. So the source value is something like: "http://ea123:8080/something/new#value#01.png".

Can this be the reason? If so, what can be done to solve it? Thanks a zillion.

Warm Regards,
Jisha


SCJP, SCWCD, SCBCD
Iftikhar Arain
Ranch Hand

Joined: Jul 17, 2002
Posts: 95

Hitting image URL in browser doesn't require crossdomain.xml but loading image in Image component require crossdomain.xml.

http://stackoverflow.com/questions/2096820/loading-external-images-from-another-domain

Adobe specs:
http://help.adobe.com/en_US/flex/using/WSc5cd04c102ae3e97-33ad5caa12c719dc7c8-8000.html

When you load images at runtime, you should be aware of the security restrictions of Flash Player or AIR. For example, you can reference an image by using a URL, but the default security settings only permit applications built in Flex to access resources stored on the same domain as your application. To access images on other servers, ensure that the domain that you are loading from uses a crossdomain.xml file.



SCJP,SCWCD,IBM UML,FLEX & AIR,MCAD,MCSD, Adobe ACE
Jisha Anand
Ranch Hand

Joined: Apr 02, 2009
Posts: 62

Thanks a lot for your reply Iftikhar Arain

So you mean to say it is a security issue and not a specific one related to '#' in my url right? Even I thought the same & did put crossdomain.xml to see if it is working fine.

But the thing is the issue exist only for those images which have '#' in their url and the other images are loading without any errors. This problem exists even if I put crossdomain.xml in the server of the images

So I think the issue is specific for character like '#' rather than an generic problem. But I am not yet able to find any solution for this
Iftikhar Arain
Ranch Hand

Joined: Jul 17, 2002
Posts: 95

Hi Anand,

Would it be possible for you to post the code, specially the URLs you are trying to load the images from?

Regards,
iftikhar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: # in source of Image component
 
Similar Threads
Need help to access images with app running on Weblogic 10
Displaying GIF/PNG image files in a Java Swing application
Why did it have to be PNG
a problem with servlet url mapping
Flex3 with Java - Questions