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

<channel>
	<title> &#187; following</title>
	<atom:link href="http://rhuno.com/flashblog/tag/following/feed/" rel="self" type="application/rss+xml" />
	<link>http://rhuno.com/flashblog</link>
	<description></description>
	<lastBuildDate>Sat, 18 May 2013 03:28:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Tutorial: Terrain Following in Flash</title>
		<link>http://rhuno.com/flashblog/2012/07/07/tutorial-terrain-following-in-flash/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tutorial-terrain-following-in-flash</link>
		<comments>http://rhuno.com/flashblog/2012/07/07/tutorial-terrain-following-in-flash/#comments</comments>
		<pubDate>Sat, 07 Jul 2012 16:20:42 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[3]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[following]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[terrain]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=730</guid>
		<description><![CDATA[In this tutorial you will learn how to implement a more advanced style of terrain following using Flash and ActionScript 3. Terrain following is a pretty simple concept in a flat or boxy world, but what if you want a more dynamic world with hills and slopes? Things become a little trickier. Luckily, Flash and [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial you will learn how to implement a more advanced style of terrain following using Flash and ActionScript 3.  Terrain following is a pretty simple concept in a flat or boxy world, but what if you want a more dynamic world with hills and slopes?  Things become a little trickier.  Luckily, Flash and AS 3 have some handy built-in functionality that take a lot of the grunt work out of the process.  Let's check it out!<span id="more-730"></span></p>
<p>First, we should define our goal.  The idea is to have a vehicle that can roll over dynamic terrain and properly orient itself while doing so.  Using a vehicle is a bit more complicated than a person or other small character.  With a humanoid character, you can pretty much just use the bottom center of the object as your point of collision and adjust the character's position as needed.  A vehicle is larger than a person and in order to make the terrain following look good, you need to use more than one point of contact.  Additionally, you will need to orient the vehicle with respect to the terrain it is driving over to get a realistic look.  Through the magic of bad photoshopping, I have brought together two NES classics, <em>Adventure Island 2</em> and <em>Excitebike</em>, to illustrate the difference.</p>
<div id="attachment_731" class="wp-caption aligncenter" style="width: 422px"><a href="http://rhuno.com/flashblog/wp-content/uploads/2012/07/slopeExample1.jpg"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/07/slopeExample1.jpg" alt="Character Example" title="slopeExample1" width="412" height="299" class="size-full wp-image-731" /></a><p class="wp-caption-text">A humanoid on a hill</p></div>
<div id="attachment_732" class="wp-caption aligncenter" style="width: 422px"><a href="http://rhuno.com/flashblog/wp-content/uploads/2012/07/slopeExample2.jpg"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/07/slopeExample2.jpg" alt="Bike Example" title="slopeExample2" width="412" height="299" class="size-full wp-image-732" /></a><p class="wp-caption-text">A vehicle on a hill</p></div>
<p>As you can see in the images above, our good friend Master Higgins looks right at home on the sloping terrain.  However, the bike looks a bit odd; that front tire is just floating in mid-air!  Perhaps the rider is exceptionally skilled and is holding a wheelie every time he hits a slope, but I doubt it.  We would expect the bike to orient itself to the terrain as in the image below.</p>
<div id="attachment_733" class="wp-caption aligncenter" style="width: 422px"><a href="http://rhuno.com/flashblog/wp-content/uploads/2012/07/slopeExample3.jpg"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/07/slopeExample3.jpg" alt="Bike Example - Oriented" title="slopeExample3" width="412" height="299" class="size-full wp-image-733" /></a><p class="wp-caption-text">A vehicle oriented to the terrain</p></div>
<p>That looks much better, but how do we go about accomplishing such a feat?  There are probably many ways, but the way I'm going to show you here involves following a line straight down from each wheel until we intersect with the ground.  When we find our point of intersection for both wheels, we will determine the angle between those two points and set the rotation of our vehicle accordingly.  After that, we will adjust the y position of our vehicle with respect to which ever point is greater on the y-axis.</p>
<div id="attachment_734" class="wp-caption aligncenter" style="width: 422px"><a href="http://rhuno.com/flashblog/wp-content/uploads/2012/07/slopeExample4.jpg"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/07/slopeExample4.jpg" alt="Points of contact" title="slopeExample4" width="412" height="299" class="size-full wp-image-734" /></a><p class="wp-caption-text">Find the points of contact and the angle between them</p></div>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2012/07/07/tutorial-terrain-following-in-flash/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>JSFL &#8211; The following Javascript error(s) occurred</title>
		<link>http://rhuno.com/flashblog/2011/02/25/jsfl-the-following-javascript-errors-occurred/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jsfl-the-following-javascript-errors-occurred</link>
		<comments>http://rhuno.com/flashblog/2011/02/25/jsfl-the-following-javascript-errors-occurred/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 20:14:47 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[Flash CS4]]></category>
		<category><![CDATA[Flash CS5]]></category>
		<category><![CDATA[JSFL]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[error(s)]]></category>
		<category><![CDATA[following]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[occurred]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=198</guid>
		<description><![CDATA[When you're working with JSFL, you may notice that Flash doesn't always provide the most useful error messages. Many times when a JSFL error occurs, Flash spits out this message: "The following Javascript error(s) occurred: " It then displays exactly nothing. Obviously, saying that the following errors have occurred and then showing blank text isn't [...]]]></description>
			<content:encoded><![CDATA[<p>When you're working with JSFL, you may notice that Flash doesn't always provide the most useful error messages.  Many times when a JSFL error occurs, Flash spits out this message: "The following Javascript error(s) occurred: " </p>
<p>It then displays exactly nothing.<span id="more-198"></span></p>
<p>Obviously, saying that the following errors have occurred and then showing blank text isn't very helpful.  In some cases, you can get Flash to actually display the error simply by dragging and dropping the JSFL file from the explorer window into the Flash IDE.</p>
<p>For a simple example, I put a bad return in one of my JSFL files.  When I ran the actual panel in Flash and hit the error, I got the "The following JavaScript error(s) occurred:" message followed by nothing.  But when I drag and drop the file into the IDE, I see the following in the output window:</p>
<p>The following JavaScript error(s) occurred:</p>
<p>At line 26 of file "ImportBG.jsfl":<br />
return loadBG();<br />
SyntaxError: invalid return</p>
<p>A small tip, but it can come in handy! </p>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2011/02/25/jsfl-the-following-javascript-errors-occurred/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
