<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: My first Flickr Flex app</title>
	<atom:link href="http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/feed/" rel="self" type="application/rss+xml" />
	<link>http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/</link>
	<description>A blog about Adobe Flex</description>
	<pubDate>Fri, 21 Nov 2008 03:32:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: anoop</title>
		<link>http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-96345</link>
		<dc:creator>anoop</dc:creator>
		<pubDate>Fri, 30 May 2008 13:04:36 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-96345</guid>
		<description>nice ya..can u help me to try this</description>
		<content:encoded><![CDATA[<p>nice ya..can u help me to try this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shan</title>
		<link>http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-33006</link>
		<dc:creator>Shan</dc:creator>
		<pubDate>Sun, 02 Dec 2007 17:00:41 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-33006</guid>
		<description>Any chance you're going to a) release the source and/or b) update this to not use a bitmap proxy?

I'd love to clean it up &#38; put it on riaforge or something if you don't have the time.</description>
		<content:encoded><![CDATA[<p>Any chance you&#8217;re going to a) release the source and/or b) update this to not use a bitmap proxy?</p>
<p>I&#8217;d love to clean it up &amp; put it on riaforge or something if you don&#8217;t have the time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-19547</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Fri, 12 Oct 2007 18:42:52 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-19547</guid>
		<description>oops...my script snippet got cut off:

	$session = curl_init($_GET['url']);  // Open the Curl session
	curl_setopt($session, CURLOPT_HEADER, false); // Don't return HTTP headers
	curl_setopt($session, CURLOPT_RETURNTRANSFER, true);   // return contents
	$xml = curl_exec($session); // Make the call
	header("Content-Type: text/xml"); 	  // Set the content type appropriately
	echo $xml; 	      // Spit out the xml
	curl_close($session); // And close the session

If anyone has a quick answer then great.  But I suppose I DO get paid to figure this stuff out on my own. :-)</description>
		<content:encoded><![CDATA[<p>oops&#8230;my script snippet got cut off:</p>
<p>	$session = curl_init($_GET['url']);  // Open the Curl session<br />
	curl_setopt($session, CURLOPT_HEADER, false); // Don&#8217;t return HTTP headers<br />
	curl_setopt($session, CURLOPT_RETURNTRANSFER, true);   // return contents<br />
	$xml = curl_exec($session); // Make the call<br />
	header(&#8221;Content-Type: text/xml&#8221;); 	  // Set the content type appropriately<br />
	echo $xml; 	      // Spit out the xml<br />
	curl_close($session); // And close the session</p>
<p>If anyone has a quick answer then great.  But I suppose I DO get paid to figure this stuff out on my own. <img src='http://dougmccune.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-19546</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Fri, 12 Oct 2007 18:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-19546</guid>
		<description>This is actually what I would need in Perl form:

</description>
		<content:encoded><![CDATA[<p>This is actually what I would need in Perl form:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-19544</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Fri, 12 Oct 2007 18:36:02 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-19544</guid>
		<description>Can anybody help me port this PHP proxy script to Perl?  My Perl is not very good but thats what I have to use and I do not want install PHP as well on this server I am using.

I am actually not using this for Flickr files but rather just for loading a tiny piece of data from another server.

Cheers,

Colin</description>
		<content:encoded><![CDATA[<p>Can anybody help me port this PHP proxy script to Perl?  My Perl is not very good but thats what I have to use and I do not want install PHP as well on this server I am using.</p>
<p>I am actually not using this for Flickr files but rather just for loading a tiny piece of data from another server.</p>
<p>Cheers,</p>
<p>Colin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mister</title>
		<link>http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-14127</link>
		<dc:creator>Mister</dc:creator>
		<pubDate>Mon, 10 Sep 2007 22:34:52 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-14127</guid>
		<description>Doug (different one), 

I don't think you tested the smoothing technique (http://blog.739saintlouis.com/2007/02/05/scaling-an-image-with-smoothing/)  on a web server.  I tried this method thinking to myself, why would it work just because you smoothed the image?  It does not work, its kind of like grinding down bananas and smoking them in a pipe, you same advertised "high" effect.  If you test anything locally, Flex will not give you any errors, but post the same application to the web, and you will find the sandbox violation staring you in the face.   The only way to get by this error is to proxy the image.   If you have a working app and code on a serve, I would love to be proved wrong.</description>
		<content:encoded><![CDATA[<p>Doug (different one), </p>
<p>I don&#8217;t think you tested the smoothing technique (http://blog.739saintlouis.com/2007/02/05/scaling-an-image-with-smoothing/)  on a web server.  I tried this method thinking to myself, why would it work just because you smoothed the image?  It does not work, its kind of like grinding down bananas and smoking them in a pipe, you same advertised &#8220;high&#8221; effect.  If you test anything locally, Flex will not give you any errors, but post the same application to the web, and you will find the sandbox violation staring you in the face.   The only way to get by this error is to proxy the image.   If you have a working app and code on a serve, I would love to be proved wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug (a different one)</title>
		<link>http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-8279</link>
		<dc:creator>Doug (a different one)</dc:creator>
		<pubDate>Thu, 02 Aug 2007 07:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-8279</guid>
		<description>When Flex loads a dynamically loaded image, it converts it into a bitmap.  You can apply smoothing to this converted bitmap, and display that instead of the jpeg--no proxy needed!  It took me awhile to find the solution, but the one on this site finally worked: http://blog.739saintlouis.com/2007/02/05/scaling-an-image-with-smoothing/

Doing it this way is better, because having your server act as a proxy for Flickr eats up your bandwith and kills the whole point of putting your images on Flickr instead of your own server.

By the way, I am using the Flex Builder 3 beta.  I think the example on that site was for flash, so I only used the script, and I also imported mx.core.BitmapAsset, but I'm not sure if that was necessary.</description>
		<content:encoded><![CDATA[<p>When Flex loads a dynamically loaded image, it converts it into a bitmap.  You can apply smoothing to this converted bitmap, and display that instead of the jpeg&#8211;no proxy needed!  It took me awhile to find the solution, but the one on this site finally worked: <a href="http://blog.739saintlouis.com/2007/02/05/scaling-an-image-with-smoothing/" rel="nofollow">http://blog.739saintlouis.com/2007/02/05/scaling-an-image-with-smoothing/</a></p>
<p>Doing it this way is better, because having your server act as a proxy for Flickr eats up your bandwith and kills the whole point of putting your images on Flickr instead of your own server.</p>
<p>By the way, I am using the Flex Builder 3 beta.  I think the example on that site was for flash, so I only used the script, and I also imported mx.core.BitmapAsset, but I&#8217;m not sure if that was necessary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shaun</title>
		<link>http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-5813</link>
		<dc:creator>Shaun</dc:creator>
		<pubDate>Thu, 21 Jun 2007 13:46:39 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-5813</guid>
		<description>I particularly like the viewstack.  Look forward to seeing it in flexLib.  Any thoughts on when it might make it in there?

And thanks for posting so much cool stuff by the way.

Shaun</description>
		<content:encoded><![CDATA[<p>I particularly like the viewstack.  Look forward to seeing it in flexLib.  Any thoughts on when it might make it in there?</p>
<p>And thanks for posting so much cool stuff by the way.</p>
<p>Shaun</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sanford Redlich</title>
		<link>http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-5138</link>
		<dc:creator>Sanford Redlich</dc:creator>
		<pubDate>Wed, 06 Jun 2007 22:16:18 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-5138</guid>
		<description>Love the smooth look and feel.  Nice work, Doug.  S.</description>
		<content:encoded><![CDATA[<p>Love the smooth look and feel.  Nice work, Doug.  S.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-4580</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Fri, 01 Jun 2007 20:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/31/my-first-flickr-flex-app/#comment-4580</guid>
		<description>Since the images are located on a flickr server like farm1.static.flickr.com and there is no crossdomain.xml file on that server (there is a crossdomain.xml for api.flickr.com so you can use the api) that means you can't get access to the bitmapData of the loaded images when you load them from flickr. This is dumb, but that's the way it is. So you can load images just fine, but the reflection class copies the bitmapData of the image, so that doesn't work if you load them straight from the flickr server. I also wanted to set bitmap smoothing to true on the images so the thumbnails don't look as pixelated, and that also requires access to the bitmapData of the loaded image.

So the answer is to create a proxy that loads the flickr image so it appears to come from the same domain.

The PHP proxy page looked like this:

&lt;pre&gt;&lt;code&gt;
&#60;?php
    
	
	if(isset($_GET['file']))
    {
	
        // just check if the file to read is from flickr
        if(preg_match("/^http:\/\/[0-9a-z_]+\.static\.flickr\.com\/[0-9]+\/[0-9a-z_]+\.jpg$/", $_GET['file']))
        {
			header( "content-type:image/jpeg" );
			
			$contents = file_get_contents($_GET['file']);
			
			header( "content-length:" .strlen($contents) );
			
			echo $contents;
        }
    }
?&#62;
&lt;/code&gt;&lt;/pre&gt;

Here's some discussion on this issue with the flickr farm servers:
http://www.flickr.com/groups/api/discuss/72157594509936466/

This is more or less the same as what's documented here:
http://www.sephiroth.it/tutorials/flashPHP/cube_effect/</description>
		<content:encoded><![CDATA[<p>Since the images are located on a flickr server like farm1.static.flickr.com and there is no crossdomain.xml file on that server (there is a crossdomain.xml for api.flickr.com so you can use the api) that means you can&#8217;t get access to the bitmapData of the loaded images when you load them from flickr. This is dumb, but that&#8217;s the way it is. So you can load images just fine, but the reflection class copies the bitmapData of the image, so that doesn&#8217;t work if you load them straight from the flickr server. I also wanted to set bitmap smoothing to true on the images so the thumbnails don&#8217;t look as pixelated, and that also requires access to the bitmapData of the loaded image.</p>
<p>So the answer is to create a proxy that loads the flickr image so it appears to come from the same domain.</p>
<p>The PHP proxy page looked like this:</p>
<pre><code>
&lt;?php

	if(isset($_GET['file']))
    {

        // just check if the file to read is from flickr
        if(preg_match("/^http:\/\/[0-9a-z_]+\.static\.flickr\.com\/[0-9]+\/[0-9a-z_]+\.jpg$/", $_GET['file']))
        {
			header( "content-type:image/jpeg" );

			$contents = file_get_contents($_GET['file']);

			header( "content-length:" .strlen($contents) );

			echo $contents;
        }
    }
?&gt;
</code></pre>
<p>Here&#8217;s some discussion on this issue with the flickr farm servers:<br />
<a href="http://www.flickr.com/groups/api/discuss/72157594509936466/" rel="nofollow">http://www.flickr.com/groups/api/discuss/72157594509936466/</a></p>
<p>This is more or less the same as what&#8217;s documented here:<br />
<a href="http://www.sephiroth.it/tutorials/flashPHP/cube_effect/" rel="nofollow">http://www.sephiroth.it/tutorials/flashPHP/cube_effect/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
