<?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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>orangeSPLoTCH</title>
	
	<link>http://orangesplotch.com/blog</link>
	<description>Web developing in the middle of the night.</description>
	<lastBuildDate>Wed, 25 Aug 2010 11:45:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<feedburner:info uri="orangesplotch" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.0/</creativeCommons:license><image><link>http://orangeSPLoTCH.com/</link><url>http://orangesplotch.com/media/images/logo/splotch100.jpg</url><title>orangeSPLoTCH</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://orangesplotch.com/blog/feed" /><item>
		<title>Update on Javascript tutorials</title>
		<link>http://feedproxy.google.com/~r/orangesplotch/~3/wVofLdy7JYc/</link>
		<comments>http://orangesplotch.com/blog/update-on-javascript-tutorials/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 11:45:40 +0000</pubDate>
		<dc:creator>mattc</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Site]]></category>

		<guid isPermaLink="false">http://orangesplotch.com/blog/?p=305</guid>
		<description><![CDATA[The summer is just about over and I don&#8217;t have any javascript tutorials to show for it. That isn&#8217;t to say I haven&#8217;t been busy working on them, though. In fact, I&#8217;ve been doing a lot of work behind the scenes to upgrade this whole site. As usual it&#8217;s taking much longer than I intended [...]]]></description>
			<content:encoded><![CDATA[<p>The summer is just about over and I don&#8217;t have any javascript tutorials to show for it. That isn&#8217;t to say I haven&#8217;t been busy working on them, though. In fact, I&#8217;ve been doing a lot of work behind the scenes to upgrade this whole site. As usual it&#8217;s taking much longer than I intended and is slowing up all of my other endeavors. </p>
<p>Instead of waiting for everything to be pixel-perfect, I&#8217;ll be updating the blog here shortly with the changes. That way I can start publishing tutorials again. And instead of forcing everything to be perfect before I upgrade the site, I&#8217;ll probably continue tweaking things indefinitely from here on out.</p>
<p>Look for some changes, and those promised tutorials soon.</p>
<img src="http://feeds.feedburner.com/~r/orangesplotch/~4/wVofLdy7JYc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://orangesplotch.com/blog/update-on-javascript-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://orangesplotch.com/blog/update-on-javascript-tutorials/</feedburner:origLink></item>
		<item>
		<title>Flash is dead</title>
		<link>http://feedproxy.google.com/~r/orangesplotch/~3/rINNCCG_iH4/</link>
		<comments>http://orangesplotch.com/blog/flash-is-dead/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 05:51:53 +0000</pubDate>
		<dc:creator>mattc</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://orangesplotch.com/blog/?p=301</guid>
		<description><![CDATA[According to all of the buzz on the interweb these days, Flash is dead. While I doubt that is the case, I do think that there are a lot more things that can now be done without Flash. And I intend to test out that concept throughout the year with some fresh new tutorials.]]></description>
			<content:encoded><![CDATA[<p class="intro">With the release of the iPad this Saturday, Flash is officially dead.</p>
<p>No, I really don’t believe that, but there are plenty of people who do.</p>
<p>To make things a little interesting, this year I’m going to focus on recreating several of my Actionscript tutorials using Javascript instead. We’ll see how succesful I am. In any case it should mean that I end up learning a whole lot. Hopefully any readers who come across these tutorials will learn something, too.</p>
<img src="http://feeds.feedburner.com/~r/orangesplotch/~4/rINNCCG_iH4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://orangesplotch.com/blog/flash-is-dead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://orangesplotch.com/blog/flash-is-dead/</feedburner:origLink></item>
		<item>
		<title>SwfObj Version 0.9.2</title>
		<link>http://feedproxy.google.com/~r/orangesplotch/~3/ndMasGLkYjk/</link>
		<comments>http://orangesplotch.com/blog/swfobj-version-0-9-2/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 05:17:48 +0000</pubDate>
		<dc:creator>mattc</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[SwfObj]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[swfobject]]></category>
		<category><![CDATA[wp plugin]]></category>

		<guid isPermaLink="false">http://orangesplotch.com/blog/?p=252</guid>
		<description><![CDATA[The latest release of SwfObj adds the option to embed your Flash objects dynamically. Now SwfObj fully takes advantage of the SwfObject Javascript library.]]></description>
			<content:encoded><![CDATA[<p class="intro">Big changes are finally here in SwfObj land. Thanks to the encouragement of fantastic SwfObj users, such as yourself, I&#8217;ve mustered up the motivation to implement what I consider to be a major feature. Dynamic Embedding of Flash objects is finally available with SwfObj.</p>
<h3>Dynamic vs. Static Embedding</h3>
<p>Prior to this release, the only option for embedding Flash objects with SwfObj, was statically. This embeds the objects directly into the html rendered by WordPress.</p>
<p>By dynamically embedding them, WordPress instead places a <code>div</code> tag on the page that holds the alternative content only. Once the page has loaded, Javascript replaces this alternative content with the Flash object.</p>
<p>I&#8217;ll defer you to the official SwfObject project for <a href="http://code.google.com/p/swfobject/wiki/documentation#Should_I_use_the_static_or_dynamic_publishing_method?">the advantages and disadvantages of either SwfObject embedding method</a>.</p>
<h3>How to embed objects dynamically</h3>
<p>By default, SwfObj is set to embed statically. If you would rather use dynamic embedding by default on your site, it is very easy to change the settings. Go to Settings > SwfObj and in &#8220;Default Embedding Mode&#8221; select &#8220;Dynamic Publishing&#8221;. Save your changes and you&#8217;re all set.</p>
<p>If you ever want to use the other method for a particular post, you can override the default with the new <code>dynamic_embed</code> attribute. Here are a couple examples.</p>
<pre>&#91;swfobj src="..." dynamic_embed="true"&#93; &larr; <em>(embedded dynamically)</em>
&#91;swfobj src="..." dynamic_embed="false"&#93; &larr; <em>(embedded statically)</em>
</pre>
<h3>Other developments</h3>
<p>In more exciting news, <a href="http://noscope.com/">Joen Asmussen</a> the developer behind the <a href="http://wordpress.org/extend/plugins/flash-shorttags-swfobject/">Flash Shorttags SwfObject Plugin</a> requested that I merge in features from his plugin so he could discontinue it in favor of SwfObj. As a result, you can also use the &#91;flash&#93; shorttag to embed your Flash objects. I really appreciate Joen approaching me about merging our two plugins. It makes things simpler for everyone out there looking for an easier way to embed Flash on their WordPress site.</p>
<p>I originally developed this plugin for myself because embedding Flash was such a pain. It&#8217;s been great to see so many other people getting value from it as well. Thanks to your help and suggestions SwfObj continues to improve. Please continue to send any comments or suggestions you may have as you use it on your sites. And if you really want to show your appreciation, feel free to <a href="http://orangesplotch.com/freelunch">buy me lunch</a>.</p>
<img src="http://feeds.feedburner.com/~r/orangesplotch/~4/ndMasGLkYjk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://orangesplotch.com/blog/swfobj-version-0-9-2/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		<feedburner:origLink>http://orangesplotch.com/blog/swfobj-version-0-9-2/</feedburner:origLink></item>
		<item>
		<title>SwfObj Updates for WP 2.8</title>
		<link>http://feedproxy.google.com/~r/orangesplotch/~3/v0uqP1iQ4Tg/</link>
		<comments>http://orangesplotch.com/blog/swfobj-updates-for-wp-2-8/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 02:48:19 +0000</pubDate>
		<dc:creator>mattc</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[SwfObj]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wp 2.8]]></category>

		<guid isPermaLink="false">http://orangesplotch.com/blog/?p=220</guid>
		<description><![CDATA[New release of SwfObj hot off the press. This release uses the newly updated SwfObject 2.2 code as well as fixes an issue for Wordpress users who place their wp-content somewhere other than the default location.]]></description>
			<content:encoded><![CDATA[<p class="intro">
Wordpress just recently released the latest version of their open source blogging platform. Plugin developers everywhere are busy updating their plugins. At least those who procrastinate. SwfObj is no exception. We love jumping on the bandwagon here.
</p>
<p>Actually, I thought SwfObj was ready for the WordPress upgrade. I use a beta version to try and stay ahead of the curve. The plugin worked fine in my beta so it was good. Then I came across <a href="http://plugincheck.bravenewcode.com/">BraveNewCode&#8217;s plugin checker</a> and discovered the SwfObj plugin was breaking a cardinal rule. <strong>FAIL!</strong></p>
<h3>Plugin No-No</h3>
<p>According to the plugin checker, my plugin was not compatible with the latest WordPress release for the following reason:<br />
<blockquote>Uses &#8216;wp-content&#8217; directly in code</p></blockquote>
<p>Translated, this means I was hardcoding the <code>wp-content</code> path in my plugin, rather than using the <code>WP_PLUGIN_URL</code> constant. </p>
<p>As of WordPress 2.6, the <code>wp-content</code> directory can be located anywhere the site admin wants it to be. By hardcoding this path, anyone who had moved it would get errors when they tried to use the SwfObj plugin. There&#8217;s a good post on how to <a href="http://willnorris.com/2009/05/wordpress-plugin-pet-peeve-hardcoding-wp-content">correct the wp-content hardcoding problem</a> if you are guilty of it too.</p>
<h3>SwfObject 2.2</h3>
<p>SwfObject also released an update. In response, I&#8217;ve updated SwfObj to use the latest SwfObject code, version 2.2. Onward and upward we go!</p>
<p class="aside">And there you have it, the latest SwfObj build. An updated SwfObject release and some compatibility fixes. All are available now at a <a href="http://wordpress.org/extend/plugins/swfobj/">WordPress repository near you</a>.</p>
<img src="http://feeds.feedburner.com/~r/orangesplotch/~4/v0uqP1iQ4Tg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://orangesplotch.com/blog/swfobj-updates-for-wp-2-8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://orangesplotch.com/blog/swfobj-updates-for-wp-2-8/</feedburner:origLink></item>
		<item>
		<title>Flash Tutorial: Eyes Following the Mouse</title>
		<link>http://feedproxy.google.com/~r/orangesplotch/~3/1oiAwd8R_8s/</link>
		<comments>http://orangesplotch.com/blog/flash-tutorial-eyes-following-the-mouse/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 13:59:25 +0000</pubDate>
		<dc:creator>mattc</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[eye-roll]]></category>
		<category><![CDATA[eyes]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[motion]]></category>

		<guid isPermaLink="false">http://orangesplotch.com/blog/?p=158</guid>
		<description><![CDATA[Have you ever seen those paintings where the eyes are always looking at you no matter where you stand. Well, sorry, this tutorial won't teach you anything about painting. This simple Flash tutorial goes over how to make a pair of eyes follow the mouse using Actionscript.]]></description>
			<content:encoded><![CDATA[<p class="intro">Have you ever seen those paintings where the eyes are always looking at you no matter where you stand. Well, sorry, this tutorial won&#8217;t teach you anything about painting. This simple Flash tutorial goes over how to make a pair of eyes follow the mouse using Actionscript.</p>
<p><a href="#rollingeyes-source">Jump straight to the source code</a> if you&#8217;d like to skip the details.</p>

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfobj_0" width="500" height="196" class="align-right bordered">
      <param name="movie" value="http://orangesplotch.com/blog/wp-content/uploads/2009/04/rollingeyes.swf" />
      <param name="wmode" value="transparent" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://orangesplotch.com/blog/wp-content/uploads/2009/04/rollingeyes.swf" width="500" height="196" wmode="transparent">
      <!--<![endif]-->
        
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>

<h3>The eye</h3>
<p>First you need to create three <code>Sprites</code> for each eye. The pupil, the eye, and the mask for the pupil. The mask for the pupil needs to be identical in shape to the part of the eye where the pupil shows. In my case, the eye and the mask for the eye are identical circles. To make things easier on yourself, the registration point for both the pupil and the eye should be located at the center of each.</p>
<p>For this tutorial, I&#8217;ll be doing everything in basic Actionscript. However, you are free to use images or <code>MovieClip</code>s for your eyes. In fact I&#8217;d encourage it, as that will look way better than my goofy circle eyes.</p>
<p class="note">I&#8217;m not going to bother pasting my eyeball creation and placement Actionscript here, since it isn&#8217;t important to the tutorial. If you really want to see it, just <a href="#rollingeyes-source">download the source code</a> at the bottom of the article.</a></p>
<p>So now that you have your eye, pupil and mask, place them on the screen wherever you want. Make sure you mask the pupils with the mask object. Otherwise you&#8217;ll have some weird floating pupil effect. Again, I&#8217;m doing all of this in the Actionscript, but you are free to manually place everything on the stage. That&#8217;s actually the easier way to do it, since you can see exactly where they are going. </p>
<h3>It follows me everywhere I go</h3>
<p>Ok, enough talk about making and placing eyeballs on the stage. The real reason you are reading this is to see how to get your eyes to follow the mouse. As I said before, the code is really simple. </p>
<p>First calculate the offset between the mouse position and your eye. In this case I have two eyes, so I created the <code>_focalPoint</code> object to compare against. My <code>_focalPoint</code> is located right between the two eyes. This allows both eyes to move together in uniform instead of getting cross-eyed in the middle. The following code goes in your <code>EnterFrame</code> handler function.</p>
<pre>// calculate mouse offset
var distx:Number = mouseX - _focalPoint.x;
var disty:Number = mouseY - _focalPoint.y;</pre>
<p>Finally we reposition the pupils based on this offset. You will notice that we are scaling down <code>distx</code> and <code>disty</code>. This is so the eyes don&#8217;t move so far that they are no longer visible. I am using a factor of 25. You may need to change this depending on how wide or thin your stage is and where you position the eyes. Experiment a little to get it just right.</p>
<pre>// set the eyes according to the mouse offset
_pupil1.x = _eye1.x + (distx / 25);
_pupil1.y = _eye1.y + (disty / 25);
_pupil2.x = _eye2.x + (distx / 25);
_pupil2.y = _eye2.y + (disty / 25);</pre>
<p>Because we set the registration point of both the eye and the pupil Sprites, we can use the eye <code>.x</code> and <code>.y</code> properties to place the pupil. This makes the code a lot cleaner as you can see.</p>
<p>And there you go. Nice rolling eyes going everywhere your mouse goes. Like I said, it&#8217;s a very easy effect to make once you know how to do it. No complex trig. No fancy classes. Just plain simple Actionscript.</p>
<h3>Eye Following Downloads</h3>
<ul id="rollingeyes-source" class="downloads">
<li><a title="Download the source file used in this tutorial." type="zip" href="http://orangesplotch.com/files/RollingEyes.zip">Rolling Eyes Actionscript 3.0 source file.</a></li>
</ul>
<p>If you have any questions, please let me know either in the comments below or through the <a href="http://orangesplotch.com/contact/">contact form</a>. I&#8217;d love to see what you guys come up with this. So go set your mouse following eyeballs free. Enjoy!</p>
<img src="http://feeds.feedburner.com/~r/orangesplotch/~4/1oiAwd8R_8s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://orangesplotch.com/blog/flash-tutorial-eyes-following-the-mouse/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://orangesplotch.com/blog/flash-tutorial-eyes-following-the-mouse/</feedburner:origLink></item>
		<item>
		<title>Tutorial: Polar Coordinate Plotting in Actionscript</title>
		<link>http://feedproxy.google.com/~r/orangesplotch/~3/AU-lytBDWlM/</link>
		<comments>http://orangesplotch.com/blog/tutorial-polar-coordinate-plotting-in-actionscript/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 14:52:26 +0000</pubDate>
		<dc:creator>mattc</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[plot]]></category>
		<category><![CDATA[polar coordinates]]></category>

		<guid isPermaLink="false">http://orangesplotch.com/blog/?p=102</guid>
		<description><![CDATA[If you are trying to generate effects in a circular pattern, like a planet's orbit then polar coordinates are the way to go. Here's a brief discussion on the topic of polar coordinate plotting inFlash to create some very cool rotating effects without a lot of effort.]]></description>
			<content:encoded><![CDATA[<p class="intro">A long, long time ago someone requested that I post a tutorial based on some polar coordinate experiments I was doing. I think it&#8217;s about time to get this post published.<br />As usual, if you are just interested in the code, you can <a href="#polarcoordinate-downloads">skip straight to the source</a>.</p>
<h3>Polar Coordinate Basics</h3>
<p>In Flash, like most other graphics applications, elements are positioned using the Cartesian coordinate system. While you may not be familiar with the name, you are probably familiar with the way it works. Location coordinates are set using x and y positions. &#8220;x&#8221; represents a horizontal offset from the origin <em>(top left corner of the screen)</em>, and &#8220;y&#8221; represents the vertical offset from the origin.</p>
<p>The polar coordinate system also uses two values, r and θ (theta). &#8220;r&#8221; is the radial distance from the origin, and &#8220;θ&#8221; is the angular offset from 0 <em>(a line going straight up from the origin)</em>. The following image shows the differences between the two coordinate systems.</p>
<p><img src="http://orangesplotch.com/blog/wp-content/uploads/2009/03/polar-coordinates.png" alt="Plotting a point using cartesian and polar coordinates." title="Cartesian vs. Polar Coordinates" width="380" height="150" class="bordered" /></p>
<p>That&#8217;s all the explaining of the two coordinate systems that I&#8217;ll waste your time with here. If you&#8217;d like to learn more about them, you can consult Wikipedia.</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Polar_coordinate_system">http://en.wikipedia.org/wiki/Polar_coordinate_system</a></li>
<li><a href="http://en.wikipedia.org/wiki/Cartesian_coordinate_system">http://en.wikipedia.org/wiki/Cartesian_coordinate_system</a></li>
<ul>
<p>So why do we care? When positioning things in Flash, it is usually easier to use the default Cartesian (x, y) system. However, for positioning objects that rotate around a fixed point, the Polar Coordinate system is much more efficient.</p>
<p>For example, here are two ways to move an object in a circle around the screen. One uses Cartesian coordinates and one uses Polar coordinates.</p>
<pre>// Cartesian coordinate circle
obj.x = radius * cos(t);
obj.y = radius * sin(t);
t += increment;

// Polar coordinate circle
obj.theta += increment;</pre>
<p>As you can see the code is much simpler in the Polar coordinate example. We didn&#8217;t have to deal with cos or sin, and we only had to change one value of the object (θ) since the radius of the circle doesn&#8217;t change. Are you convinced?</p>
<p>Unfortunately Flash does not directly support Polar coordinate plotting. It&#8217;s an easy problem to get around, though. For my work, I&#8217;ve created an Actionscript class derived from the Sprite class which adds Polar coordinate functionality. I call it PolarSprite. How&#8217;s that for creative! I&#8217;m not going to pretend that I&#8217;m the first person to have done this, or that my class is the most elegant/efficient one out there. But it works great for me.</p>
<h3>How to go Polar</h3>
<p>I&#8217;m not going to go into the details of my PolarSprite class. You can look at the source code if you really want to see how it works. However, I will quickly show you the translation from polar coordinates (r, θ) to Cartesian coordinates (x, y).</p>
<pre>x = offset_x + r * Math.cos( theta );
y = offset_y + r * Math.sin( theta );</pre>
<p>The offsets are used to set the origin of the polar coordinate somewhere away from the top left corner of the screen. Usually, you want the center of the rotation to be in the center of the screen when you have an object orbiting around in a circle.</p>
<h3>Experimenting in Polar</h3>
<p>Now that you know how to translate from the Polar coordinate frame into the Cartesian, the real fun begins. Here is some example AS3 code using the PolarSprite class to make an object move in a simple circle.</p>

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfobj_1" width="500" height="180">
      <param name="movie" value="http://orangesplotch.com/blog/wp-content/uploads/2008/07/polarcircle.swf" />
      <param name="wmode" value="opaque" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://orangesplotch.com/blog/wp-content/uploads/2008/07/polarcircle.swf" width="500" height="180" wmode="opaque">
      <!--<![endif]-->
        
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>

<pre>public function PolarCircle(){
  // create and initialize the animation
  inc = 0.1; // how much to rotate each frame
  hero = new PolarSprite();
  hero.SetOrigin(250, 50);
  hero.r = 50; // radius of the circle animation
  hero.addChild(new BigHero()); // BigHero is the flying guy graphic
  hero.addEventListener(Event.ENTER_FRAME, this.Rotate);
  addChild(hero);
}

private function Rotate(event:Event):void {
  // rotate the image in a circle
  hero.theta += inc;
}</pre>
<p>And there you go. Flying, polar-coordinate Flash fun. For all my talking, it really isn&#8217;t that complicated to do. In a later post I&#8217;ll go over ways to get some really cool variations in your animations, but for now, here&#8217;s a little teaser.</p>

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfobj_2" width="500" height="180" class="align-right">
      <param name="movie" value="http://orangesplotch.com/blog/wp-content/uploads/2009/04/polarexample1.swf" />
      <param name="wmode" value="opaque" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://orangesplotch.com/blog/wp-content/uploads/2009/04/polarexample1.swf" width="500" height="180" wmode="opaque">
      <!--<![endif]-->
        
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>

<h3>Polar Source</h3>
<p>Here are the source files for your downloading pleasure. Feel free to use them however you&#8217;d like. And if you really want to make my day, send me a link so I can check out your work. Enjoy!</p>
<ul id="polarcoordinate-downloads" class="downloads">
<li><a title="Download the source files used in this tutorial." type="zip" href="http://orangesplotch.com/files/PolarCoordinateExamples.zip">Polar Coordinate Actionscript 3.0 source files.</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/orangesplotch/~4/AU-lytBDWlM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://orangesplotch.com/blog/tutorial-polar-coordinate-plotting-in-actionscript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://orangesplotch.com/blog/tutorial-polar-coordinate-plotting-in-actionscript/</feedburner:origLink></item>
		<item>
		<title>Ciales: That once our eyes watered</title>
		<link>http://feedproxy.google.com/~r/orangesplotch/~3/lvGjTLbBOVY/</link>
		<comments>http://orangesplotch.com/blog/ciales-that-once-our-eyes-watered/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 16:02:42 +0000</pubDate>
		<dc:creator>mattc</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[SPLoTCH]]></category>
		<category><![CDATA[album]]></category>
		<category><![CDATA[ciales]]></category>
		<category><![CDATA[cover]]></category>
		<category><![CDATA[wikipedia]]></category>

		<guid isPermaLink="false">http://orangesplotch.com/blog/?p=164</guid>
		<description><![CDATA[Combine Wikipedia, Flickr and random and you get the next hit music album. If you do any sort of graphic design and need a quick side project, this is a fun one to do.]]></description>
			<content:encoded><![CDATA[<p class="intro"><a href="http://aviary.com/artists/splotch/images/ciales_that_once_our_eyes_watered"><img alt="" src="http://aviary.com/viewfull?fguid=da4693e0-562e-102c-b565-0030488e168c" title="Ciales: That once our eyes watered" width="400" height="400" /></a></p>
<h3>My New Favorite Album</h3>
<p>Ok, not really. I put this together on a dare from a friend to go to this page and do what it said: <a href="http://www.buzzfeed.com/peggy/wikipedia-names-your-band" title="Wikipedia names your band">http://www.buzzfeed.com/peggy/wikipedia-names-your-band</a>. Basically, you generate some random results on a few sites and throw them together into the next &#8220;<strong>album of the year</strong>&#8220;. My random amalgamation resulted in this album cover. Why Wikipedia chose Ciales for me, I&#8217;ll never know.</p>
<p>Go try out your own luck.</p>
<p>By the way, that big Aviary stamp at the bottom is because I made this in <a href="http://aviary.com/artists/splotch">Aviary</a> while taking a five minute break at work. If you are interested, Aviary has some really nice online image editing programs. I assume if you have a paid account, they won&#8217;t put their logo on everything you make.</p>
<p class="aside">I&#8217;m sure I&#8217;ll be getting some interesting search referrals on this post.</p>
<img src="http://feeds.feedburner.com/~r/orangesplotch/~4/lvGjTLbBOVY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://orangesplotch.com/blog/ciales-that-once-our-eyes-watered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://orangesplotch.com/blog/ciales-that-once-our-eyes-watered/</feedburner:origLink></item>
		<item>
		<title>Feedburner torched my feeds</title>
		<link>http://feedproxy.google.com/~r/orangesplotch/~3/PH-VucJgEg4/</link>
		<comments>http://orangesplotch.com/blog/feedburner-torched-my-feeds/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 17:50:19 +0000</pubDate>
		<dc:creator>mattc</dc:creator>
				<category><![CDATA[Site]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[atom]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[feed reader]]></category>
		<category><![CDATA[feedburner]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[useragent]]></category>

		<guid isPermaLink="false">http://orangesplotch.com/blog/?p=153</guid>
		<description><![CDATA[Watch out for vanishing feeds. My Feedburner blog feed was returning a 404 File Not Found error when I tried accessing it through PHP, but showed up fine in my browser. It took a while to figure out what was going on. If anyone else is having the same problem, hopefully this article will help.]]></description>
			<content:encoded><![CDATA[<p class="intro">I&#8217;m not sure exactly how long ago, I&#8217;m guessing over a month, <a href="http://www.feedburner.com">Feedburner</a> changed the way their feeds are handled and broke my homepage. It wasn&#8217;t until this week that I discovered the problem. And then it took several days to figure out what was going wrong. Now that it is resolved, I thought it might be nice to pass along the fix in case anyone else is having similar issues.</p>
<p>I import my blog feed into <a href="http://orangesplotch.com/">my site&#8217;s homepage</a>. It seemed like a good idea to put the latest articles there. To distribute my feed, I&#8217;ve been using Feedburner because of all the handy features they provide for at no charge. Recently when I went to take a gander at my home page to my horror, the articles section was blank. GASP! Turning on error reporting revealed that my feed parser was getting a &#8220;404 Page not found&#8221; response from Feedburner. However, when I view the feed in my browser, it showed up fine.</p>
<h3>Feed Flame-out</h3>
<p>Apparently Feedburner and other Google feed distributors have waged war against bad feed readers that don&#8217;t properly cache results. Depending on the number of page views, these readers can end up requesting a feed thousands of times a day. A cached feed need only be updated sporadically throughout the day.</p>
<h3>Fight Fire with Fake UserAgents</h3>
<p>The way that Feedburner and Blogger decipher whether a feed is coming from a credible source, or from an abusive one is via the User Agent. Anything that doesn&#8217;t have a User Agent defined, or that has the User Agent defined as one of the offending services gets the &#8220;404 Page not found&#8221; error. Regular browsers like Firefox, and Internet Explorer get the feed without any hiccups.</p>
<p>In my case, my original feed parser wasn&#8217;t passing a user agent when it made the request, so it got a 404 error. Thinking my parser was broken I switched to <a href="http://simplepie.org/">SimplePie</a>. SimplePie got the same error which is when I started to investigate further. While SimplePie does use a valid useragent, it has been blacklisted by Google. Apparently a lot of developers using SimplePie run it with caching disabled. To finally get it working I had to remove the SIMPLEPIE_USERAGENT from the useragent string. It is a simple fix in SimplePie if you know to do it. I just added the following line as explained in the <a href="http://simplepie.org/wiki/reference/simplepie/set_useragent">SimplePie API</a>.</p>
<pre>$feed->set_useragent('Mozilla/4.0');</pre>
<p>Despite endorsing these sneaky habits, I&#8217;d like to go on the record as supporting being a good netizen and caching all of your external sources locally. Your site will be faster because it won&#8217;t have to reload the feed each time a user visits the page, and you won&#8217;t be burning up someone else&#8217;s bandwidth as well. It&#8217;s a win-win.</p>
<p>Depending on the feed parser you are using, you may have a more difficult time setting the useragent to properly bypass this issue. Here are a couple of other links that may help.</p>
<p>http://blog.obishawn.com/2008/06/feedburner-404-error.html</p>
<p>http://weblogs.asp.net/jstengel/archive/2008/07/24/useragent-fix-for-the-rsstoolkit-2-0-0-0.aspx</p>
<p>And there you have it. Now you have to tools to fix your broken feed requests. At least until something else breaks.</p>
<div class="aside">
<h3>Final Flame</h3>
<p>So right before publishing this, I find out that Feedburner is about to burn out completely. Feb 28th is the final day to move your feeds over to Google. After that your feed links will return a 404 File Not Found error. More info on the move here: <a href="http://www.dailyblogtips.com/time-to-switch-from-feedburner-to-google/">http://www.dailyblogtips.com/time-to-switch-from-feedburner-to-google/</a> I&#8217;ll be transferring my feed right now.
</div>
<img src="http://feeds.feedburner.com/~r/orangesplotch/~4/PH-VucJgEg4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://orangesplotch.com/blog/feedburner-torched-my-feeds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://orangesplotch.com/blog/feedburner-torched-my-feeds/</feedburner:origLink></item>
		<item>
		<title>An experiment in greed</title>
		<link>http://feedproxy.google.com/~r/orangesplotch/~3/0T5H84Lr954/</link>
		<comments>http://orangesplotch.com/blog/an-experiment-in-greed/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 19:43:54 +0000</pubDate>
		<dc:creator>mattc</dc:creator>
				<category><![CDATA[SPLoTCH]]></category>
		<category><![CDATA[Site]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[ads]]></category>
		<category><![CDATA[adsense]]></category>
		<category><![CDATA[income]]></category>
		<category><![CDATA[revenue]]></category>

		<guid isPermaLink="false">http://orangesplotch.com/blog/?p=143</guid>
		<description><![CDATA[So for the past month-ish I've been trying out a little experiment. I added an extra ad block to my articles page to see if I suddenly saw a dramatic increase in advertising revenue on the site. And here we are a month later.]]></description>
			<content:encoded><![CDATA[<p class="intro">So for the past month-ish I&#8217;ve been trying out a little experiment. I added an extra ad block to my articles page to see if I suddenly saw a dramatic increase in advertising revenue on the site.</p>
<p>I was hoping that advertising might help offset some of the costs of hosting this website. I&#8217;m not paying too much to host it and it wouldn&#8217;t take that much advertising revenue to pay for it. Why not give it a try?</p>
<h3>The Scientific Method</h3>
<p>Being an experiment, I&#8217;d better pull out some of my 6th grade science reports to make sure I document this properly. Feel free to correct me on my methods. Especially if you are currently in elementary school and therefore have the scientific method fresh in your young sponge-like minds.</p>
<h4>Hypothesis</h4>
<p>I&#8217;ve always had text ads in the sidebar and recently I&#8217;ve started to see a trickling of change come in each month as a result. My very official hypothesis is the following:</p>
<blockquote><p>Adding an additional adblock in the main content area of my site will result in more advertising revenue.</p></blockquote>
<p>Seems like a logical assumption to me.</p>
<h4>Procedure</h4>
<p>I added a new advertising block to the main content column of my site. Admittedly, I&#8217;m not a big fan of ads, so I tried to place the new block as discretely as possible. It slipped into the related entries block just below each article.</p>
<p><img src="http://orangesplotch.com/blog/wp-content/uploads/2009/01/adshot.png" alt="Adblock Screenshot." width="465" height="217" class="align-right size-full wp-image-146" /></p>
<p>The block is in a good contextual location where users are likely to look after finishing an article. Ads here lead the user to content related to the page they are on and thus enhance the user experience. Like I said, I&#8217;m not a big fan of ads, so if I am going to use them, then they are going to be as un-annoying as possible. A bit of an oximoron, I know.</p>
<h4>Observations</h4>
<ul>
<li>Total advertising revenue from January 1st to January 29th: $0.01.</li>
<li>Total articles posted from January 1st to January 29th: 0.</li>
<li>Number of American presidents inaugurated from January 1st to January 29th: 1.</li>
</ul>
<h4>Conclusion</h4>
<p><strong>It&#8217;s been a bad month.</strong></p>
<p>There are a lot of things I could blame the lack of advertising income on. The continuing global economic collapse. The fact that more Presidents have been inaugurated than I&#8217;ve posted articles this year. Either way, that extra ad block isn&#8217;t pulling its weight. And it&#8217;s annoying. </p>
<p>Unless there is a sudden spontaneous spike in revenue, he is going on the chopping block. Who or what will take his place? Perhaps Mr. Empty-light-blue-box will get his spot back. He certainly looked better there.</p>
<p>This concludes our experiment.</p>
<img src="http://feeds.feedburner.com/~r/orangesplotch/~4/0T5H84Lr954" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://orangesplotch.com/blog/an-experiment-in-greed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://orangesplotch.com/blog/an-experiment-in-greed/</feedburner:origLink></item>
		<item>
		<title>SwfObj 0.7 Ready in Time for the Holidays</title>
		<link>http://feedproxy.google.com/~r/orangesplotch/~3/P9EQCjKFmAQ/</link>
		<comments>http://orangesplotch.com/blog/swfobj-07-ready-in-time-for-the-holidays/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 16:07:26 +0000</pubDate>
		<dc:creator>mattc</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[SwfObj]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[swf]]></category>
		<category><![CDATA[swfobject]]></category>
		<category><![CDATA[wordpress 2.7]]></category>
		<category><![CDATA[wp plugin]]></category>

		<guid isPermaLink="false">http://orangesplotch.com/blog/?p=123</guid>
		<description><![CDATA[WordPress 2.7 required making some changes to SwfObj. Those have been implemented and are currently available in the 0.7 release of SwfObj.]]></description>
			<content:encoded><![CDATA[<p class="intro">To get the holidays rolling right, I&#8217;ve just updated SwfObj. Actually this release is in response to the changes in media handlers with WordPress 2.7. But it still sound nicer to say it&#8217;s just for the holidays.</p>
<h3>From URL</h3>
<p>The main change in 2.7 that necessitated this release is the &#8220;From URL&#8221; tab in the media upload/insert popup. This requires a new handler in the plugin. I also took the time to add all of the features available for uploaded swfs to swfs linked to using the &#8220;From URL&#8221; tab.</p>
<h3>Holiday Bugs</h3>
<p>There are always bugs to be squashed and this release includes a few of fixes as well. One to note is that the alt content is no longer automatically wrapped in <code>&lt;p&gt;</code> tags. This means you can put it in whatever wrapper you&#8217;d like.</p>
<h3>2009 is coming</h3>
<p>I do have some plans for upgrading the project in &#8217;09. The major update I&#8217;d like to make is to enable dynamic embedding of swfs using SwfObject as an alternative to static embedding. I&#8217;ve had a couple of requests for this feature so I know others are looking for it, too.</p>
<p>If you have anything you&#8217;d like to see added/improved in &#8217;09 please let me know.</p>
<p>Thanks again to all who have provided feedback and support. Hope everyone has a happy holiday season!</p>
<img src="http://feeds.feedburner.com/~r/orangesplotch/~4/P9EQCjKFmAQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://orangesplotch.com/blog/swfobj-07-ready-in-time-for-the-holidays/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://orangesplotch.com/blog/swfobj-07-ready-in-time-for-the-holidays/</feedburner:origLink></item>
	</channel>
</rss><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
