Flex/Flash/Actionscript

Yes!! Thank you Flickr for crossdomain.xml

Throw away those Flickr proxies! They added an open crossdomain file on http://static.flickr.com. Fuck yeah! Read the blog post here. You can see the crossdomain file here: http://static.flickr.com/crossdomain.xml. Thank GOD. I no longer need to route every single Flickr image through my server just to get access to BitmapData for an image. This is one of those things that bugged me so much about Flickr. They gave us a nice open crossdomain file on their server we use for api calls, but not on the server that gives us images.

w00t!!

P.S. I usually don’t do these rehashing of blogosphere posts, but this one makes my life a helluva lot easier, so I wanted to share in case anyone missed it.

Related:

  • I can't believe I've gone this long without going through the rite of passage that is the Flickr api Flex app. Well, here it is. I've created a new component that extends ViewStack that does the "photo shuffling" effect when you change photos here. I'll be releasing the source code…
    Tags: flickr, images, image, api, things
  • This morning was the kickoff of the 360Flex conference. I got an email last night from Mark Anders from Adobe who was giving the keynote letting me know that he was going to show the RSS Flex app I made during the keynote. SWEET! I was excited to see it…
    Tags: lot, flickr
Standard

9 thoughts on “Yes!! Thank you Flickr for crossdomain.xml

  1. Hello Doug,
    Thanks for reporting the news…However, I’m still seeing an error with my stuff:
    SecurityError: Error #2122: Security sandbox violation: BitmapData.draw: http://www.foo.com/beta/foo.swf cannot access http://farm2.static.flickr.com/1089/1265703777_284e402b37_m.jpg. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.

    Is there something I’m supposed to set with my code before loading the image? Also, the image I’m loading is from farm2.static.*, I assume that the crossdomain file at static.flickr.com would bubble up to farm2.static*?

  2. Ooops, nevermind. I forgot I commented out the code that would force the domain policy file to load.

    var loaderContext:LoaderContext = new LoaderContext();
    loaderContext.checkPolicyFile = true;
    daImage.loaderContext = loaderContext;

  3. Tony says:

    Now we are waiting for another example of the tileUI with flickr search capabilities. I can hardly wait. I am beside myself with anticipation.

  4. Actually, I’m still struggling. I’ve enabled a loaderContext on my image, yet I’m still getting the following error, the code above, with the loaderContext.checkPolicyFile = true still yields the following error:

    SecurityError: Error #2122: Security sandbox violation: Loader.content: http://www.foo.com/beta/foo.swf cannot access http://farm2.static.flickr.com/1038/1268531562_468c2e72f2_m.jpg. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.
    at flash.display::Loader/get content()
    at mx.controls::SWFLoader/get content()
    at TestWindow/::dupeImage()
    at TestWindow/::dragIt()

    Anything else I could be missing?

Comments are closed.