<?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>blog.swfjunkie.com &#187; Tutorials</title>
	<atom:link href="http://blog.swfjunkie.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.swfjunkie.com</link>
	<description>random gibberish for random people</description>
	<lastBuildDate>Fri, 04 Feb 2011 22:15:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Getting started: Blackberry PlayBook Development Setup</title>
		<link>http://blog.swfjunkie.com/2010/10/getting-started-blackberry-playbook-development-setup/</link>
		<comments>http://blog.swfjunkie.com/2010/10/getting-started-blackberry-playbook-development-setup/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 23:33:57 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[PlayBook]]></category>
		<category><![CDATA[RIM]]></category>
		<category><![CDATA[Tablets]]></category>

		<guid isPermaLink="false">http://blog.swfjunkie.com/?p=566</guid>
		<description><![CDATA[Oh boy oh boy, aren&#8217;t these exciting times to be a developer? :) So, yesterday &#8211; on time for Adobe MAX 2010 &#8211; RIM released the BlackBerry Tablet OS SDK Beta for Adobe® AIR. Alongside the SDK they also released the BlackBerry® PlayBook™ Simulator Beta. Both come in a Windows or Mac flavor. Why is [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="#"><img src="http://blog.swfjunkie.com/wp-content/uploads/2010/10/blackberry_playbook.jpg" alt="A promotional picture of the RIM Blackberry PlayBook" title="The RIM Blackberry PlayBook, isn&#039;t it lovely? :)" width="609" height="240" class="aligncenter size-full wp-image-568" /></a></p>
<p>Oh boy oh boy, aren&#8217;t these exciting times to be a developer? :)</p>
<p>So, yesterday &#8211; on time for Adobe MAX 2010 &#8211; RIM <a href="http://na.blackberry.com/eng/developers/tablet/" target="_blank">released</a> the BlackBerry Tablet OS SDK Beta for Adobe® AIR. Alongside the SDK they also released the BlackBerry® PlayBook™ Simulator Beta. Both come in a Windows or Mac flavor.</p>
<p>Why is this so exciting for us Flash Platform Developers? Well, you apparently missed the announcement at yesterdays Adobe MAX Day 1 Keynote. Check out the video:</p>
<p><object width="609" height="367"><param name="movie" value="http://www.youtube.com/v/tqOs58aZ3LE?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/tqOs58aZ3LE?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="609" height="367"></embed></object></p>
<p>See what they did there? Yup, Flash/AIR is a core functionality of the entire system. Now excuse me if i go all capslock on you all but HOW FREAKING COOL IS THAT!? :)</p>
<p><br/></p>
<h2>Now get the tools</h2>
<p>So now that i hopefully have wet your appetite, how about we check all the new toys out right away. Thanks to RIM and their simulator we can actually do that quite easily. Head over to their <a href="http://na.blackberry.com/eng/developers/tablet/" target="_blank">developer website for the tablet os</a> and download the simulator and the SDK for the OS you require.</p>
<p>Since i&#8217;m a windows user, my instructions will be very windows centric, infact, they will be Windows 7 64-bit centric, since i encountered quite a lot of problems on the way to PlayBook-bliss.</p>
<p><br/><br />
<h2>Setup / Installation</h2>
<h3>Installing the Simulator</h3>
<p>If you are running a 32-bit Windows System go ahead and run the installers, they should work flawlessly and i would guess the same is the case for the Mac installs. If you run Windows on a 64-bit sytem though, you will be greeted by a not-so-friendly screen right at the start of your journey:</p>
<p><img src="http://blog.swfjunkie.com/wp-content/uploads/2010/10/no64bit_support_win.jpg" alt="" title="No 64-bit support for the Blackberry PlayBook installers" width="609" height="240" class="aligncenter size-full wp-image-586" /> </p>
<p>The Problem (i&#8217;m not quite sure actually) is either that the installer is not 64-bit compatible or since i noticed it uses Java it might just not support the 64-bit Java version. Either way, i haz a way around this little problem.</p>
<p>As any good windows user should, i would hope that you have <a href="http://www.7-zip.org/" target="_blank">7-zip</a> installed, simply because it is the best archiving / compression tool on windows AND it&#8217;s open source. So as it turns out, with 7-zip you can extract the content from the installer. </p>
<p>Now &#8211; what we want to extract from the installer is a <a href="http://en.wikipedia.org/wiki/ISO_image" target="_blank">ISO Image</a> which we will need to setup the Simulator. The file in question is &#8220;<b>InstallerData\Disk1\InstData\Resource1.zip</b>&#8221; . It&#8217;s another zip which you have to extract, that contains two folders that in turn contains the image, which is called &#8220;<b>BlackBerryPlayBookSimulator.iso</b>&#8221; .</p>
<p>Great! Now that you have the image, we can finally setup the simulator, which actually is a virtual machine. For that, you can follow the <a href="http://docs.blackberry.com/en/developers/deliverables/21877/Configure_the_BlackBerry_PlayBook_simulator_1347134_11.jsp" target="_blank">installation instructions</A> posted at the developer site by RIM themselfs &#8211; make sure to come back ok ? :P</p>
<h3>Installing the SDK</h3>
<p>So by now you should have a running instance of the PlayBook OS which is most likely looking something like this:</p>
<p><img src="http://blog.swfjunkie.com/wp-content/uploads/2010/10/playbook_emu.jpg" alt="" title="PlayBook Virtual Machine Screenshot" width="609" height="240" class="aligncenter size-full wp-image-597" /><br />
<sup>Pretty eh?</sup></p>
<p>Now, the 64-bit problem also applies to the SDK Installer of course. Now this one was a little bit trickier since the installer actually generates the SDK for you. But with a little trickery that problem won&#8217;t stop us here either. </p>
<p>I have generated the SDK with AIR 2.5 integrated and uploaded it for your convenience to <a href="http://www.mediafire.com/?st0g4m7l876xgv3" target="_blank">mediafire</a> so you can <a href="http://www.mediafire.com/?st0g4m7l876xgv3" target="_blank">download it from there</a>. &#8211; at the time of this writing, the version of the blackberry tablet sdk is <b>0.9.0</b></p>
<p>This SDK is (mostly) like any other Flex SDK. So if you use Flash Builder, you can go to the <b>Preferences > Flash Builder > Installed Flex SDKs</b> and <b>add</b> the SDK to the existing ones.</p>
<p><img src="http://blog.swfjunkie.com/wp-content/uploads/2010/10/fb_blackberry_sdk.jpg" alt="" title="Add the Blackberry SDK to your existing SDKs" width="609" height="240" class="aligncenter size-full wp-image-605" /></p>
<p>That&#8217;s it! You have set up your environment for developing for the Blackberry PlayBook. In the next article, we will look into some more specifics of this SDK. </p>
<p>I leave you at this point with the link to the <a href="http://docs.blackberry.com/en/developers/subcategories/?userType=21&#038;category=Adobe+AIR+Development+Guides+and+API+Reference" target="_blank">Blackberry Adobe AIR Development Guides and API Reference</a> where you will find more information on setting up and creating your first project.</p>
<p>Hope this was of any help and make sure to come back for the next article on the Blackberry PlayBook. I&#8217;m sure we will see a lot more of it in the near future :)</p>
<div class="shr-publisher-566"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><br/><div class='shareaholic-like-buttonset' style='float:none;height:30px; padding-left: 30px;'><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F10%2Fgetting-started-blackberry-playbook-development-setup%2F'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F10%2Fgetting-started-blackberry-playbook-development-setup%2F' data-shr_title='Getting+started%3A+Blackberry+PlayBook+Development+Setup'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F10%2Fgetting-started-blackberry-playbook-development-setup%2F' data-shr_title='Getting+started%3A+Blackberry+PlayBook+Development+Setup'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F10%2Fgetting-started-blackberry-playbook-development-setup%2F' data-shr_title='Getting+started%3A+Blackberry+PlayBook+Development+Setup'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.swfjunkie.com/2010/10/getting-started-blackberry-playbook-development-setup/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tweetr Tutorials: Pinless OAuth in AIR</title>
		<link>http://blog.swfjunkie.com/2010/08/tweetr-tutorials-pinless-oauth-in-air/</link>
		<comments>http://blog.swfjunkie.com/2010/08/tweetr-tutorials-pinless-oauth-in-air/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 22:41:31 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[Tweetr]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.swfjunkie.com/?p=451</guid>
		<description><![CDATA[With Twitters Basic Authentications deprecation starting today and the latest release of the Tweetr Library, it is time to give you a heads up on how to integrate OAuth without having to use the PIN Method. First of all, make sure to download the AIR Example used in this Tutorial. The zip contains a Flash [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>With <a href="http://groups.google.com/group/twitter-api-announce/browse_thread/thread/c03fa2b1ae90d2a9/a56592abbce575d9?show_docid=a56592abbce575d9" target="_blank">Twitters Basic Authentications deprecation starting today</a> and the <a href="http://blog.swfjunkie.com/2010/08/tweetr-v1-0b3-out/" target="_blank">latest release of the Tweetr Library</a>, it is time to give you a heads up on how to integrate OAuth without having to use the <a href="http://blog.swfjunkie.com/2009/12/tweetr-tutorials-part-2-using-oauth-in-tweetr/" target="_blank">PIN Method</a>.</p>
<p>First of all, make sure to download the <a href="http://blog.swfjunkie.com/wp-content/uploads/2010/08/tweetr_air_example.zip">AIR Example</a> used in this Tutorial. The zip contains a Flash Builder 4 Project Folder as well as a Flex Project FXP File so you can import the code easily if wanted. If you don&#8217;t have Flash Builder 4 you can always just look at the code in the src folder within the zip. As you will notice, the example uses the awesome <a href="http://code.google.com/p/doomsdayconsole/" target="_blank">doomsdayconsole</a>. The code for it is not included in the example but can be retrieved from its <a href="http://code.google.com/p/doomsdayconsole/" target="_blank">googlecode site</a>. You will also need the <a href="http://code.google.com/p/as3crypto/" target="_blank">AS3Crypto Library</a> which also is not included in the example.</p>
<p>Without any further ado, here are the steps neccessary to get pinless OAuth working.</p>
<p>Let&#8217;s take a look at the important parts of <strong>tweetrAIR.as</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">oauth = <span style="color: #0033ff; font-weight: bold;">new</span> OAuth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span>consumerKey = <span style="color: #990000;">&quot;YOUR_CONSUMER_KEY&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span>consumerSecret = <span style="color: #990000;">&quot;YOUR_CONSUMER_SECRET&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span>callbackURL = <span style="color: #990000;">&quot;http://your.callback.url&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span>pinlessAuth = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span> 
&nbsp;
oauth<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>OAuthEvent<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> handleOAuthEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>OAuthEvent<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ERROR</span><span style="color: #000066; font-weight: bold;">,</span> handleOAuthEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Rectangle</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Rectangle</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">50</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">50</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">780</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">500</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
htmlLoader = HTMLLoader<span style="color: #000066; font-weight: bold;">.</span>createRootWindow<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">rect</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span>htmlLoader = htmlLoader<span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span>getAuthorizationRequest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>As you see there&#8217;s not much to do configuration wise. First of all, we create a new <code>OAuth</code> instance and then assign our consumer key and consumer secret which we get from twitter (<em>line 1-3</em>).</p>
<p>The important parts here are the <code>callbackURL</code> and <code>pinlessAuth</code> at <em>line 4 &amp; 5</em>. You need to set the <code>pinlessAuth</code> Boolean to <code>true</code> in order to enable (obviously) pinless authentication and you need to define a callback url for which your AIR app will be listening for. The callback url can be anything on the internet that does not redirect any further, for example &#8220;http://google.ch&#8221; or &#8220;http://yourdomain.com/static.html&#8221;. Twitter will append some GET parameters to this url for which your OAuth instance will be listening for.</p>
<p>Pinless Authentication for AIR Desktop Applications requires you to pass a <code>HTMLLoader</code> instance to your OAuth instance (<em>see line 11 &amp; 12</em>). Once you have done that, you can call <code>getAuthorizationRequest</code> to start the entire process.</p>
<p>The <code>OAuthEvent</code> Handler Method will assign the oauth instance to twitter once an <code>OAuthEvent.COMPLETE</code> event is received, meaning that authentication was successful:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> handleOAuthEvent<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>OAuthEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">type</span> == OAuthEvent<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #009900; font-style: italic;">// removes the authentication window</span>
        htmlLoader<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span>nativeWindow<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
        tweetr<span style="color: #000066; font-weight: bold;">.</span>oAuth = oauth<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
        <span style="color: #009900; font-style: italic;">// prints username, user id and the final tokens</span>
        <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>oauth<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #000000;">&#125;</span>
    <span style="color: #0033ff; font-weight: bold;">else</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;ERROR: &quot;</span><span style="color: #000066; font-weight: bold;">+</span>event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>And that&#8217;s it. From here on out you can call any tweetr method you want. Here&#8217;s a short video of the example code running:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="609" height="457" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=14186726&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=DBF232&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="609" height="457" src="http://vimeo.com/moogaloop.swf?clip_id=14186726&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=DBF232&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><sub><a href="http://labs.swfjunkie.com/vimeoplayer.php?id=14186726" target="_blank"><strong>WATCH IN 800 x 600</strong></a></sub></p>
<div class="shr-publisher-451"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><br/><div class='shareaholic-like-buttonset' style='float:none;height:30px; padding-left: 30px;'><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F08%2Ftweetr-tutorials-pinless-oauth-in-air%2F'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F08%2Ftweetr-tutorials-pinless-oauth-in-air%2F' data-shr_title='Tweetr+Tutorials%3A+Pinless+OAuth+in+AIR'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F08%2Ftweetr-tutorials-pinless-oauth-in-air%2F' data-shr_title='Tweetr+Tutorials%3A+Pinless+OAuth+in+AIR'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F08%2Ftweetr-tutorials-pinless-oauth-in-air%2F' data-shr_title='Tweetr+Tutorials%3A+Pinless+OAuth+in+AIR'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.swfjunkie.com/2010/08/tweetr-tutorials-pinless-oauth-in-air/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Tweetr Tutorials: Pinless OAuth in AS3</title>
		<link>http://blog.swfjunkie.com/2010/08/tweetr-tutorials-pinless-oauth-in-as3/</link>
		<comments>http://blog.swfjunkie.com/2010/08/tweetr-tutorials-pinless-oauth-in-as3/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 22:41:17 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[Tweetr]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.swfjunkie.com/?p=475</guid>
		<description><![CDATA[With Twitters Basic Authentication deprecation starting today and the latest release of the Tweetr Library, it is time to give you a heads up on how to integrate OAuth without having to use the PIN Method. First of all, make sure to download the AS3 Example used in this Tutorial. The zip contains a Flash [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>With <a href="http://groups.google.com/group/twitter-api-announce/browse_thread/thread/c03fa2b1ae90d2a9/a56592abbce575d9?show_docid=a56592abbce575d9" target="_blank">Twitters Basic Authentication deprecation starting today</a> and the <a href="http://blog.swfjunkie.com/2010/08/tweetr-v1-0b3-out/" target="_blank">latest release of the Tweetr Library</a>, it is time to give you a heads up on how to integrate OAuth without having to use the <a href="http://blog.swfjunkie.com/2009/12/tweetr-tutorials-part-2-using-oauth-in-tweetr/" target="_blank">PIN Method</a>.</p>
<p>First of all, make sure to download the <a href="http://blog.swfjunkie.com/wp-content/uploads/2010/08/tweetr_as3_example.zip">AS3 Example</a> used in this Tutorial. The zip contains a Flash Builder 4 Project Folder. If you don&#8217;t have Flash Builder 4 you can always just look at the code in the src folder within the zip. As you will notice, the example uses the awesome <a href="http://code.google.com/p/doomsdayconsole/" target="_blank">doomsdayconsole</a>. The code for it is not included in the example but can be retrieved from its <a href="http://code.google.com/p/doomsdayconsole/" target="_blank">googlecode site</a>. You will also need the <a href="http://code.google.com/p/as3crypto/" target="_blank">AS3Crypto Library</a> which also is not included in the example.</p>
<h3>The Actionscript</h3>
<p>The Pinless OAuth process in the library uses the ExternalInterface to communicate with the Webpage<br />
that embeds your flash application. Let&#8217;s take a look at the important bits of <strong>tweetrAS3.as</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">oauth = <span style="color: #0033ff; font-weight: bold;">new</span> OAuth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span>consumerKey = <span style="color: #990000;">&quot;YOUR_CONSUMER_KEY&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span>consumerSecret = <span style="color: #990000;">&quot;YOUR_CONSUMER_SECRET&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span>callbackURL = <span style="color: #990000;">&quot;http://tweetr.swfjunkie.com/dev/verified.html&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span>pinlessAuth = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
oauth<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>OAuthEvent<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> handleOAuthEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
oauth<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>OAuthEvent<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ERROR</span><span style="color: #000066; font-weight: bold;">,</span> handleOAuthEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
oauth<span style="color: #000066; font-weight: bold;">.</span>getAuthorizationRequest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>As you see there&#8217;s not much to do configuration wise. First of all, we create a new <code>OAuth</code> instance and then assign our consumer key and consumer secret which we get from twitter (<em>line 1-3</em>).</p>
<p>The important parts here are the <code>callbackURL</code> and <code>pinlessAuth</code> at <em>line 4 &amp; 5</em>. You need to set the <code>pinlessAuth</code> Boolean to <code>true</code> in order to enable (obviously) pinless authentication and you need to define a callback url which will be opened once authentication has succeeded on twitters side. Last but not least we define some eventlisteners and call <code>getAuthorizationRequest</code> to start the entire process.</p>
<h3>The HTML/Javascript</h3>
<p>As i said earlier, the library uses the ExternalInterface to communicate with the browser back &#038; forth, thereby we need to add a JS File to our HTML that embeds the Flash and some little snippet of JS Code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
    ... 
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/tweetrOAuth.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
    ... 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;flashContentDiv&quot;</span>&gt;</span>Your Flash might be in here..<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
        OAuth.setFlashElement(&quot;myFlashID&quot;);
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>As you see you have to include the <strong><code>tweetrOAuth.js</code></strong> file and (optimally at the end of your html) tell the OAuth Javasrcipt the ID of your flash element so that javascript can communicate with it by calling <code>OAuth.setFlashElement</code>.</p>
<p>When your Flash application calls <code>getAuthorizationRequest</code> from your oauth instance, it&#8217;s going to make an ExternalInterface call to the embedded javascript file which will open a popup window for you to be able to authorize the application. Once this is done, it will redirect to the callback url you have defined in your actionscript code. This Webpage should look something like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
    ...
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/tweetrOAuth.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
    ...
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
    ...
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
        OAuth.verify();
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
    ...
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>As you see, once again we integrate our <strong><code>tweetrOAuth.js</code></strong> file. This time we call <code>OAuth.verify</code> since we should have received the required tokens from twitter back to our callback url. These tokens will be extracted and send back to our Flash application via ExternalInterface and the popup-window should be closed automatically.</p>
<p>And that&#8217;s it. When the javascript passes the token, your oauth instance will do the rest and eventually trigger an <code>OAuthEvent.COMPLETE</code> event in which you can pass your fully authorized OAuth instance to your tweetr instance, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> handleOAuthEvent<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>OAuthEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">type</span> == OAuthEvent<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        tweetr<span style="color: #000066; font-weight: bold;">.</span>oAuth = oauth<span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #009900; font-style: italic;">// prints username, user id and the final tokens</span>
        <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>oauth<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #000000;">&#125;</span>
    <span style="color: #0033ff; font-weight: bold;">else</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;ERROR: &quot;</span><span style="color: #000066; font-weight: bold;">+</span>event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Here&#8217;s a short video of the example code running:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="609" height="457" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=14191846&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=DBF232&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="609" height="457" src="http://vimeo.com/moogaloop.swf?clip_id=14191846&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=DBF232&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><sub><a href="http://labs.swfjunkie.com/vimeoplayer.php?id=14191846" target="_blank"><strong>WATCH IN 800 x 600</strong></a></sub></p>
<div class="shr-publisher-475"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><br/><div class='shareaholic-like-buttonset' style='float:none;height:30px; padding-left: 30px;'><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F08%2Ftweetr-tutorials-pinless-oauth-in-as3%2F'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F08%2Ftweetr-tutorials-pinless-oauth-in-as3%2F' data-shr_title='Tweetr+Tutorials%3A+Pinless+OAuth+in+AS3'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F08%2Ftweetr-tutorials-pinless-oauth-in-as3%2F' data-shr_title='Tweetr+Tutorials%3A+Pinless+OAuth+in+AS3'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F08%2Ftweetr-tutorials-pinless-oauth-in-as3%2F' data-shr_title='Tweetr+Tutorials%3A+Pinless+OAuth+in+AS3'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.swfjunkie.com/2010/08/tweetr-tutorials-pinless-oauth-in-as3/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Flash &amp; The Quest for Accessibility &#8211; Part #2</title>
		<link>http://blog.swfjunkie.com/2010/06/flash-accessibility-quest-part2/</link>
		<comments>http://blog.swfjunkie.com/2010/06/flash-accessibility-quest-part2/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 09:38:28 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Workflows]]></category>

		<guid isPermaLink="false">http://blog.swfjunkie.com/?p=395</guid>
		<description><![CDATA[Overview Part #2 In this two-part blog post i will cover the technical, as well as overall aspects of implementing accessibility into the EventManager Project. And not just any form of accessibility &#8211; the Game has earned the AA+ Certification from Access For All (their highest certification grade conform to WCAG 2.0). Go here for [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="http://blog.swfjunkie.com/wp-content/uploads/2010/06/flash_acc_header.jpg" title="EventManager" width="609" height="240" class="aligncenter size-full wp-image-397" border="2" /></p>
<h2>Overview Part #2</h2>
<p>In this two-part blog post i will cover the technical, as well as overall aspects of implementing accessibility into the <a href="http://postfinance-eventmanager.ch" target="_blank">EventManager</a> Project. And not just any form of accessibility &#8211; the Game has earned the <a title="Link to Certification Levels by Access4All" href="http://www.access-for-all.ch/ch/zertifizierung/zertifikatsstufen.html" target="_blank">AA+ Certification</a> from <a title="Link to the Website of Access4All" href="http://www.access-for-all.ch/ch/zertifizierung/zertifikatsstufen.html" target="_blank">Access For All</a> (their highest certification grade conform to <a title="Wikipedia entry for WCAG 2.0" href="http://en.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines#WCAG_2.0" target="_blank">WCAG 2.0</a>).<br/><br />
<a href="http://blog.swfjunkie.com/2010/06/flash-accessibility-quest-part1/">Go here for the first blog post on accessibility</a>. This second part will cover all the technically nitty-gritty, blood and tears that went into implementing accessibility for this project. :)<br />
<span id="more-395"></span></p>
<hr />
<br/></p>
<h2>Some Resources First</h2>
<p>Throughout my research and while developing the accessiblity implementation for EventManager i&#8217;ve collected useful resources on the web which i&#8217;m glad i can share with you <a href="http://delicious.com/SinisterDex/accessibility+flash+flex" target="_blank">via my delicious</a>. There are notes for all the links available that will tell you what type of information you will find behind the click.</p>
<p><br/></p>
<h2>Accessibility Introduction</h2>
<p>If you haven&#8217;t worked with accessiblity in Flash or Flex yet, here&#8217;s a short introduction on how it all works.</p>
<p>Flash has it&#8217;s own package responsible for all the accessibility features. This package is situated under <a title="Link to the AS3 Documentation Package" href="http://livedocs.adobe.com/flex/3/langref/flash/accessibility/package-detail.html" target="_blank">flash.accessibility.*</a></p>
<p>Within this package (as of this writing) you will find three classes:</p>
<ul>
<li><a title="Link to the AS3 Documentation" href="http://livedocs.adobe.com/flex/3/langref/flash/accessibility/Accessibility.html" target="_blank">Accessibility</a></li>
<li><a title="Link to the AS3 Documentation" href="http://livedocs.adobe.com/flex/3/langref/flash/accessibility/AccessibilityProperties.html" target="_blank">AccessibilityProperties</a></li>
<li><a title="Link to the AS3 Documentation" href="http://livedocs.adobe.com/flex/3/langref/flash/accessibility/AccessibilityImplementation.html" target="_blank">AccessibilityImplementation</a></li>
</ul>
<p>The <strong>Accessibility</strong> class is a static class that allows you to do three important things. From that class you can check if the user is actually using a screenreader and if it is available or not (<a title="Link to the AS3 Documentation" href="http://livedocs.adobe.com/flex/3/langref/flash/accessibility/Accessibility.html#active" target="_blank">Accessibility.active</a>). It also allows you to make sure that all accessibility properties are updated if you change any of their values (<a title="Link to the AS3 Documentation" href="http://livedocs.adobe.com/flex/3/langref/flash/accessibility/Accessibility.html#updateProperties%28%29" target="_blank">Accessibility.updateProperties()</a>). The third and in my opinion most important bit of this class is the capability to manually submit an Event to the <a title="Microsoft Active Accessibility - Link to Wikipedia Entry" href="http://en.wikipedia.org/wiki/Microsoft_Active_Accessibility" target="_blank">MSAA</a> API (<a title="Link to the AS3 Documentation" href="http://livedocs.adobe.com/flex/3/langref/flash/accessibility/Accessibility.html#sendEvent%28%29" target="_blank">Accessibility.sendEvent()</a>).</p>
<p>The <strong>AccessibilityProperties </strong>class is the place where you define the properties, such as name, description and shortcut that are being presented to accessibility  aids. You can also set some properties that control the behaviour of your object towards screenreaders. AcessibilityProperties can be attached to any type of <a href="http://livedocs.adobe.com/flex/3/langref/flash/display/DisplayObject.html" target="_blank">DisplayObject</a>.</p>
<p>The <strong>AccessibilityImplementation</strong> class, is a bit of a special one. It is the base class in Flash that allows for the implementation of accessibility. This class you will never really use directly, since Adobe advices us not to instantiate it but instead extends <strong>AccImpl</strong> (which again extends from AccessibilityImplementation) in order to create our own implementation for any custom component we might create. The <strong>AccImpl</strong> class exists in two versions, one for <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/accessibility/AccImpl.html" target="_blank"><strong>flash</strong></a> and one for <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/accessibility/AccImpl.html?allClasses=1" target="_blank"><strong>flex</strong></a>.</p>
<p><br/></p>
<h2>More Than a Million Words</h2>
<p>Instead of boring you any further with details and long paragraphs of information, i figured it&#8217;s easier to understand how this all works by actually showing you. Enjoy the videos, if the quality is a bit low and you would like them to be sharper, make sure to head over to the vimeo site itself to download the original videos directly from there.</p>
<p><br/></p>
<h2>A Basic Example</h2>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="609" height="457" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=12672524&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=DBF232&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="609" height="457" src="http://vimeo.com/moogaloop.swf?clip_id=12672524&amp;server=vimeo.com&amp;show_byline=1&amp;color=DBF232&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><sub><a href="http://labs.swfjunkie.com/vimeoplayer.php?id=12672524" target="_blank"><strong>WATCH IN 800 x 600</strong></a> | <a href="http://downloads.swfjunkie.com/accessibility/BasicAccExample.zip"><em><strong>DOWNLOAD EXAMPLE SOURCE CODE</strong></em></a> </sub></p>
<p><br/></p>
<h2>A Basic AccessibilityImplementation Example</h2>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="319" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=12673524&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=DBF232&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="425" height="319" src="http://vimeo.com/moogaloop.swf?clip_id=12673524&amp;server=vimeo.com&amp;show_byline=1&amp;color=DBF232&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><sub><a href="http://labs.swfjunkie.com/vimeoplayer.php?id=12673524" target="_blank"><strong>WATCH IN 800 x 600</strong></a> | <a href="http://downloads.swfjunkie.com/accessibility/BasicAccImplExample.zip"><em><strong>DOWNLOAD EXAMPLE SOURCE CODE</strong></em></a> </sub></p>
<p><br/></p>
<h2>The Final EventManager Accessibility Approach</h2>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="319" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=12674937&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=DBF232&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="425" height="319" src="http://vimeo.com/moogaloop.swf?clip_id=12674937&amp;server=vimeo.com&amp;show_byline=1&amp;color=DBF232&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><sub><a href="http://labs.swfjunkie.com/vimeoplayer.php?id=12674937" target="_blank"><strong>WATCH IN 800 x 600</strong></a> | <a href="http://downloads.swfjunkie.com/accessibility/CustomAccImplExample.zip"><em><strong>DOWNLOAD EXAMPLE SOURCE CODE</strong></em></a> </sub></p>
<p><br/></p>
<div class="shr-publisher-395"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><br/><div class='shareaholic-like-buttonset' style='float:none;height:30px; padding-left: 30px;'><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fflash-accessibility-quest-part2%2F'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fflash-accessibility-quest-part2%2F' data-shr_title='Flash+%26+The+Quest+for+Accessibility+-+Part+%232'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fflash-accessibility-quest-part2%2F' data-shr_title='Flash+%26+The+Quest+for+Accessibility+-+Part+%232'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fflash-accessibility-quest-part2%2F' data-shr_title='Flash+%26+The+Quest+for+Accessibility+-+Part+%232'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.swfjunkie.com/2010/06/flash-accessibility-quest-part2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash &amp; The Quest for Accessibility &#8211; Part #1</title>
		<link>http://blog.swfjunkie.com/2010/06/flash-accessibility-quest-part1/</link>
		<comments>http://blog.swfjunkie.com/2010/06/flash-accessibility-quest-part1/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 09:10:41 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Workflows]]></category>

		<guid isPermaLink="false">http://blog.swfjunkie.com/?p=386</guid>
		<description><![CDATA[Preamble The greater part of last year i was heads-down-busy developing the EventManager Game which i had the pleasure to build at Liip for Postfinance. EventManager is an educational but fun game, that approaches topics such as budgeting, financing and investing in a modern way (read: not boring you to death). Today i want to talk [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="aligncenter size-full wp-image-397" title="em" src="http://blog.swfjunkie.com/wp-content/uploads/2010/06/em.jpg" border="2" alt="" width="619" height="240" /></p>
<h2>Preamble</h2>
<p>The greater part of last year i was heads-down-busy developing the <a href="http://www.postfinance-eventmanager.ch/" target="_blank"> EventManager</a> Game which i had the pleasure to build <a href="http://liip.ch/" target="_blank">at Liip</a> for <a href="http://www.postfinance.ch/" target="_blank">Postfinance</a>. EventManager is an educational but fun game, that approaches topics such as budgeting, financing and investing in a modern way <em>(read: not boring you to death)</em>.</p>
<p>Today i want to talk to you about the new iteration of the game that we just released a couple of weeks ago. What is new you ask? How about: <strong>Accessibility! </strong>And not just any form of accessibility &#8211; the Game has earned the <a title="Link to Certification Levels by Access4All" href="http://www.access-for-all.ch/ch/zertifizierung/zertifikatsstufen.html" target="_blank">AA+ Certification</a> from <a title="Link to the Website of Access4All" href="http://www.access-for-all.ch/ch/zertifizierung/zertifikatsstufen.html" target="_blank">Access For All</a> (their highest certification grade conform to <a title="Wikipedia entry for WCAG 2.0" href="http://en.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines#WCAG_2.0" target="_blank">WCAG 2.0</a>).<br />
<br/></p>
<h2>Overview Part #1</h2>
<p>In this two-part blog post i will cover the technical, as well as overall aspects of this endeavour. This first part will cover a brief history of accessibility within the Flash  Platform and its current state and hopefully useful insight if you are considering to add accessibility to one of your projects.</p>
<h2><span id="more-386"></span></h2>
<hr />
<h2>Accessibility History in Flash</h2>
<p>Thanks to Adobe (and of course Macromedia back then), the Flash   Platform has been sporting accessibility features since Macromedia   released Flash MX back in 2002. For those that remember, this used to be   Flash Player in version 6 and just introduced the Vector Drawing API   (ahh, nostalgia.. but i digress).</p>
<p>Over the years obviously the feature set has vastly improved and  Adobe (rightly so) can be proud of the level of accessibility  that the  Platform has today, since it allows you to:</p>
<ul>
<li>Create your own tab order</li>
<li>Set alternative text (naming &amp; description text)</li>
<li>Set shortcuts</li>
<li>Set element focus (also visually if needed)</li>
<li>Communicate statuses to screenreaders.</li>
</ul>
<p>As you see, there is really not much to wish for left here. In fact,   if you use the Flex Framework, all these functionalities and features   are just a step away from you. But that&#8217;s not all, Adobe has made it  quite simple to build your own  components within the flex framework,  that can with little work,  implement the accessibility layer. If that  wasn&#8217;t enough you even have the capability to manually trigger an event  to tell attached screenreaders that something has changed within your  application.</p>
<p>For us developers, this means that we have the tools and capabilities   to fully fullfill the guidelines proposed by <a href="http://en.wikipedia.org/wiki/WCAG_2.0#WCAG_2.0" target="_blank">WCAG  2.0</a>.<br />
<br/></p>
<h2>Dark Side of the Accessible Moon</h2>
<p>One of the &#8220;<em>limitations</em>&#8221; when it comes to the Flash   Platform  and accessibility, is that it&#8217;s only available for the Windows   Platform.</p>
<p>There have been many voices that critisized Adobe for &#8220;<em>only</em>&#8221;   implementing the <a href="http://en.wikipedia.org/wiki/Microsoft_Active_Accessibility#Motivation_and_Goals" target="_blank">Microsoft  Active Accessibility (MSAA) API</a>, yet to  this day it seems that it  is the only documented and standardized API  out there. Also it is to be said, that the most popular and wide used   screenreader applications have their home only on the Windows Platform.<br />
<br/></p>
<h2>Misconceptions &amp; Half Truths</h2>
<p><strong>Question: </strong><em>So, since the Flash Platform supports  accessibility so well, how come there are only a few accessible flash sites out there?</em></p>
<p>This question is usually met with one of the following answers:</p>
<blockquote>
<h3>ANSWER: Costs for implementation too high</h3>
<p>There is no denying that implementing   accessibility into a flash application is a high cost investment, if you   do not already have a developer with prior such knowledge.</p>
<p>This has multiple reasons. Depending on  your application it will  require an entire different approach than just  the straight forward  making «Your-Standard-RIA App» or «Form-based GUI  App» accessible. Which obviously, unless you have done it before will  require  tinkering, information gathering, experimenting and lots of  testing.  Hence, it will take time and thereby cost money.</p>
<h3>ANSWER: Too difficult &amp; lack of  documentation</h3>
<p>I have good and bad news. The good news is  if you are considering making your RIA accessible, rejoice! Most of the  information / documentation on accessibility for the Flash Platform is  actually directly aimed at the Flex Framework and at RIA development.</p>
<p>And here is the bad news: if you want to  make something completely custom &#8211; like a game &#8211; accessbile, make sure  you have enough time at your hands, you will need it :). But since you  are reading this, hopefully i&#8217;ll be able to provide you with enough  information to ease your pain :).</p>
<p>The main problem lies not in the fact that  implementing is difficult or complicated, it&#8217;s the fact that real  in-depth documentation is either missing, hard to come by and that  examples usually only cover little ground. So the difficulty of  implementing accessbility really only comes from the fact that you will  have to invest lots of time into testing and debugging.</p>
<h3>ANSWER: No time / No money within the  project</h3>
<p>This really is a convergence of the  previous two points. Lack of knowledge and the possible cost of  implementation, compared to the percentage of users who actually will  benefit from that step, leads often &#8211; and here we have to be honest to  ourselves &#8211; to the quick dismissal of accessibility within projects.</p>
<h3>ANSWER: What? Flash is accessible?</h3>
<p>Yes genius, have you missed the memo? In  fact a few years back when i took Macromedia&#8217;s Certified Flash Developer  exams there was already a huge part dedicated to accessibility within  the exam. Go read up, right now!</p>
<p>Adobe followed in Macromedia&#8217;s footsteps  and continued to improve accessibility, updating the accessibility  features once more in their latest Flex 4.0 Framework and implementing  their entire accessibility layer into the freshly released AIR 2.0.</p></blockquote>
<p><br/></p>
<h2>The Challenge</h2>
<p>Coming back to our topic at hand, for EventManager i was confronted  with a game that had many requirements.</p>
<p>The game&#8217;s flow for example, does not allow a regular tab order, it  just wouldn&#8217;t work. There were also many interactions that would take  place without any prior user action and those had to inform the player  obviously about what is happening.</p>
<p>Depending on where you were in the game or what you wanted to do, the  keyboard had to apply a different layout/scheme that is tailored to the  task at hand. For example, when you are on the eventgrounds, you need  to be able to place/manipulate constructions, which obviously has an  entire different control scheme than for example having to bid on an  artist in the auction part of the game.</p>
<p>To make the matter worse, the game has a strong mix of pure flash  elements and flex components. Oh, and everything had to be multilingual  of course :)<br />
<br/></p>
<h2>Finding a Solution</h2>
<p>Keyboard accessibility was pretty clear from the start. We needed a  class that allows us to set a specified keyboard layout/scheme to be  active when we needed it.</p>
<p>For user-interactions, it was generally agreed that a context-menu  would make most sense and thereby should be used for building  constructions and general interaction with the eventgrounds in the game.</p>
<p>When it came to implementing screenreader accessibility the concept  had to change a couple times, obviously here the lack of knowledge was a  problem and forced me to try out various things until finally finding a  working and valiable solution.</p>
<p>At this point i would like to extend my most grateful thanks to  Adobe&#8217;s Accessibility Evangelist (congrats on the new position!) <a href="http://twitter.com/mattmay" target="_blank">Matt May</a> ,  he was of incredible help and was able to give me just the right hints,  that helped me resolve some key issues that were plaguing me during my  quest for accessibility.<br />
<br/></p>
<h2>The Final Solution</h2>
<p>The final solution can be broken down into three essential parts:</p>
<ul>
<li>A global Keyboard Controller that allows applying different  control schemes at will.</li>
<li>A single class from which we can communicate with a screenreader  to manipulate its focus, send text to be read via speech synthesizer or  displayed on a braille device.</li>
<li>Last but not least a custom context menu component, that allows  us to display a menu of possible actions the user can undertake  depending on the situation.</li>
</ul>
<p>I&#8217;ll be covering all the technical details and attempted approaches  in the second blog post: <a href="http://blog.swfjunkie.com/2010/06/flash-accessibility-quest-part2/" target="_blank">Flash &amp; the Quest for Accessibility &#8211; Part #2</a>.<br />
<br/></p>
<h2>The Information Hunt</h2>
<p>I&#8217;ve invested countless hours in information gathering and hunting   down resources concering accessibility and possible ways of   implementation so that most screenreaders are supported.</p>
<p>Sadly, as it turns out, supporting all available Windows   screenreaders seems to be impossible (see <a href="http://www.msfw.com/accessibility/tests/FlashTest.html" target="_blank">these  tests</a>). Thereby i concentrated on <a href="http://www.freedomscientific.com/products/fs/jaws-product-page.asp" target="_blank">JAWS</a> and <a href="http://www.aisquared.com/zoomtext" target="_blank">ZoomText</a> since  these two applications seem to be the most widely used, when it  comes to  <a href="http://en.wikipedia.org/wiki/Assistive_technology" target="_blank">assistive  technologies</a>.</p>
<p>The resources gathered throughout the project that were useful are   publicly available via <a href="http://delicious.com/SinisterDex/accessibility+flash+flex" target="_blank">my delicious account</a>. They have notes as to what  information was  useful and/or if parts of the information was incorrect  or not valid anymore.<br />
<br/></p>
<h2>Conclusion</h2>
<p>All in all, getting the chance to implement accessibility in such a big flex application was an incredibly rewarding experience in multiple aspects.</p>
<p>Getting the chance to actually implement accessibility was a great, allbeit, at times nerve-wracking experience that gave me new and  invaluable knowledge.</p>
<p>The most rewarding aspect of the entire project though, to me  personally, was to receive the excited feedback from our targeted  end-users audience. A big thanks also here to <a href="http://www.access-for-all.ch/" target="_blank">Access4All</a>, the entire team at <a href="http://liip.ch" target="_blank">LIIP</a> and everyone else involved in this big effort and of course to Postfinance for giving us this great opportunity.</p>
<p>Feel free to leave comments or get in touch with me if you have any  further questions about flash, flex or accessibility.</p>
<div class="shr-publisher-386"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><br/><div class='shareaholic-like-buttonset' style='float:none;height:30px; padding-left: 30px;'><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fflash-accessibility-quest-part1%2F'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fflash-accessibility-quest-part1%2F' data-shr_title='Flash+%26+The+Quest+for+Accessibility+-+Part+%231'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fflash-accessibility-quest-part1%2F' data-shr_title='Flash+%26+The+Quest+for+Accessibility+-+Part+%231'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fflash-accessibility-quest-part1%2F' data-shr_title='Flash+%26+The+Quest+for+Accessibility+-+Part+%231'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.swfjunkie.com/2010/06/flash-accessibility-quest-part1/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Network Issue in AIR</title>
		<link>http://blog.swfjunkie.com/2010/06/air-network-issues-on-windows/</link>
		<comments>http://blog.swfjunkie.com/2010/06/air-network-issues-on-windows/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 12:53:51 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://blog.swfjunkie.com/?p=381</guid>
		<description><![CDATA[I just wasted 4 hours on this problem and figured i might aswell document it, so that if someone else is going to run into the same issue, they won&#8217;t have to suffer the same 4 hours that i just did. If you use AIR Applications under Windows and all of sudden those apps can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I just wasted 4 hours on this problem and figured i might aswell document it, so that if someone else is going to run into the same issue, they won&#8217;t have to suffer the same 4 hours that i just did.</p>
<p>If you use AIR Applications under Windows and all of sudden those apps can&#8217;t connect to the internet anymore, make sure that your Internet Explorer is not &#8220;Working Offline&#8221;. You can check in the Menu of Internet Explorer under <strong>Tools -&gt; Work Offline</strong>. If it has a checkmark, remove it and your apps should be working fine again.</p>
<p>I&#8217;m really suprised that the Windows Version of AIR apparently retrieves it&#8217;s Network Capabitilies via Internet Explorer and that this behaviour is in no way documented anywhere. Hopefully Adobe will changes this or atleast make sure that people now about this.</p>
<div class="shr-publisher-381"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><br/><div class='shareaholic-like-buttonset' style='float:none;height:30px; padding-left: 30px;'><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fair-network-issues-on-windows%2F'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fair-network-issues-on-windows%2F' data-shr_title='Network+Issue+in+AIR'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fair-network-issues-on-windows%2F' data-shr_title='Network+Issue+in+AIR'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2010%2F06%2Fair-network-issues-on-windows%2F' data-shr_title='Network+Issue+in+AIR'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.swfjunkie.com/2010/06/air-network-issues-on-windows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tweetr Tutorials &#8211; Part 2: Using OAuth in Tweetr</title>
		<link>http://blog.swfjunkie.com/2009/12/tweetr-tutorials-part-2-using-oauth-in-tweetr/</link>
		<comments>http://blog.swfjunkie.com/2009/12/tweetr-tutorials-part-2-using-oauth-in-tweetr/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 06:58:52 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tweetr]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.swfjunkie.com/?p=372</guid>
		<description><![CDATA[I&#8217;ve just finished uploading the second video tutorial to Vimeo on how to use Tweetr &#8211; The AS3 Twitter Library. In the second installment of this series i will show you how to use OAuth in Tweetr. Using OAuth in Tweetr from Sandro on Vimeo. You can grab the Project Sourcecode here. If you want [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I&#8217;ve just finished uploading the second video tutorial to Vimeo on how to use Tweetr &#8211; The AS3 Twitter Library. In the second installment of this series i will show you how to use OAuth in Tweetr.</p>
<p><center><br />
<object width="800" height="600"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8272511&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=1&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=8272511&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=1&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="800" height="600"></embed></object>
<p><a href="http://vimeo.com/8272511">Using OAuth in Tweetr</a> from <a href="http://vimeo.com/user1167580">Sandro</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p></center></p>
<p>You can grab the Project Sourcecode <a class="snap_noshot" href="http://wiki.swfjunkie.com/_media/tweetr:hotwos:oauthexampleproject.zip" target="_blank">here</a>.</p>
<p>If you want to watch the video in the size it was intended for, go to the <a href="http://wiki.swfjunkie.com/tweetr:hotwos:using-oauth" target="_blank">Tutorial Page</a> on the <a href="http://tweetr.swfjunkie.com" target="_blank">Project Homepage</a>.</p>
<div class="shr-publisher-372"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><br/><div class='shareaholic-like-buttonset' style='float:none;height:30px; padding-left: 30px;'><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F12%2Ftweetr-tutorials-part-2-using-oauth-in-tweetr%2F'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F12%2Ftweetr-tutorials-part-2-using-oauth-in-tweetr%2F' data-shr_title='Tweetr+Tutorials+-+Part+2%3A+Using+OAuth+in+Tweetr'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F12%2Ftweetr-tutorials-part-2-using-oauth-in-tweetr%2F' data-shr_title='Tweetr+Tutorials+-+Part+2%3A+Using+OAuth+in+Tweetr'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F12%2Ftweetr-tutorials-part-2-using-oauth-in-tweetr%2F' data-shr_title='Tweetr+Tutorials+-+Part+2%3A+Using+OAuth+in+Tweetr'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.swfjunkie.com/2009/12/tweetr-tutorials-part-2-using-oauth-in-tweetr/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>First Tweetr Lib Video Tutorial &amp; v1.0 beta 2 released</title>
		<link>http://blog.swfjunkie.com/2009/12/first-tweetr-lib-video-tutorial-v1-0-beta-2-released/</link>
		<comments>http://blog.swfjunkie.com/2009/12/first-tweetr-lib-video-tutorial-v1-0-beta-2-released/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 23:45:39 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tweetr]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Update]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.swfjunkie.com/?p=369</guid>
		<description><![CDATA[I&#8217;ll make this short and painless ;) I&#8217;ve just uploaded the first Video of a Series of Videotutorials on how-to use the Tweetr Library. The first installment is covering &#8220;Installing &#38; Setting up the TweetrProxy&#8221; and you can watch it in it&#8217;s intended size by following this link. Installing &#38; Setting up the TweetrProxy from [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I&#8217;ll make this short and painless ;) I&#8217;ve just uploaded the first Video of a Series of Videotutorials on how-to use the Tweetr Library.</p>
<p>The first installment is covering <strong>&#8220;Installing &amp; Setting up the TweetrProxy&#8221;</strong> and you can watch it in it&#8217;s intended size by following <a title="To the Tutorial" href="http://wiki.swfjunkie.com/tweetr:howtos:installing-the-proxy" target="_blank">this link</a>.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="800" height="600" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=8224362&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=1&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;group_id=" /><embed type="application/x-shockwave-flash" width="800" height="600" src="http://vimeo.com/moogaloop.swf?clip_id=8224362&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=1&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;group_id=" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/groups/30018/videos/8224362">Installing &amp; Setting up the TweetrProxy</a> from <a href="http://vimeo.com/user1167580">Sandro</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>On the Tweetr-Front i&#8217;ve already released v1.0 beta 2 which adds a couple fixes. Here a short update:</p>
<ul>
<li><strong>AS:</strong> changed serviceHost call from getter to internal variable _serviceHost <em>[minor]</em></li>
<li><strong>AS:</strong> added serviceHost to OAuth Class since same crossdomain problem applies <em>[major]</em></li>
<li><strong>PROXY: </strong>added OAuth Authorization support <em>[major]</em></li>
<li><strong>ASDOC:</strong> Update Documentations, also added which Methods require Authentication <em>[minor]</em></li>
</ul>
<p>As usual you can download the new version from the <a title="Go to the Project Homepage" href="http://tweetr.swfjunkie.com" target="_blank">Project Homepage</a>.</p>
<div class="shr-publisher-369"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><br/><div class='shareaholic-like-buttonset' style='float:none;height:30px; padding-left: 30px;'><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F12%2Ffirst-tweetr-lib-video-tutorial-v1-0-beta-2-released%2F'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F12%2Ffirst-tweetr-lib-video-tutorial-v1-0-beta-2-released%2F' data-shr_title='First+Tweetr+Lib+Video+Tutorial+%26+v1.0+beta+2+released'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F12%2Ffirst-tweetr-lib-video-tutorial-v1-0-beta-2-released%2F' data-shr_title='First+Tweetr+Lib+Video+Tutorial+%26+v1.0+beta+2+released'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F12%2Ffirst-tweetr-lib-video-tutorial-v1-0-beta-2-released%2F' data-shr_title='First+Tweetr+Lib+Video+Tutorial+%26+v1.0+beta+2+released'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.swfjunkie.com/2009/12/first-tweetr-lib-video-tutorial-v1-0-beta-2-released/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Embedding Cascading Style Sheets in Flash/Flex</title>
		<link>http://blog.swfjunkie.com/2009/10/embedding-css-flex/</link>
		<comments>http://blog.swfjunkie.com/2009/10/embedding-css-flex/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 11:32:11 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://blog.swfjunkie.com/?p=303</guid>
		<description><![CDATA[It&#8217;s nice to be able to quickly adapt to clients wishes, when they come to you and ask for this text to be bigger or for that link to be bold when you hover over it. Simply replace the css file and your set. But sometimes you don&#8217;t want to go through the process of [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>It&#8217;s nice to be able to quickly adapt to clients wishes, when they come to you and ask for this text to be bigger or for that link to be bold when you hover over it. Simply replace the css file and your set.</p>
<p>But sometimes you don&#8217;t want to go through the process of adding a Loader and EventListeners so you can load that external css file just for a bit of fancy html text. Sometimes it would be nice to just compile that thing into your swf and pretty much be done with it.</p>
<p>Well lucky enough we can embed files in classes with the embed tag. </p>
<p>Example:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">// Embed your stylesheet with the octet-stream mime-type</span>
<span style="color: #000000;">&#91;</span>Embed<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span>=<span style="color: #990000;">&quot;assets/stylesheet.css&quot;</span><span style="color: #000066; font-weight: bold;">,</span> mimeType=<span style="color: #990000;">&quot;application/octet-stream&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> stylesCSS<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Class</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> createStyleSheetObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">StyleSheet</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #009900; font-style: italic;">// create a new StyleSheet instance</span>
    <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">styleSheet</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">StyleSheet</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">StyleSheet</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #009900; font-style: italic;">// create a instance of the styles as ByteArray</span>
    <span style="color: #6699cc; font-weight: bold;">var</span> byteArray<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">ByteArray</span> = <span style="color: #0033ff; font-weight: bold;">new</span> stylesCSS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">ByteArray</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #009900; font-style: italic;">// read the content</span>
    <span style="color: #6699cc; font-weight: bold;">var</span> stylesString<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = byteArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">readUTFBytes</span><span style="color: #000000;">&#40;</span>byteArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #009900; font-style: italic;">// parse the string by the stylesheet and done!</span>
    <span style="color: #004993;">styleSheet</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parseCSS</span><span style="color: #000000;">&#40;</span>stylesString<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #004993;">styleSheet</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Of course this would be the proper way, if you want to save some lines you could also do the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">// Embed your stylesheet with the octet-stream mime-type</span>
<span style="color: #000000;">&#91;</span>Embed<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span>=<span style="color: #990000;">&quot;assets/stylesheet.css&quot;</span><span style="color: #000066; font-weight: bold;">,</span> mimeType=<span style="color: #990000;">&quot;application/octet-stream&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> stylesCSS<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Class</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> createStyleSheetObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">StyleSheet</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #009900; font-style: italic;">// create a new StyleSheet instance</span>
    <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">styleSheet</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">StyleSheet</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">StyleSheet</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #004993;">styleSheet</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parseCSS</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> stylesCSS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #004993;">styleSheet</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>There you go, your StyleSheet is ready to be used. </p>
<p><strong>UPDATE:</strong></p>
<p>Vikas had a very good question concering how to embed multiple stylesheets with this method. I figured i would give another example on how to achieve this very simply. In order to not have to deal with multiple files to embed, you could just join all the styles for a stylesheet into one file, like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* StyleSheet 1 */</span>
&nbsp;
<span style="color: #6666ff;">.myStyle</span>
<span style="color: #00AA00;">&#123;</span>
	fontFamily<span style="color: #00AA00;">:</span> Arial<span style="color: #00AA00;">;</span>
	fontWeight<span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* @eos */</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* StyleSheet 2 */</span>
&nbsp;
<span style="color: #6666ff;">.myStyle</span>
<span style="color: #00AA00;">&#123;</span>
	fontFamily<span style="color: #00AA00;">:</span> Georgia<span style="color: #00AA00;">;</span>
	fontWeight<span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* @eos */</span></pre></td></tr></table></div>

<p>As you see there is a comment block called <code>/* @eos */</code> that represent the &#8220;end of stylesheet&#8221;. This we will split in our code as follows:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">// Embed your stylesheet with the octet-stream mime-type</span>
<span style="color: #000000;">&#91;</span>Embed<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span>=<span style="color: #990000;">&quot;assets/stylesheet.css&quot;</span><span style="color: #000066; font-weight: bold;">,</span> mimeType=<span style="color: #990000;">&quot;application/octet-stream&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> stylesCSS<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Class</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> createStyleSheets<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #009900; font-style: italic;">// create a instance of the styles as ByteArray</span>
    <span style="color: #6699cc; font-weight: bold;">var</span> byteArray<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">ByteArray</span> = <span style="color: #0033ff; font-weight: bold;">new</span> stylesCSS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">ByteArray</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #009900; font-style: italic;">// read the content</span>
    <span style="color: #6699cc; font-weight: bold;">var</span> stylesString<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = byteArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">readUTFBytes</span><span style="color: #000000;">&#40;</span>byteArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #009900; font-style: italic;">// split the string with your delimiter. in this case &quot;/* @eos */&quot;</span>
    <span style="color: #6699cc; font-weight: bold;">var</span> matches<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = stylesString<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">split</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;/* @eos */&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #009900; font-style: italic;">// loop through the generated array and create the stylesheets and push</span>
    <span style="color: #009900; font-style: italic;">// them to a new array that will contain those stylesheet objects</span>
    <span style="color: #6699cc; font-weight: bold;">var</span> styleSheets<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #6699cc; font-weight: bold;">var</span> n<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = matches<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> n<span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">styleSheet</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">StyleSheet</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">StyleSheet</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #004993;">styleSheet</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parseCSS</span><span style="color: #000000;">&#40;</span>matches<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        styleSheets<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">styleSheet</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #009900; font-style: italic;">// return the StyleSheet Array</span>
    <span style="color: #0033ff; font-weight: bold;">return</span> styleSheets<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>And voila, you got an array of stylesheets that you can apply to wherever you want. Hope that helps!</p>
<div class="shr-publisher-303"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><br/><div class='shareaholic-like-buttonset' style='float:none;height:30px; padding-left: 30px;'><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F10%2Fembedding-css-flex%2F'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F10%2Fembedding-css-flex%2F' data-shr_title='Embedding+Cascading+Style+Sheets+in+Flash%2FFlex'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F10%2Fembedding-css-flex%2F' data-shr_title='Embedding+Cascading+Style+Sheets+in+Flash%2FFlex'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2009%2F10%2Fembedding-css-flex%2F' data-shr_title='Embedding+Cascading+Style+Sheets+in+Flash%2FFlex'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.swfjunkie.com/2009/10/embedding-css-flex/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Make your old incompatible Add-ons work in Firefox 3</title>
		<link>http://blog.swfjunkie.com/2008/06/make-your-old-incompatible-add-ons-work-in-firefox-3/</link>
		<comments>http://blog.swfjunkie.com/2008/06/make-your-old-incompatible-add-ons-work-in-firefox-3/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 08:58:24 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Workarounds]]></category>

		<guid isPermaLink="false">http://blog.swfjunkie.com/?p=27</guid>
		<description><![CDATA[Yes, you could wait until whoevers Extension you are using is updated OR you can use this handy little trick: Open a new Tab Enter about:config in the addressbar Void the warranty! (You&#8217;ll see what i mean) Look for extensions.checkCompatibility Set the value to false You may or may not have to restart Firefox And [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Yes, you could wait until whoevers Extension you are using is updated OR you can use this handy little trick:</p>
<ul>
<li>Open a new Tab</li>
<li>Enter <strong><a class="linkification-ext" title="Linkification: about:config" href="about:config">about:config</a></strong> in the addressbar</li>
<li>Void the warranty! (You&#8217;ll see what i mean)</li>
<li>Look for <strong>extensions.checkCompatibility</strong><strong></strong></li>
<li>Set the value to <strong>false</strong></li>
<li>You may or may not have to restart Firefox</li>
</ul>
<p>And that&#8217;s it! Keep in mind not to blame Firefox for incompatible Extensions that do not work now ;) To reverse those Settings you can always do the same steps and just set the value back to true.</p>
<div class="shr-publisher-27"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><br/><div class='shareaholic-like-buttonset' style='float:none;height:30px; padding-left: 30px;'><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2008%2F06%2Fmake-your-old-incompatible-add-ons-work-in-firefox-3%2F'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2008%2F06%2Fmake-your-old-incompatible-add-ons-work-in-firefox-3%2F' data-shr_title='Make+your+old+incompatible+Add-ons+work+in+Firefox+3'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2008%2F06%2Fmake-your-old-incompatible-add-ons-work-in-firefox-3%2F' data-shr_title='Make+your+old+incompatible+Add-ons+work+in+Firefox+3'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fblog.swfjunkie.com%2F2008%2F06%2Fmake-your-old-incompatible-add-ons-work-in-firefox-3%2F' data-shr_title='Make+your+old+incompatible+Add-ons+work+in+Firefox+3'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.swfjunkie.com/2008/06/make-your-old-incompatible-add-ons-work-in-firefox-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

