<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Dave Curry</title>
	
	<link>http://www.davecurry.net</link>
	<description>Creative Director</description>
	<lastBuildDate>Fri, 07 Aug 2009 02:55:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/davecurry" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>10 Essential Adobe Flash Links</title>
		<link>http://www.davecurry.net/2008/07/24/10-essential-adobe-flash-links/</link>
		<comments>http://www.davecurry.net/2008/07/24/10-essential-adobe-flash-links/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 05:28:15 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://www.davecurry.net/?p=88</guid>
		<description><![CDATA[Adobe Flash Player Version Penetration
Worldwide Ubiquity of Adobe Flash Player by Version
http://www.adobe.com/products/player_census/flashplayer/version_penetration.html

Adobe Flash Player Version Check
You need to know what version you're running, and so do your testers. Sharing this link is an easy way to get people to upgrade.
Under "Adobe Flash Player" roll over "About"

http://www.adobe.com/shockwave/welcome/

Archived Flash Players Available for Testing Purposes
You can download archived [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Adobe Flash Player Version Penetration</strong></p>
<p>Worldwide Ubiquity of Adobe Flash Player by Version</p>
<p><a href="http://www.adobe.com/products/player_census/flashplayer/version_penetration.html">http://www.adobe.com/products/player_census/flashplayer/version_penetration.html</a></p>
<p><br></p>
<p><strong>Adobe Flash Player Version Check</strong></p>
<p>You need to know what version you're running, and so do your testers. Sharing this link is an easy way to get people to upgrade.</p>
<p>Under "Adobe Flash Player" roll over "About"</p>
<p><img src="http://farm4.static.flickr.com/3290/2699926945_2c8fb57157_o.jpg" alt="About Flash Player" /></p>
<p><a href="http://www.adobe.com/shockwave/welcome/">http://www.adobe.com/shockwave/welcome/</a></p>
<p><br></p>
<p><strong>Archived Flash Players Available for Testing Purposes</strong></p>
<p>You can download archived Adobe Flash Players from the Adobe website. The archived versions are available specifically for Flash developers who are assessing their sites from the perspective of users with earlier versions of  Flash Player.</p>
<p><a href="http://www.adobe.com/go/tn_14266">http://www.adobe.com/go/tn_14266</a></p>
<p><br></p>
<p><strong>ActionScriptCheatSheet</strong></p>
<p>Adobe Flex Language Reference Cheatsheets. Adobe AIR Language Reference Cheatsheets. ActionScript 3.0 Language Reference Cheatsheets. Papervision3D API Cheatsheets.</p>
<p><a href="http://www.actionscriptcheatsheet.com/">http://www.actionscriptcheatsheet.com/</a></p>
<p><br></p>
<p><strong>SWFObject</strong></p>
<p>SWFObject is an easy-to-use and standards-friendly method to embed Flash content, which utilizes one small JavaScript file.</p>
<p><a href="http://code.google.com/p/swfobject/">http://code.google.com/p/swfobject/</a></p>
<p><br></p>
<p><strong>SWFAddress</strong></p>
<p>SWFAddress is a small, but powerful library that provides deep linking for Flash and Ajax.</p>
<p><a href="http://www.asual.com/swfaddress/">http://www.asual.com/swfaddress/</a></p>
<p><br></p>
<p><strong>TweenLite</strong></p>
<p>A Lightweight (3K) and FAST Tweening Engine</p>
<p><a href="http://blog.greensock.com/tweenliteas3/">http://blog.greensock.com/tweenliteas3/</a></p>
<p><br></p>
<p><strong>Lee Brimelow's The Flash Blog</strong></p>
<p>Lee is a Platform Evangelist at Adobe focusing on the Flash, Flex, and AIR developer communities, and his site is required reading.</p>
<p><a href="http://theflashblog.com/">http://theflashblog.com/</a></p>
<p><br></p>
<p><strong>[ draw.logic ]</strong></p>
<p>draw.logic is a great blog to help you keep up with actionscript-related releases and issues.</p>
<p><a href="http://drawlogic.com/">http://drawlogic.com/</a></p>
<p><br></p>
<p><strike>... and <strong>ActionscriptAPIs</strong></p>
<p>ActionScriptAPIs is an up to date resource tracking AS3 and AS2 application programming interfaces for Flash/Flex/AIR designers and programmers... and it's mine.  I've been wanting to set this up for a while and thanks to Godaddy, Tumblr and a few spare hours another tiny site is born.</strike></p>
<p><br></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davecurry.net/2008/07/24/10-essential-adobe-flash-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Papervision 2.0 BorgEffects – Flash Version</title>
		<link>http://www.davecurry.net/2007/12/29/papervision-20-borgeffects-flash-version/</link>
		<comments>http://www.davecurry.net/2007/12/29/papervision-20-borgeffects-flash-version/#comments</comments>
		<pubDate>Sat, 29 Dec 2007 23:36:49 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://www.jdavidcurry.com/2007/12/29/papervision-20-borgeffects-flash-version/</guid>
		<description><![CDATA[
Yesterday I snagged Andy Zupko's super-amazing BorgEffects download which demos his new Effects branch for Papervision 2.0. It's very exciting stuff!
Since I'm not a big-time Flex user, I converted his borgEffects.as for use in the Flash IDE and decided to make it available for download.  I thought it might be helpful to those struggling [...]]]></description>
			<content:encoded><![CDATA[<div class="img"><a href="http://www.jdavidcurry.com/demo/borgEffects_v2/" target="_blank"><img src="http://farm3.static.flickr.com/2157/2146334407_fa18116dfb_o.jpg" width="430" height="452" border="0" alt="Papervision 2.0 BorgEffects Flash Version" /></a></div>
<p>Yesterday I snagged <a href="http://blog.zupko.info/?p=76" target="_blank">Andy Zupko's super-amazing BorgEffects download</a> which demos his new Effects branch for Papervision 2.0. It's very exciting stuff!</p>
<p>Since I'm not a big-time Flex user, I converted his borgEffects.as for use in the Flash IDE and decided to make it available for download.  I thought it might be helpful to those struggling with Flex to Flash conversions.</p>
<p>Of course, I couldn't resist <a href="http://www.jdavidcurry.com/demo/borgEffects_v2/" target="_blank">making a few changes</a> by just messing around;</p>
<p>randomly changing the colorTransform settings onClick<br><br />
using a different texture<br><br />
changing the clippingPoint<br><br />
etc...</p>
<p>To highlight the Flex to Flash diffs, I've commented my BorgEffects_flash.as like so:</p>
<pre class="actionscript"><ol start="2"><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// the FLEX WAY</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//dae.load(XML(new shipAsset()), mats);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// the FLASH WAY</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">dae.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;cube.dae&quot;</span>, mats<span style="color: #66cc66;">&#41;</span>;</div></li></ol></pre>
<p>To make it all hum, you'll need <strike>the latest</strike> build from the <a href="http://code.google.com/p/papervision3d/source" target="_blank">Papervision respository</a> and be sure to point the BorgEffects_flash.fla Actionscript 3.0 Classpath to the class files in /branches/Effects/src.</p>
<p><a href="http://www.jdavidcurry.com/downloads/borgEffects_v2.zip">Download the source files</a> and have fun.</p>
<p><strong>EDIT: I'm not sure exactly which revision of Great White this demo used, but since 2007 I'm sure a lot has changed. Proceed with caution!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davecurry.net/2007/12/29/papervision-20-borgeffects-flash-version/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Talking to Twitter via Actionscript 3.0</title>
		<link>http://www.davecurry.net/2007/10/21/talking-to-twitter-via-actionscript-30/</link>
		<comments>http://www.davecurry.net/2007/10/21/talking-to-twitter-via-actionscript-30/#comments</comments>
		<pubDate>Mon, 22 Oct 2007 04:48:20 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.jdavidcurry.com/2007/10/21/talking-to-twitter-via-actionscript-30/</guid>
		<description><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_myTweetsAS3_1398822345"
			class="flashmovie"
			width="440"
			height="170">
	<param name="movie" value="http://www.davecurry.net/myTweets/myTweetsAS3.swf" />
	<param name="bgcolor" value="#FF6505" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.davecurry.net/myTweets/myTweetsAS3.swf"
			name="fm_myTweetsAS3_1398822345"
			width="440"
			height="170">
		<param name="bgcolor" value="#FF6505" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
LATEST UPDATE: Twitter modified their crossdomain policy, which put an end to my flash fun... In other words, this doesn't work anymore the way I wrote it and I don't wanna spend any time updating it! *sigh*
I rewrote the myTweets AS2 flash badge using AS3 and I thought it might [...]]]></description>
			<content:encoded><![CDATA[<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_myTweetsAS3_1752074238"
			class="flashmovie"
			width="440"
			height="170">
	<param name="movie" value="http://www.davecurry.net/myTweets/myTweetsAS3.swf" />
	<param name="bgcolor" value="#FF6505" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.davecurry.net/myTweets/myTweetsAS3.swf"
			name="fm_myTweetsAS3_1752074238"
			width="440"
			height="170">
		<param name="bgcolor" value="#FF6505" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></div>
<p><strong>LATEST UPDATE: Twitter modified their <a href="http://twitter.com/crossdomain.xml">crossdomain</a> policy, which put an end to my flash fun... In other words, this doesn't work anymore the way I wrote it and I don't wanna spend any time updating it! *sigh*</strong></p>
<p>I rewrote the myTweets AS2 flash badge using AS3 and I thought it might be a good idea to share the code and source files. (Links at the end of the post.)</p>
<p>I'd like to focus on a few items that caused me a few minor headaches here and there in hopes of saving others the trouble. When you can't find an answer in flash's documentation or in Moock's Essential Actionscript 3.0, google it and you'll probably find what you're looking for.</p>
<p>Let's get started.</p>
<p><b>Don't forget your imports</b></p>
<p>New calls requires new imports that you may not be familiar with. For example, getting an url requires code within the flash.net framework. It could be easy to overlook, so keep your eyes open. Here's my list for this project:</p>
<pre class="actionscript"><ol start="2"><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">Tween</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">easing</span>.<span style="color: #006600;">*</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">*</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">*</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">*</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">ui</span>.<span style="color: #006600;">*</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">*</span></div></li></ol></pre>
<p><b>Calling a function that requires an EVENT</b></p>
<p>When the stage resizes, I have an event listener attached to the stage that calls resizeHandler. The resizeHandler function appears to require an EVENT as an argument... but I want to fire it immediately when my swf loads to position my clips on the stage... and I don't want to create another event to do this. What to do?</p>
<p>The event listener:</p>
<pre class="actionscript"><ol start="66"><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">RESIZE</span>, resizeHandler<span style="color: #66cc66;">&#41;</span>;</div></li></ol></pre>
<p>The resizeHandler function:</p>
<pre class="actionscript"><ol start="129"><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// RESIZER</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> resizeHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//trace(&quot;resizeHandler: &quot; + event);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  	<span style="color: #808080; font-style: italic;">//trace(&quot;stageWidth: &quot; + stage.stageWidth + &quot; stageHeight: &quot; + stage.stageHeight);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	myBtn.<span style="color: #006600;">x</span> = <span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>/<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>-<span style="color: #66cc66;">&#40;</span>myBtn.<span style="color: #0066CC;">width</span>/<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	myBtn.<span style="color: #006600;">y</span> = <span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span>/<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>-<span style="color: #66cc66;">&#40;</span>myBtn.<span style="color: #0066CC;">height</span>/<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	textBox.<span style="color: #006600;">x</span> = myBtn.<span style="color: #006600;">x</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	textBox.<span style="color: #006600;">y</span> = myBtn.<span style="color: #006600;">y</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	loadImg.<span style="color: #006600;">x</span> = myBtn.<span style="color: #006600;">x</span><span style="color: #cc66cc;">+300</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	loadImg.<span style="color: #006600;">y</span> = myBtn.<span style="color: #006600;">y</span><span style="color: #cc66cc;">+102</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	dateTxt.<span style="color: #006600;">x</span> = myBtn.<span style="color: #006600;">x</span><span style="color: #cc66cc;">+11</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	dateTxt.<span style="color: #006600;">y</span> = myBtn.<span style="color: #006600;">y</span><span style="color: #cc66cc;">+135</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>;</div></li></ol></pre>
<p>The answers turn out to be super simple. I just pass null as an argument and resizeHandler accepts that.</p>
<pre class="actionscript"><ol start="69"><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> resizeHandler<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>;</div></li></ol></pre>
<p><b>Customizing the right-click context menu</b> </p>
<p>What hung me up on this one was how to attach the context menu to the stage, as opposed to an object on the stage. With all of the new syntax swirling around it's hard to know what's acceptable and what's not. Root, stage, this... In the end, line 43 did the trick. Good 'ole reliable "this."</p>
<pre class="actionscript"><ol start="33"><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// create the context menu, remove the built-in items, add our custom items</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> newCM:<span style="color: #0066CC;">ContextMenu</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">ContextMenu</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">newCM.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>ContextMenuEvent.<span style="color: #006600;">MENU_SELECT</span>, onContextMenuHandler<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">newCM.<span style="color: #0066CC;">hideBuiltInItems</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> link1:<span style="color: #0066CC;">ContextMenuItem</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">ContextMenuItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Visit DaveCurry.net&quot;</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">link1.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>ContextMenuEvent.<span style="color: #006600;">MENU_ITEM_SELECT</span>, grabLink1<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">newCM.<span style="color: #0066CC;">customItems</span>.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>link1<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> link2:<span style="color: #0066CC;">ContextMenuItem</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">ContextMenuItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Visit Twitter&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">link2.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>ContextMenuEvent.<span style="color: #006600;">MENU_ITEM_SELECT</span>, grabLink2<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">newCM.<span style="color: #0066CC;">customItems</span>.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>link2<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">contextMenu</span> = newCM;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> onContextMenuHandler<span style="color: #66cc66;">&#40;</span>event:ContextMenuEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">event.<span style="color: #0066CC;">target</span>.<span style="color: #0066CC;">customItems</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">event.<span style="color: #0066CC;">target</span>.<span style="color: #0066CC;">customItems</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// contextMenu link1</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> grabLink1<span style="color: #66cc66;">&#40;</span>event:ContextMenuEvent<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> myRequest:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://www.davecurry.net&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">navigateToURL<span style="color: #66cc66;">&#40;</span>myRequest<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// contextMenu link2</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> grabLink2<span style="color: #66cc66;">&#40;</span>event:ContextMenuEvent<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> myRequest:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://www.twitter.com&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">navigateToURL<span style="color: #66cc66;">&#40;</span>myRequest<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li></ol></pre>
<p><b>Using FlashVars with AS3</b></p>
<p>This one is huge. At work, we rely on FlashVars to make our projects more dynamic. When you're working with CMS and you need to tell your flash object a few things... you can't beat 'em.</p>
<p>Here's how I ended up coding for FlashVars in AS3. They're not as integrated as before, but we accept that and move on. </p>
<p>First I want to check for their existence. If found, I populate the variables with the values defined in FlashVars. </p>
<p>If FlashVar values are not found, I declare them in my code so my swf won't break. Breaking is no good.</p>
<pre class="actionscript"><ol start="71"><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// sort FlashVars</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> keyStr:<span style="color: #0066CC;">String</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> paramObj:<span style="color: #0066CC;">Object</span> = LoaderInfo<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">root</span>.<span style="color: #006600;">loaderInfo</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">parameters</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>keyStr <span style="color: #b1b100;">in</span> paramObj<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// sort flashVars</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>keyStr == <span style="color: #ff0000;">&quot;userID&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> userID = <span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#40;</span>paramObj<span style="color: #66cc66;">&#91;</span>keyStr<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>keyStr == <span style="color: #ff0000;">&quot;totalTweets&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> totalTweets = <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>paramObj<span style="color: #66cc66;">&#91;</span>keyStr<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>keyStr == <span style="color: #ff0000;">&quot;timerTweets&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> timerTweets = <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>paramObj<span style="color: #66cc66;">&#91;</span>keyStr<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>keyStr == <span style="color: #ff0000;">&quot;tweetColor&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> tweetColor = <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>paramObj<span style="color: #66cc66;">&#91;</span>keyStr<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>keyStr == <span style="color: #ff0000;">&quot;dateColor&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> dateColor = <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>paramObj<span style="color: #66cc66;">&#91;</span>keyStr<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// if no FlashVars are found - define values</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>userID == <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	userID = <span style="color: #ff0000;">&quot;1905521&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	totalTweets = <span style="color: #cc66cc;">5</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	timerTweets = <span style="color: #cc66cc;">5</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	tweetColor = 0x000000;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	dateColor = 0x000000;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li></ol></pre>
<p><b>Consuming the XML</b></p>
<p>In AS2, XML is a no-brainer. I've been using the same chunk of foolproof code forever, and now I have to think about it? No problem, it's covered.</p>
<p>For the XML Twitter returns, I want to loop through and grab some of the data to define a few variables with, and some of the other data I'll push into arrays.</p>
<p>The XML I'm hitting is this:<br />
<a href="http://twitter.com/statuses/user_timeline/1905521.xml" target="_new">http://twitter.com/statuses/user_timeline/1905521.xml</a></p>
<p>Here's a chunk  of that XML from the top:</p>
<pre class="xml"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;statuses</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;array&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;status<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;created_at<span style="font-weight: bold; color: black;">&gt;</span></span></span>Sat Oct 20 22:56:39 +0000 2007<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/created_at<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;id<span style="font-weight: bold; color: black;">&gt;</span></span></span>351115132<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/id<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;text<span style="font-weight: bold; color: black;">&gt;</span></span></span>I need to go buy the Orange Box.<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/text<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;source<span style="font-weight: bold; color: black;">&gt;</span></span></span>im<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/source<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;truncated<span style="font-weight: bold; color: black;">&gt;</span></span></span>false<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/truncated<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;user<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;id<span style="font-weight: bold; color: black;">&gt;</span></span></span>1905521<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/id<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;name<span style="font-weight: bold; color: black;">&gt;</span></span></span>Dave Curry<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/name<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;screen_name<span style="font-weight: bold; color: black;">&gt;</span></span></span>DaveCurry<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/screen_name<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;location<span style="font-weight: bold; color: black;">&gt;</span></span></span>Seattle, WA<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/location<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;description<span style="font-weight: bold; color: black;">&gt;</span></span></span>Dave Curry is an award-winning technical creative director and flash developer at POP, a strategic interactive agency in Seattle.<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/description<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;profile_image_url<span style="font-weight: bold; color: black;">&gt;</span></span></span>http://s3.amazonaws.com/twitter_production/profile_images/33089582/darthcurry_square_normal.jpg<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/profile_image_url<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;url<span style="font-weight: bold; color: black;">&gt;</span></span></span>http://www.davecurry.net<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/url<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;protected<span style="font-weight: bold; color: black;">&gt;</span></span></span>false<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/protected<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/user<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/status<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;status<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">etc...</div></li></ol></pre>
<p>To loop through, I'll use "for each" within specific nodes. First in the user data for the imageURL and screenName, and again in the status for everything else, including the tweets themselves.</p>
<p>I should note that this section gets kinda long because I'm rebuilding the date Twittered into a more readable string.</p>
<pre class="actionscript"><ol start="145"><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">myXML = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span>myLoader.<span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// run through it</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> user:<span style="color: #0066CC;">XML</span> <span style="color: #b1b100;">in</span> myXML.<span style="color: #0066CC;">status</span>.<span style="color: #006600;">user</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// grab image</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>imgURL == <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> imgURL = user.<span style="color: #006600;">profile_image_url</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// grab screen name</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>screenName == <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> screenName = user.<span style="color: #006600;">screen_name</span>; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> tweet:<span style="color: #0066CC;">XML</span> <span style="color: #b1b100;">in</span> myXML.<span style="color: #0066CC;">status</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// populate tweets</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	twtArray.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>tweet.<span style="color: #0066CC;">text</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// populate tweet ids</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	idsArray.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>tweet.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// populate created_at</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> t:<span style="color: #0066CC;">String</span> = tweet.<span style="color: #006600;">created_at</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// format date</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// remove the junk at the end</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> tempDate:<span style="color: #0066CC;">Array</span> = t.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot; +&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//trace(tempDate)</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// now spilt it apart again</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> splitDate:<span style="color: #0066CC;">Array</span> = tempDate<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot; &quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// now split apart the military time</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> splitTime:<span style="color: #0066CC;">Array</span> = splitDate<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// factor in the offset</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> myHour:<span style="color: #0066CC;">Number</span> = splitTime<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// determine AM or PM</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> amPm:<span style="color: #0066CC;">String</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span>myHour<span style="color: #66cc66;">&#41;</span> &gt;= <span style="color: #cc66cc;">12</span> ? amPm = <span style="color: #ff0000;">&quot;PM&quot;</span> : amPm = <span style="color: #ff0000;">&quot;AM&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// fix hour</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>myHour &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> myHour+=<span style="color: #cc66cc;">12</span>; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	myHour &gt; <span style="color: #cc66cc;">12</span> ? myHour = myHour<span style="color: #cc66cc;">-12</span> : myHour = myHour;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// now put it all back together again</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> myDate:<span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#40;</span>splitDate<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>+<span style="color: #ff0000;">&quot; &quot;</span>+splitDate<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>+<span style="color: #ff0000;">&quot; &quot;</span>+splitDate<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>+<span style="color: #ff0000;">&quot; at &quot;</span>+myHour+<span style="color: #ff0000;">&quot;:&quot;</span>+splitTime<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>+<span style="color: #ff0000;">&quot; &quot;</span>+amPm+<span style="color: #ff0000;">&quot; GMT&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	dteArray.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>myDate<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//trace(&quot;done&quot;);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//trace(&quot;imgURL = &quot;+imgURL);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//trace(&quot;screenName = &quot;+screenName);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//trace(&quot;twtArray = &quot;+twtArray);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//trace(&quot;idsArray = &quot;+idsArray);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//trace(&quot;dteArray = &quot;+dteArray);</span></div></li></ol></pre>
<p>...and you can see that I have a great affinity for the trace function.</p>
<p><b>getURL is dead, long live URLRequest</b></p>
<p>This didn't really hang me up, but it is worth noting that you have to specifically activate a movieClip with buttonMode to use it as a button.</p>
<pre class="actionscript"><ol start="194"><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// activate the button</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">myBtn.<span style="color: #006600;">buttonMode</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">myBtn.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, grabURL<span style="color: #66cc66;">&#41;</span>;</div></li></ol></pre>
<p>Once you've activated your movieClip and you've created an event listener to handle a mouse click, you're ready to create your URLRequest.</p>
<pre class="actionscript"><ol start="225"><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> grabURL<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> myRequest:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://twitter.com/&quot;</span>+screenName+<span style="color: #ff0000;">&quot;/statuses/&quot;</span>+currentID<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	navigateToURL<span style="color: #66cc66;">&#40;</span>myRequest<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>;</div></li></ol></pre>
<p>That's it, the rest was pretty easy to switch over. </p>
<p>You can grab the <a href="http://davecurry.net/myTweets/myTweetsAS3.zip">source files here</a> and you can see it <a href="http://davecurry.net/myTweets/as3.html">embedded fullscreen here</a>.</p>
<p>BTW, I didn't use the Twitter flash api that Twitter has on their site because I prefer XML to JSON.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davecurry.net/2007/10/21/talking-to-twitter-via-actionscript-30/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>myTweets Twitter Flash Badge</title>
		<link>http://www.davecurry.net/2007/10/07/mytweets-twitter-flash-badge/</link>
		<comments>http://www.davecurry.net/2007/10/07/mytweets-twitter-flash-badge/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 00:57:57 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.jdavidcurry.com/2007/10/07/mytweets-twitter-flash-badge/</guid>
		<description><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_myTweets_1587486430"
			class="flashmovie"
			width="440"
			height="170">
	<param name="movie" value="http://www.jdavidcurry.com/_swf/myTweets.swf" />
	<param name="bgcolor" value="#A7E1E6" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.jdavidcurry.com/_swf/myTweets.swf"
			name="fm_myTweets_1587486430"
			width="440"
			height="170">
		<param name="bgcolor" value="#A7E1E6" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
UPDATE: Twitter modified their crossdomain policy, which put an end to the flash fun. In other words, this doesn't work anymore. *sigh*
I wanted a Twitter badge for my site and Twitter is so easy to work with that I decided to whip one up that anyone can use.
The myTweets flash [...]]]></description>
			<content:encoded><![CDATA[<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_myTweets_736889440"
			class="flashmovie"
			width="440"
			height="170">
	<param name="movie" value="http://www.jdavidcurry.com/_swf/myTweets.swf" />
	<param name="bgcolor" value="#A7E1E6" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.jdavidcurry.com/_swf/myTweets.swf"
			name="fm_myTweets_736889440"
			width="440"
			height="170">
		<param name="bgcolor" value="#A7E1E6" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></div>
<p><strong>UPDATE: Twitter modified their <a href="http://twitter.com/crossdomain.xml">crossdomain</a> policy, which put an end to the flash fun. In other words, this doesn't work anymore. *sigh*</strong></p>
<p>I wanted a Twitter badge for my site and Twitter is so easy to work with that I decided to whip one up that anyone can use.</p>
<p>The myTweets flash badge displays up to twenty of your public timeline tweets and offers a few customization options via flashVars.</p>
<p><code>var so = new SWFObject("myTweets.swf", "myTweets", "100%", "100%", "8", "#333333");<br/><br />
so.addVariable("userID", "1905521");<br/><br />
so.addVariable("total", "10");<br/><br />
so.addVariable("timer", "8");<br/><br />
so.addVariable("dateHex", "0xEAEAEA");<br/><br />
so.write("flashcontent");</code></p>
<p><b>bgcolor</b> - via the embed<br/><br />
<b>userID</b> - mine is 1905521<br/><br />
<b>total</b> - total number of tweets you want to display, up to 20<br/><br />
<b>timer</b> - time between tweets in seconds<br/><br />
<b>dateHex</b> - color of the date Twittered text</p>
<p>The example above is at <a href="http://davecurry.net/myTweets/" target="_new">http://davecurry.net/myTweets/</a>. </p>
<p>If you'd like to put myTweets on your site, here's a <a href="http://davecurry.net/myTweets/myTweets.zip">zip of the example</a>.</p>
<p><strong>Update:</strong> I've written an AS3 version too. Check out <a href="http://www.jdavidcurry.com/2007/10/21/talking-to-twitter-via-actionscript-30/">Talking to Twitter via Actionscript 3.0</a> for more info and source files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davecurry.net/2007/10/07/mytweets-twitter-flash-badge/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Band Trivia Update – Identify 270 Bands XLS and More</title>
		<link>http://www.davecurry.net/2007/07/07/band-trivia-update-identify-270-bands-xls-and-more/</link>
		<comments>http://www.davecurry.net/2007/07/07/band-trivia-update-identify-270-bands-xls-and-more/#comments</comments>
		<pubDate>Sat, 07 Jul 2007 16:03:05 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://www.jdavidcurry.com/2007/07/07/band-trivia-update-identify-270-bands-xls-and-more/</guid>
		<description><![CDATA[
Since the original post I've gotten a whole slew of requests for this file and thankfully a friend of mine found the website that it came from. Without further ado, here are the links to the XLS, its answer key, and a challenging solo artist quiz too.
Group Artists Quiz:
http://mega-quiz.com/quizzes/others/Groups.xls
http://mega-quiz.com/quizzes/others/Groups_Answers.jpg
Solo Artists Quiz:
http://mega-quiz.com/quizzes/others/Solo%20Artists.xls
And the source page, with [...]]]></description>
			<content:encoded><![CDATA[<div class="img"><a href="http://flickr.com/photos/daveandfaye/sets/72157594269501738/" target="_new"><img src="http://static.flickr.com/80/234566565_7f728359d8_o.jpg" width="430" height="243" border="0" alt="Band Trivia" /></a></div>
<p>Since the original post I've gotten a whole slew of requests for this file and thankfully a friend of mine found the website that it came from. Without further ado, here are the links to the XLS, its answer key, and a challenging solo artist quiz too.</p>
<p>Group Artists Quiz:<br/><br />
<a href="http://mega-quiz.com/quizzes/others/Groups.xls" target="_new">http://mega-quiz.com/quizzes/others/Groups.xls</a><br/><br />
<a href="http://mega-quiz.com/quizzes/others/Groups_Answers.jpg" target="_new">http://mega-quiz.com/quizzes/others/Groups_Answers.jpg</a></p>
<p>Solo Artists Quiz:<br/><br />
<a href="http://mega-quiz.com/quizzes/others/Solo%20Artists.xls" target="_new">http://mega-quiz.com/quizzes/others/Solo%20Artists.xls</a></p>
<p>And the source page, with many other quizzes, is here:<br/><br />
<a href="http://mega-quiz.com/quizzes/others/others.php" target="_new">http://mega-quiz.com/quizzes/others/others.php</a></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davecurry.net/2007/07/07/band-trivia-update-identify-270-bands-xls-and-more/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
