I'm not clear that AppDom and SecDom affect loading images (JPG, GIF,
etc).  You either have permission from the crossdomain.xml at flickr.com
or you don't.

 

You can almost always load it, you just can't always access its pixels.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jurgen Beck
Sent: Friday, May 25, 2007 3:34 PM
To: [email protected]
Subject: [flexcoders] Flickr - Issue with LoaderContext

 

I'm running into security sandbox violation issues trying to load images

from a Flickr account.

Since the Image component derives from SWFLoader I am setting the 
LoaderContext before the image source is assigned. The image component 
is used inside my custom component, which in turn is used as an 
itemRenderer in a TileList.

Here is the image component code fragment:

<mx:Image id="imgThumbnail"
source="{data.url}"
initialize="imageInit()" 
width="75" height="75"/>

Here is my imageInit() method:

private function imageInit():void {
loaderContext = new LoaderContext();
loaderContext.applicationDomain = 
ApplicationDomain.currentDomain;
loaderContext.securityDomain = 
SecurityDomain.currentDomain; 
loaderContext.checkPolicyFile = true;
imgThumbnail.loaderContext = loaderContext;
} 

I've traced through the processes and the LoaderContext is definitely in

place before the image source gets assigned, so I should be good. 
However, the application is still returning a security sandbox violation

error stating that the connection to http://farm1.static.flickr.com/...
<http://farm1.static.flickr.com/...>  
was halted - not permitted from [my server].

This obviously should be working fine. Looking through Ely's 
DisplayShelf component, there are no such issues. So the question is 
what else is missing.

Anyone with some thoughts?

Thanks,

Jurgen

 

Reply via email to