<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blackcj.com &#187; Twitter</title>
	<atom:link href="http://www.blackcj.com/blog/tag/twitter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blackcj.com/blog</link>
	<description>Cutting edge development with Adobe Flex, ActionScript and AIR</description>
	<lastBuildDate>Thu, 15 Dec 2011 01:01:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Skimmer</title>
		<link>http://www.blackcj.com/blog/2009/03/24/skimmer/</link>
		<comments>http://www.blackcj.com/blog/2009/03/24/skimmer/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 06:51:25 +0000</pubDate>
		<dc:creator>Chris Black</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Skinning]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.blackcj.com/blog/?p=275</guid>
		<description><![CDATA[&#8220;A lifestreaming thing that lets you see it all in one place&#8221; Skimmer. The next Adobe AIR app and the hard work of many individuals over the past 6 months. It has been amazing to see this application turn from design into reality. This is a summary of the technologies used and some of the [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;A lifestreaming thing that lets you see it all in one place&#8221; </p>
<p>Skimmer.  The next Adobe AIR app and the hard work of many individuals over the past 6 months.  It has been amazing to see this application turn from design into reality.  This is a summary of the technologies used and some of the lessons learned throughout the development of Skimmer:</p>
<div id="attachment_277" class="wp-caption alignnone" style="width: 310px"><img src="http://www.blackcj.com/blog/wp-content/uploads/2009/03/skimmer-300x106.png" alt="Skimmer" title="Skimmer" width="300" height="106" class="size-medium wp-image-277" /><p class="wp-caption-text">Skimmer</p></div>
<p>The first decision was easy.  Use an MVC framework, more specifically PureMVC.  This application was estimated in the thousands and having a backbone was very important.  We spent the extra time upfront developing a solid structure which ended up helping out immensely when it came to bug fix and adding new features.  Creating new views became a snap when the data providers that accessed third party API&#8217;s were completed.</p>
<p>The second major decision was to use a SQLite database to store content locally.  This allowed for fast filtering of data and pre-processing of information.  It also greatly improved the load time of the application since we only needed to gather new information.</p>
<p>Thirdly, we decided to use image caching for all of the commonly used images to improve load times.  This increased the application start up and allows for fluid transitions between images in slide shows.  By extending a bulk loader class Skimmer is able to first check the local cache before making any requests to the internet for images.</p>
<p>One of the major challenge was working with the third party API&#8217;s.  The API&#8217;s for Flickr, YouTube, Twitter, TwitPic, Facebook and Blogger had varying levels of documentation and support.  Flickr had the most feature rich API while Facebook had the most difficult API to work with.  Many of them had third party AS3 libraries to use for interfacing with the service that we used as a base.</p>
<p>Another challenge was in skinning the flex components.  The application was not designed to look like an AIR application, which is a good thing <img src='http://www.blackcj.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   This, however, did create some interesting problems along the way.  We used a combination of CSS, class inheritance, overrode drawing methods, and even created some custom flex components.</p>
<p><strong>You can download skimmer here:</strong><br />
<a href="http://www.fallon.com/skimmer">http://www.fallon.com/skimmer </a></p>
<p>A shout out to everyone that made this happen:<br />
AL KELLY, BRENDA FOGG, CHRIS WIGGINS, DAVID SCHWEN. EXTENDED TEAM: ANDY GUGEL, SIERRA BRAVO, ANDREW WATSON, BEN DOLMAR, BLAGVOST DACHEV, CLAYTON SMITH, JON REXEISEN, KARSTEN LUNDQUIST, KONR NESS, KRIS SZAFRANSKI, MARK SEEMANN, MANISH SHRESTHA, MATT TONAK, MICHAEL WOODS, MINH VU, ROBB THOMAS, THOMAS O&#8217;NEILL.</p>
<p>Feel free to post any comments or questions you have about Skimmer.</p>
<p><a href="http://mashable.com/2009/03/24/skimmer/">http://mashable.com/2009/03/24/skimmer/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackcj.com/blog/2009/03/24/skimmer/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Display TwitPic Images in Flex &amp; AIR</title>
		<link>http://www.blackcj.com/blog/2009/02/23/display-twitpic-images-in-air-or-anywhere/</link>
		<comments>http://www.blackcj.com/blog/2009/02/23/display-twitpic-images-in-air-or-anywhere/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 00:50:37 +0000</pubDate>
		<dc:creator>Chris Black</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[TwitPic]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.blackcj.com/blog/?p=230</guid>
		<description><![CDATA[Problem: The TwitPic API does not currently support outgoing requests and the image source from amazon aws contains an AWS AccessKeyId, expiration time stamp, and signature. This would normally require a regular expression to rip the source JPG path out of the HTML. Ripping the source out of the HTML is a bit of a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong><br />
The <a href="http://twitpic.com/api.do">TwitPic API</a> does not currently support outgoing requests and the image source from amazon aws contains an AWS AccessKeyId, expiration time stamp, and signature.  This would normally require a regular expression to rip the source JPG path out of the HTML.  Ripping the source out of the HTML is a bit of a pain and is not a long term solution.  It is possible to use the following shortened url to gain access to the full image path using the TwitPic image id.</p>
<p><strong>Solution:</strong><br />
Use this url to gain access to the full <a href="http://twitpic.com/show/full/s0z4.jpg">http://twitpic.com/show/full/s0z4.jpg</a> and thumbnail <a href="http://twitpic.com/show/thumb/s0z4.jpg">http://twitpic.com/show/thumb/s0z4.jpg</a> images (replace the s0z4 with your image id).  Notice that this shortened path returns the longer url that would normally have to be ripped out of the HTML to gain access to the image.</p>
<div class="igBar"><span id="lhtml-5"><a href="#" onclick="javascript:showPlainTxt('html-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-5">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;">&lt;mx:HTTPService</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"rssParse"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; url=<span style="color: #ff0000;">"php/twitpic.php"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; result=<span style="color: #ff0000;">"processResult(event)"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; resultFormat=<span style="color: #ff0000;">"e4x"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showPlainTxt('php-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-6">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$twitter_feed</span> = <span style="color:#FF0000;">'http://twitpic.com/photos/chrisjblack/feed.rss'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$rawfeed</span> = @<a href="http://www.php.net/file_get_contents"><span style="color:#000066;">file_get_contents</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$twitter_feed</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#0000FF;">$rawfeed</span>;&nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="igBar"><span id="lactionscript-7"><a href="#" onclick="javascript:showPlainTxt('actionscript-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-7">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">collections</span>.<span style="color: #006600;">ArrayCollection</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">ResultEvent</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _rssResults:ArrayCollection;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Define and use atom namespace.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> namespace atom = <span style="color: #ff0000;">"http://www.w3.org/2005/Atom"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">use namespace atom;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> processResult<span style="color: #66cc66;">&#40;</span>event:ResultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> xmlList:XMLList = event.<span style="color: #006600;">result</span>.<span style="color: #006600;">channel</span>.<span style="color: #006600;">item</span> as XMLList;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">for</span> each<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> item:<span style="color: #0066CC;">XML</span> <span style="color: #b1b100;">in</span> xmlList<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Formatt the date</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> myDate:<span style="color: #0066CC;">String</span> = item.<span style="color: #006600;">pubDate</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; myDate = myDate.<span style="color: #0066CC;">slice</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">0</span>,<span style="color: #cc66cc;color:#800000;">22</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Pull the image id out of the link url</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> imageId:<span style="color: #0066CC;">String</span> = item.<span style="color: #006600;">link</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; imageId = imageId.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"http://twitpic.com/"</span>, <span style="color: #ff0000;">""</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Push the results into our data array</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; _rssResults.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>title: item.<span style="color: #006600;">title</span>, <span style="color: #0066CC;">date</span>: myDate, id: imageId<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; _rssResults = <span style="color: #000000; font-weight: bold;">new</span> ArrayCollection<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; rssParse.<span style="color: #0066CC;">send</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="igBar"><span id="lhtml-8"><a href="#" onclick="javascript:showPlainTxt('html-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-8">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;">&lt;mx:VBox <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"900"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"500"</span> horizontalAlign=<span style="color: #ff0000;">"center"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;">&lt;mx:<span style="color: #000066;">Label</span> styleName=<span style="color: #ff0000;">"subTitleText"</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">"Twitter Feed:"</span> fontWeight=<span style="color: #ff0000;">"bold"</span> fontSize=<span style="color: #ff0000;">"16"</span>/<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;">&lt;mx:VBox <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"450"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"800"</span> verticalScrollPolicy=<span style="color: #ff0000;">"auto"</span> horizontalScrollPolicy=<span style="color: #ff0000;">"off"</span> horizontalAlign=<span style="color: #ff0000;">"center"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;mx:Repeater <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"twitter"</span> dataProvider=<span style="color: #ff0000;">"{_rssResults}"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;mx:<span style="color: #000066;">Text</span> textAlign=<span style="color: #ff0000;">"center"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"300"</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">"{twitter.currentItem.date}"</span>/<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;mx:<span style="color: #000066;">Text</span> textAlign=<span style="color: #ff0000;">"center"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"300"</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">"{twitter.currentItem.title}"</span>/<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;mx:Image source=<span style="color: #ff0000;">"http://twitpic.com/show/thumb/{twitter.currentItem.id}.jpg"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;mx:Image source=<span style="color: #ff0000;">"http://twitpic.com/show/full/{twitter.currentItem.id}.jpg"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>/mx:Repeater&gt;</span>&nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>/mx:VBox&gt;</span>&nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>/mx:VBox&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This allows for Adobe AIR applications to post to (<a href="http://www.blackcj.com/blog/2008/11/20/post-to-twitpic-from-adobe-air/">Post to TwitPic from Adobe AIR</a>) and retrieve images from TwitPic.  </p>
<p><a href="http://www.blackcj.com/TwitPic/TwitPic.html">View Sample</a> / <a href="http://www.blackcj.com/TwitPic/srcview/index.html">Source Files</a></p>
<p><strong>Links:</strong><br />
<a href="http://userscripts.org/scripts/review/26318">TwitPic Previewer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackcj.com/blog/2009/02/23/display-twitpic-images-in-air-or-anywhere/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>10 Steps to Improve Your Online Presence</title>
		<link>http://www.blackcj.com/blog/2009/01/09/10-steps-to-improve-your-online-presence/</link>
		<comments>http://www.blackcj.com/blog/2009/01/09/10-steps-to-improve-your-online-presence/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 21:16:01 +0000</pubDate>
		<dc:creator>Chris Black</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Ad-Words]]></category>
		<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Forums]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.blackcj.com/blog/?p=159</guid>
		<description><![CDATA[I've read a number of blog posts about 10 things not to do or 6 reasons why you should do something and I'm finally giving in to the idea of an ordered list as a blog post.  One of the pitfalls of the ordered list approach is that everyone is different.  The only way everyone [...]]]></description>
			<content:encoded><![CDATA[<p>I've read a number of blog posts about 10 things not to do or 6 reasons why you should do something and I'm finally giving in to the idea of an ordered list as a blog post.  One of the pitfalls of the ordered list approach is that everyone is different.  The only way everyone could possible benefit from all 10 steps is if they are so vague that they read like a horoscope.  We all know that 'design patterns have a time and place.'  They cause problems when not used correctly.  I swear it still hits everyone's top whatever list.  Does something that vague really help anyone?  I feel like I'm reading today's horoscope whenever I see that.</p>
<p>Enough ranting for one day.  Back to the topic at hand.  Ten things you can do to improve your online presence.  Before you read any further write down the type of business your in.  What do you do?  Who is your target market?  Will an online presence even help you?  These are things you need to figure out on your own or pay someone to figure out for you.  This list will not help you until you know the basics.  And there is not a pre-prescribed method for determining the basics.<br />
<strong><br />
1. Obviously, Get a Web Page</strong><br />
Or is it that obvious?  Why do most people fail at this simple step?  Think about this: You have a company with 15 employees who all sit at a desk.  Would you buy an office building that can hold 1,000?  Not unless you know something I don't.  Simply put, start simple.  Build a static page, make it look professional and grow your web page with the company over time (for example <a href="http://www.psdtemple.com/">PSDTemple</a>).  Facebook didn't start with apps, photos, and videos.  They started simple and restricted the user base.  Don't assume it's a one time cost.  The more you try to do at once the higher likelihood that it will fail.  <strong>Grow your web page with your business.</strong> As always there is a <a href="http://www.sierra-bravo.com/">friendly web development</a> company near you.<br />
<strong><br />
2. Get a Twitter Account</strong><br />
It's easy, it's free and will improve your SEO tremendously if used correctly.  Post company updates, links to press releases, or even just random tidbits.  Link your twitter page to your web page.  Take advantage of <a href="http://twitter.com/home">Twitters</a> strong online presence to help out your company.</p>
<p><strong>3. Get a Facebook Account, Right? Wrong!</strong><br />
Next logical step is to move to the next social networking site?  NO, at least in most cases.  Facebook is for people.  Unless your a Freelancer it really doesn't benefit to have a Facebook page (if you are a freelancer or working for yourself than get a Facebook account, now!).  Maybe a Facebook app though?  (for example <a href="http://www.whoppersacrifice.com/">Sacrifice Your Friends</a>).  Maybe your company needs a Facebook fan page?  Look at your target market list.  What would they want?  What would they use?</p>
<p><strong>4. Start a Blog</strong><br />
A regularly updated blog will improve traffic to your site, you can be pretty much sure of that.  Again, who is your target market?  What would they be interested in hearing?  Check out Sierra Bravo's blog for a great example of marketing towards your customers: <a href="http://blog.nerdery.com/">Nerdery Blog</a>.  Most blog services are FREE.  I personally recommend WordPress.  Using WordPress, your blog could even be your website.  Save some time and money but still get professional results.<br />
<strong><br />
5. Track Analytic Data for Your Site</strong><br />
How will you ever know if any of these steps are working?  <a href="http://www.google.com/analytics/">Google Analytics</a>, it's free and easy to use.  Find out what keywords your getting, and which ones your not.  Determine how many people are visiting your site from Twitter or viewing your blog.  Don't just stop at Google Analytics.  Most hosting companies provide AWStats or WebLog as well.  I find that AWStats is better for tracking unique hits / bots and Google Analytics is better for keywords / data presentation.</p>
<p><strong>6. Help People</strong><br />
If your company makes web pages, join a web forum and answer peoples questions.  Create an account on Yahoo answers and help people with problems.  Join <a href="http://www.linkedin.com/">Linkedin</a> and participate in the discussion groups.  Nothing says online presence like helping someone else in need.  Just make sure to put a link to your webpage, twitter account, or blog at the bottom.  It helps you and will let them find out more about your company and services.  If you helped them solve a simple problem for free who do you think they will call when they need a complex problem solved?</p>
<p><strong>7. Contribute to Open Source Projects</strong><br />
This one is more IT related and I must admit I have not participated in any open source projects to date.  I do, however, see the value in them and plan to contribute in the future.</p>
<p><strong>8. Buy Some Ad-Words</strong><br />
Notice that most of the items I've listed so far have been FREE.  It's amazing how few people realize that online presence has very little to do with money.  This one is not free but very useful.  Buy up some keywords in <a href="http://adwords.google.com/">Google Ads</a>.  You will probably never see the light of day on a search result for 'pet food' unless you pay for the advertisement.  <a href="http://www.facebook.com/advertising/">Facebook advertisements</a> are a great way to target specific people based on their profile information.</p>
<p><strong>9. Time</strong><br />
Only time will build your online presence.  All of these items will help expedite the process but as with everything in life, there is no guarantee.  You may be in the business of making money but I assure you that time will be on your side if you truly attempt to help the internet community.  If you are nice to the internet it will be nice back to you.<br />
<strong><br />
10. Don't Assume Design Patterns will Always Make Your Life Easier</strong><br />
You can't have a top 10 list without this one <img src='http://www.blackcj.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Please just read this <a href="http://en.wikipedia.org/wiki/Design_pattern_(computer_science)">wikipedia article</a>.</p>
<p>I would love to hear any other suggestions on improving online presence.  Here is your chance to help out others and start promoting your online presence today!  How cheesy did that just sound?  I feel like I'm selling a book.  This is what I get for creating an ordered list blog post...</p>
<p>A few companies highlighted in this post:</p>
<p><a href="http://www.twitter.com">Twitter</a><br />
<a href="http://www.sierra-bravo.com">Sierra Bravo</a><br />
<a href="http://www.facebook.com">Facebook</a><br />
<a href="http://www.psdtemple.com/">PSDTemple</a><br />
<a href="http://www.burgerking.com/bkglobal/">Burger King</a><br />
<a href="http://www.google.com">Google</a><br />
<a href="http://wordpress.com/">WordPress</a></p>
<p>Related Posts:<br />
<a href="http://searchengineoptimisation.yourspaced.com/2007/03/26/101-tips-to-improve-your-web-presence/">101 Tips to Improve Your Web Presence</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackcj.com/blog/2009/01/09/10-steps-to-improve-your-online-presence/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Validate Twitter Credentials in AIR</title>
		<link>http://www.blackcj.com/blog/2008/12/21/validate-twitter-credentials-in-air/</link>
		<comments>http://www.blackcj.com/blog/2008/12/21/validate-twitter-credentials-in-air/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 22:21:42 +0000</pubDate>
		<dc:creator>Chris Black</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Authenticate]]></category>
		<category><![CDATA[Credentials]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Username]]></category>

		<guid isPermaLink="false">http://www.blackcj.com/blog/?p=131</guid>
		<description><![CDATA[Problem: Your AIR application needs to validate the username / password and handle failure gracefully within the application. If the user enters the wrong information you do not want them to be prompted with a windows prompt asking them to enter their Twitter username / password. If the application needs to hold on to the [...]]]></description>
			<content:encoded><![CDATA[<p>Problem:<br />
Your AIR application needs to validate the username / password and handle failure gracefully within the application.  If the user enters the wrong information you do not want them to be prompted with a windows prompt asking them to enter their Twitter username / password.  If the application needs to hold on to the credentials for any reason the windows authentication to the API will break the AIR application.</p>
<p>"The server twitter.com at Twitter API requires a username and password."</p>
<div id="attachment_132" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.blackcj.com/blog/wp-content/uploads/2008/12/verifytwittercreds.jpg"><img src="http://www.blackcj.com/blog/wp-content/uploads/2008/12/verifytwittercreds-300x269.jpg" alt="Windows Authentication Pop-up Message." title="verifytwittercreds" width="300" height="269" class="size-medium wp-image-132" /></a><p class="wp-caption-text">Windows Authentication Pop up message.</p></div>
<p>Solution:<br />
The URLRequest object has a property called 'authenticate' that must be set to false. </p>
<div class="igBar"><span id="lactionscript-10"><a href="#" onclick="javascript:showPlainTxt('actionscript-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-10">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * Setting result.authenticate to false prevents the operating system from</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * taking over and prompting the user to authenticate.&nbsp; It allows the AIR</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * application to take the correct action.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> *</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> */</span>&nbsp;&nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> twitterRequest <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">url</span> : <span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:URLRequest</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> result:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">authorizationHeader</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; result.<span style="color: #006600;">authenticate</span> = <span style="color: #000000; font-weight: bold;">false</span>;&nbsp; <span style="color: #808080; font-style: italic;">// &lt;--------- Most Important Line of Code!!!!</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; result.<span style="color: #006600;">requestHeaders</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">authorizationHeader</span><span style="color: #66cc66;">&#93;</span>;&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">return</span> result;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Most of the code from the example attached below is from the Google code repository:<br />
<a href="http://code.google.com/p/twitterscript/"></p>
<p>http://code.google.com/p/twitterscript/</a></p>
<p>Here are the source files to an example AIR application that uses actionscript to verify Twitter credentials without prompting a windows box on failure:</p>
<p><a href="http://www.blackcj.com/VerifyTwitterCreds/VerifyTwitterCreds.zip">Source Files</a></p>
<p>I would like to give credit to Clayton (<a href="http://twitter.com/file_cabinet">file_cabinet</a>) for coming up with the solution to this problem.  Thanks Clayton!<br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackcj.com/blog/2008/12/21/validate-twitter-credentials-in-air/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Post to TwitPic from Adobe AIR</title>
		<link>http://www.blackcj.com/blog/2008/11/20/post-to-twitpic-from-adobe-air/</link>
		<comments>http://www.blackcj.com/blog/2008/11/20/post-to-twitpic-from-adobe-air/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 00:19:44 +0000</pubDate>
		<dc:creator>Chris Black</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[TwitPic]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[URLRequest]]></category>

		<guid isPermaLink="false">http://www.blackcj.com/blog/?p=103</guid>
		<description><![CDATA[TwitPic is a service that lets you share photos on Twitter by generating a tiny url to the image being uploaded. The flash.filesystem.File class allows Adobe AIR to post an image to TwitPic. By specifying the username, password and posting method it is possible to submit a query to the TwitPic API. PLAIN TEXT Actionscript: [...]]]></description>
			<content:encoded><![CDATA[<p>TwitPic is a service that lets you share photos on <a href="http://www.twitter.com">Twitter</a> by generating a tiny url to the image being uploaded.  The flash.filesystem.File class allows Adobe AIR to post an image to <a href="http://www.twitpic.com/">TwitPic</a>.  By specifying the username, password and posting method it is possible to submit a query to the <a href="http://www.twitpic.com/api.do">TwitPic API</a>.<br />
<br/></p>
<div class="igBar"><span id="lactionscript-12"><a href="#" onclick="javascript:showPlainTxt('actionscript-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-12">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package com.<span style="color: #006600;">cb</span>.<span style="color: #006600;">twitpic</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">DataEvent</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filesystem</span>.<span style="color: #006600;">File</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">FileFilter</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequestMethod</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLVariables</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TwitPic</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _file:File;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> TwitPic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _file = <span style="color: #000000; font-weight: bold;">new</span> File<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _file.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>DataEvent.<span style="color: #006600;">UPLOAD_COMPLETE_DATA</span>,uploadCompleteDataHandler<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; browse<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> browse<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _file.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">SELECT</span>, fileSelected<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _file.<span style="color: #006600;">browse</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> FileFilter<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">"Images (*.jpg, *.jpeg, *.gif, *.png)"</span>, <span style="color: #ff0000;">"*.jpg;*.jpeg;*.gif;*.png"</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> fileSelected<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> urlRequest:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"http://twitpic.com/api/upload"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// The API requires the request be sent via POST</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; urlRequest.<span style="color: #006600;">method</span> = URLRequestMethod.<span style="color: #006600;">POST</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Enter a valid Twitter username / password combination</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> urlVars:URLVariables = <span style="color: #000000; font-weight: bold;">new</span> URLVariables<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; urlVars.<span style="color: #006600;">username</span> = TWITTER_USERNAME;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; urlVars.<span style="color: #0066CC;">password</span> = TWITTER_PASSWORD;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; urlRequest.<span style="color: #0066CC;">data</span> = urlVars;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// The API requires the file be labeled as 'media'</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _file.<span style="color: #006600;">upload</span><span style="color: #66cc66;">&#40;</span>urlRequest, <span style="color: #ff0000;">'media'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> uploadCompleteDataHandler<span style="color: #66cc66;">&#40;</span>event:DataEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> resultXML:<span style="color: #0066CC;">XML</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #0066CC;">text</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Trace the path to the resulting image tiny url (mediaurl)</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultXML.<span style="color: #006600;">child</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"mediaurl"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This can be used within an AIR application by importing TwitPic and initializing the class. </p>
<p><strong>Sample Code</strong><br />
<a href="http://www.blackcj.com/PostTwitPicFromAIR.zip">http://www.blackcj.com/PostTwitPicFromAIR.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackcj.com/blog/2008/11/20/post-to-twitpic-from-adobe-air/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>FlexFeed: Twitter RSS Feeds in Flex</title>
		<link>http://www.blackcj.com/blog/2008/10/04/flexfeed-integrate-twitter-rss-feeds-into-flex/</link>
		<comments>http://www.blackcj.com/blog/2008/10/04/flexfeed-integrate-twitter-rss-feeds-into-flex/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 20:29:12 +0000</pubDate>
		<dc:creator>Chris Black</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Cross Domain XML]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex Builder 3]]></category>
		<category><![CDATA[HTTPService]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.blackcj.com/blog/?p=3</guid>
		<description><![CDATA[Using Flex and PHP it is possible to integrate Twitter RSS feeds into a Flex web page. Twitters cross domain policy (which is used by Flash) does not allow external resources to access feeds. Using PHP as a medium to the data, Flex can access the feed and display all contents. This technique can be [...]]]></description>
			<content:encoded><![CDATA[<p>Using Flex and PHP it is possible to integrate Twitter RSS feeds into a Flex web page.  Twitters cross domain policy (which is used by Flash) does not allow external resources to access feeds.  Using PHP as a medium to the data, Flex can access the feed and display all contents.  This technique can be used to access any xml data that Flex may not have access to.</p>
<p>Let's start by creating an HTTPService:</p>
<div class="igBar"><span id="lhtml-18"><a href="#" onclick="javascript:showPlainTxt('html-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-18">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;">&lt;mx:HTTPService </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"rssParse"</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; url=<span style="color: #ff0000;">"http://twitter.com/statuses/user_timeline/16584421.rss"</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; result=<span style="color: #ff0000;">"processResult(event)"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; resultFormat=<span style="color: #ff0000;">"e4x"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Next we will create the function to process the results:</p>
<div class="igBar"><span id="lactionscript-19"><a href="#" onclick="javascript:showPlainTxt('actionscript-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-19">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">collections</span>.<span style="color: #006600;">ArrayCollection</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">ResultEvent</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _rssResults:ArrayCollection;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Define and use atom namespace.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> namespace atom = <span style="color: #ff0000;">"http://www.w3.org/2005/Atom"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">use namespace atom;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> processResult<span style="color: #66cc66;">&#40;</span>event:ResultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> xmlList:XMLList = event.<span style="color: #006600;">result</span>.<span style="color: #006600;">channel</span>.<span style="color: #006600;">item</span> as XMLList;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">for</span> each<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> item:<span style="color: #0066CC;">XML</span> <span style="color: #b1b100;">in</span> xmlList<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> myDate:<span style="color: #0066CC;">String</span> = item.<span style="color: #006600;">pubDate</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">myDate = myDate.<span style="color: #0066CC;">slice</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">0</span>,<span style="color: #cc66cc;color:#800000;">22</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_rssResults.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>title: item.<span style="color: #006600;">title</span>, <span style="color: #0066CC;">date</span>: myDate<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_rssResults = <span style="color: #000000; font-weight: bold;">new</span> ArrayCollection<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rssParse.<span style="color: #0066CC;">send</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now lets add the mxml to display the content:</p>
<div class="igBar"><span id="lhtml-20"><a href="#" onclick="javascript:showPlainTxt('html-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-20">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;">&lt;mx:VBox <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"400"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"600"</span> horizontalAlign=<span style="color: #ff0000;">"center"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;">&lt;mx:<span style="color: #000066;">Label</span> styleName=<span style="color: #ff0000;">"subTitleText"</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">"Twitter Feed:"</span> fontWeight=<span style="color: #ff0000;">"bold"</span> fontSize=<span style="color: #ff0000;">"16"</span>/<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;">&lt;mx:VBox <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"500"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"400"</span> verticalScrollPolicy=<span style="color: #ff0000;">"auto"</span> horizontalScrollPolicy=<span style="color: #ff0000;">"off"</span> horizontalAlign=<span style="color: #ff0000;">"center"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;mx:Repeater <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"twitter"</span> dataProvider=<span style="color: #ff0000;">"{_rssResults}"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;mx:<span style="color: #000066;">Text</span> textAlign=<span style="color: #ff0000;">"center"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"300"</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">"{twitter.currentItem.date}"</span>/<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;mx:<span style="color: #000066;">Text</span> textAlign=<span style="color: #ff0000;">"center"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"300"</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">"{twitter.currentItem.title}"</span>/<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>/mx:Repeater&gt;</span>&nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>/mx:VBox&gt;</span>&nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>/mx:VBox&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>After testing the application locally everything works great!  But wait... what about the PHP code?  Well first export a release build of the application and upload it to a web server for testing.</p>
<p>Here is the error that you should recieve:<br />
<strong>[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]</strong></p>
<p>To get around this let's create a php file that collects the twitter data:</p>
<div class="igBar"><span id="lphp-21"><a href="#" onclick="javascript:showPlainTxt('php-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-21">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$twitter_feed</span> = <span style="color:#FF0000;">'http://twitter.com/statuses/user_timeline/16584421.rss'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$rawfeed</span> = @<a href="http://www.php.net/file_get_contents"><span style="color:#000066;">file_get_contents</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$twitter_feed</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#0000FF;">$rawfeed</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now we need to update our HTTPService request to pull from the new php file:</p>
<div class="igBar"><span id="lhtml-22"><a href="#" onclick="javascript:showPlainTxt('html-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-22">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;">&lt;mx:HTTPService </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"rssParse"</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; url=<span style="color: #ff0000;">"php/twitter.php"</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; result=<span style="color: #ff0000;">"processResult(event)"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; resultFormat=<span style="color: #ff0000;">"e4x"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now everything works great!</p>
<p>Check out this link to view a functional example:<br />
<a href="http://www.blackcj.com/FlexFeed/index.html">http://www.blackcj.com/FlexFeed/index.html</a></p>
<p>And the source files:<br />
<a href="http://www.blackcj.com/FlexFeed/srcview/index.html">http://www.blackcj.com/FlexFeed/srcview/index.html</a></p>
<p>Please leave a comment if you have any questions, comments, or suggestions.  Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackcj.com/blog/2008/10/04/flexfeed-integrate-twitter-rss-feeds-into-flex/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.445 seconds -->

