<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Simple AS3 Viewport Tutorial</title>
	<atom:link href="http://hybridmind.com/tutorials/simple-as3-viewport-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://hybridmind.com/tutorials/simple-as3-viewport-tutorial/</link>
	<description>the adventures of</description>
	<lastBuildDate>Sun, 14 Oct 2012 17:27:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Porter</title>
		<link>http://hybridmind.com/tutorials/simple-as3-viewport-tutorial/comment-page-1/#comment-3911</link>
		<dc:creator>Porter</dc:creator>
		<pubDate>Tue, 13 Oct 2009 14:26:20 +0000</pubDate>
		<guid isPermaLink="false">http://hybridmind.com/?p=433#comment-3911</guid>
		<description><![CDATA[Yay for multiple solutions to the same problem, one of the many great aspects of programming.]]></description>
		<content:encoded><![CDATA[<p>Yay for multiple solutions to the same problem, one of the many great aspects of programming.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave "HybridMind" Evans</title>
		<link>http://hybridmind.com/tutorials/simple-as3-viewport-tutorial/comment-page-1/#comment-3899</link>
		<dc:creator>Dave "HybridMind" Evans</dc:creator>
		<pubDate>Mon, 12 Oct 2009 23:12:21 +0000</pubDate>
		<guid isPermaLink="false">http://hybridmind.com/?p=433#comment-3899</guid>
		<description><![CDATA[Yes, it does seem I had implemented something Flash already wanted to give me for free! ;)  

I&#039;ve updated the tutorial and the zip file to use your suggestion.  I&#039;m glad you stopped by!  Now to implement this in the game I&#039;m working on...]]></description>
		<content:encoded><![CDATA[<p>Yes, it does seem I had implemented something Flash already wanted to give me for free! <img src='http://hybridmind.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   </p>
<p>I&#8217;ve updated the tutorial and the zip file to use your suggestion.  I&#8217;m glad you stopped by!  Now to implement this in the game I&#8217;m working on&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Draknek</title>
		<link>http://hybridmind.com/tutorials/simple-as3-viewport-tutorial/comment-page-1/#comment-3898</link>
		<dc:creator>Draknek</dc:creator>
		<pubDate>Mon, 12 Oct 2009 22:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://hybridmind.com/?p=433#comment-3898</guid>
		<description><![CDATA[Glad I could help. Flash seems to make a lot of things easier than you expect them to be: it is a good situation to be in.]]></description>
		<content:encoded><![CDATA[<p>Glad I could help. Flash seems to make a lot of things easier than you expect them to be: it is a good situation to be in.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave "HybridMind" Evans</title>
		<link>http://hybridmind.com/tutorials/simple-as3-viewport-tutorial/comment-page-1/#comment-3897</link>
		<dc:creator>Dave "HybridMind" Evans</dc:creator>
		<pubDate>Mon, 12 Oct 2009 21:56:37 +0000</pubDate>
		<guid isPermaLink="false">http://hybridmind.com/?p=433#comment-3897</guid>
		<description><![CDATA[Hey this does work great and I love the simplicity!  Thanks so much for leaving your thoughts.  It feels much better to me to not have to store double coordinates and continually remap them.  

I had wanted to do something like what you&#039;ve done but for some reason didn&#039;t realize Flash would make it that easy!  

I also like the scale and rotation idea you mentioned.  Not sure why I never really thought of this before.  

I&#039;m going to update the tutorial to include this new, simpler concept.]]></description>
		<content:encoded><![CDATA[<p>Hey this does work great and I love the simplicity!  Thanks so much for leaving your thoughts.  It feels much better to me to not have to store double coordinates and continually remap them.  </p>
<p>I had wanted to do something like what you&#8217;ve done but for some reason didn&#8217;t realize Flash would make it that easy!  </p>
<p>I also like the scale and rotation idea you mentioned.  Not sure why I never really thought of this before.  </p>
<p>I&#8217;m going to update the tutorial to include this new, simpler concept.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Draknek</title>
		<link>http://hybridmind.com/tutorials/simple-as3-viewport-tutorial/comment-page-1/#comment-3896</link>
		<dc:creator>Draknek</dc:creator>
		<pubDate>Mon, 12 Oct 2009 21:31:56 +0000</pubDate>
		<guid isPermaLink="false">http://hybridmind.com/?p=433#comment-3896</guid>
		<description><![CDATA[My world object is equivalent to your ViewPort instance. So my solution would be to replace your enterFrameListener function with:

private function enterFrameListener(e:Event):void {

	for (var i:int = 0; i &lt; circles.length; i++) {

		circles[i].update();

		
		// pan the viewport
		x = -viewportX;
		y = -viewportY;
	}

}

And then change the Circle class to use x/y rather than worldX/worldY.

This works because an object&#039;s position is relative to its parent. Move the parent and you move all its children. I can&#039;t immediately find any brilliant examples/tutorials of this, but hopefully the concept makes sense and you can experiment a bit to see how it works.]]></description>
		<content:encoded><![CDATA[<p>My world object is equivalent to your ViewPort instance. So my solution would be to replace your enterFrameListener function with:</p>
<p>private function enterFrameListener(e:Event):void {</p>
<p>	for (var i:int = 0; i &lt; circles.length; i++) {</p>
<p>		circles[i].update();</p>
<p>		// pan the viewport<br />
		x = -viewportX;<br />
		y = -viewportY;<br />
	}</p>
<p>}</p>
<p>And then change the Circle class to use x/y rather than worldX/worldY.</p>
<p>This works because an object&#039;s position is relative to its parent. Move the parent and you move all its children. I can&#039;t immediately find any brilliant examples/tutorials of this, but hopefully the concept makes sense and you can experiment a bit to see how it works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave "HybridMind" Evans</title>
		<link>http://hybridmind.com/tutorials/simple-as3-viewport-tutorial/comment-page-1/#comment-3895</link>
		<dc:creator>Dave "HybridMind" Evans</dc:creator>
		<pubDate>Mon, 12 Oct 2009 21:07:44 +0000</pubDate>
		<guid isPermaLink="false">http://hybridmind.com/?p=433#comment-3895</guid>
		<description><![CDATA[Interesting idea...  I&#039;d love not to have to store two sets of coordinates and have to do continual translation but I&#039;m not sure I understand what you recommend I do in regards to how Flash works in this case.  

Are you recommending that I have a dedicated World displayObject or is the Document Class Sprite enough?  I guess I have to mess around a little because I am missing something obvious about how Flash handles the stage space apparently.  

Thanks for leaving your thoughts!  I was hoping someone would be able to present some alternative ideas.]]></description>
		<content:encoded><![CDATA[<p>Interesting idea&#8230;  I&#8217;d love not to have to store two sets of coordinates and have to do continual translation but I&#8217;m not sure I understand what you recommend I do in regards to how Flash works in this case.  </p>
<p>Are you recommending that I have a dedicated World displayObject or is the Document Class Sprite enough?  I guess I have to mess around a little because I am missing something obvious about how Flash handles the stage space apparently.  </p>
<p>Thanks for leaving your thoughts!  I was hoping someone would be able to present some alternative ideas.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Draknek</title>
		<link>http://hybridmind.com/tutorials/simple-as3-viewport-tutorial/comment-page-1/#comment-3894</link>
		<dc:creator>Draknek</dc:creator>
		<pubDate>Mon, 12 Oct 2009 20:52:25 +0000</pubDate>
		<guid isPermaLink="false">http://hybridmind.com/?p=433#comment-3894</guid>
		<description><![CDATA[A much neater way of doing this is to modify the x and y coordinates of the parent DisplayObject:

world.x = -viewportX;
world.y = -viewportY;

You can also do easy scaling/rotation like this too, by setting the scale/rotation on the world object.

Storing both the world location and the camera-space location is generally not a good idea IMO.]]></description>
		<content:encoded><![CDATA[<p>A much neater way of doing this is to modify the x and y coordinates of the parent DisplayObject:</p>
<p>world.x = -viewportX;<br />
world.y = -viewportY;</p>
<p>You can also do easy scaling/rotation like this too, by setting the scale/rotation on the world object.</p>
<p>Storing both the world location and the camera-space location is generally not a good idea IMO.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
