<?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/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: Handling Basic Animation with State MovieClips</title>
	<atom:link href="http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/feed/" rel="self" type="application/rss+xml" />
	<link>http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=basic-animation-as3-state-movieclips</link>
	<description>I help people make Flash games</description>
	<lastBuildDate>Thu, 09 Sep 2010 07:23:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Michael Williams</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/comment-page-1/#comment-4264</link>
		<dc:creator>Michael Williams</dc:creator>
		<pubDate>Tue, 22 Jun 2010 14:14:14 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=841#comment-4264</guid>
		<description>&lt;p&gt;Glad to hear it&#039;s working now :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Glad to hear it&#8217;s working now <img src='http://gamedev.michaeljameswilliams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: Lisa</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/comment-page-1/#comment-4216</link>
		<dc:creator>Lisa</dc:creator>
		<pubDate>Sat, 12 Jun 2010 22:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=841#comment-4216</guid>
		<description>&lt;p&gt;Actually it was the movie clip I was using.  I had to cut the frames, paste them into a new movie clip, then drag an instance of the new movie clip back onto the old one so that I could give it an instance name.  Somehow I missed that in the instructions.  It is working now.  Thanks for the help and the great tutorial.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Actually it was the movie clip I was using.  I had to cut the frames, paste them into a new movie clip, then drag an instance of the new movie clip back onto the old one so that I could give it an instance name.  Somehow I missed that in the instructions.  It is working now.  Thanks for the help and the great tutorial.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Williams</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/comment-page-1/#comment-4213</link>
		<dc:creator>Michael Williams</dc:creator>
		<pubDate>Sat, 12 Jun 2010 13:02:27 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=841#comment-4213</guid>
		<description>&lt;p&gt;Cheers, Twan. Did that work, Lisa?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Cheers, Twan. Did that work, Lisa?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Twan</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/comment-page-1/#comment-4199</link>
		<dc:creator>Twan</dc:creator>
		<pubDate>Fri, 11 Jun 2010 16:36:26 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=841#comment-4199</guid>
		<description>&lt;p&gt;Have a look at my switchstate I put just above your post. I got the same error and fixed it by removing the old movieclip after adding the new one&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Have a look at my switchstate I put just above your post. I got the same error and fixed it by removing the old movieclip after adding the new one</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Lisa</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/comment-page-1/#comment-4193</link>
		<dc:creator>Lisa</dc:creator>
		<pubDate>Thu, 10 Jun 2010 20:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=841#comment-4193</guid>
		<description>&lt;p&gt;In Corky.as when I remove this line:&lt;/p&gt;

&lt;p&gt;removeChild(currentAnimationMovieClip);&lt;/p&gt;

&lt;p&gt;The currentAnimationClip container displays all instance swaps ...so it the switching is working.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>In Corky.as when I remove this line:</p>

<p>removeChild(currentAnimationMovieClip);</p>

<p>The currentAnimationClip container displays all instance swaps &#8230;so it the switching is working.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Lisa</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/comment-page-1/#comment-4192</link>
		<dc:creator>Lisa</dc:creator>
		<pubDate>Thu, 10 Jun 2010 20:11:25 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=841#comment-4192</guid>
		<description>&lt;p&gt;I gots a problem.  I think I&#039;ve done everything right... but clearly I have not.&lt;/p&gt;

&lt;p&gt;I am using CS3 actionscript 3.0 and I am getting this error in the output window.  (Corky is my equivalent of Avatar):&lt;/p&gt;

&lt;p&gt;TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at Corky/switchState()
    at Game/onTick()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at Corky/switchState()
    at Game/onTick()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at Corky/switchState()
    at Game/onTick()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I gots a problem.  I think I&#8217;ve done everything right&#8230; but clearly I have not.</p>

<p>I am using CS3 actionscript 3.0 and I am getting this error in the output window.  (Corky is my equivalent of Avatar):</p>

<p>TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at Corky/switchState()
    at Game/onTick()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at Corky/switchState()
    at Game/onTick()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at Corky/switchState()
    at Game/onTick()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Williams</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/comment-page-1/#comment-3957</link>
		<dc:creator>Michael Williams</dc:creator>
		<pubDate>Fri, 07 May 2010 19:29:02 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=841#comment-3957</guid>
		<description>&lt;p&gt;Hey Twan,&lt;/p&gt;

&lt;p&gt;Nice solution. Not sure what was causing the first one. Did you have your &lt;code&gt;removeChild()&lt;/code&gt; at the end of the function, maybe?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey Twan,</p>

<p>Nice solution. Not sure what was causing the first one. Did you have your <code>removeChild()</code> at the end of the function, maybe?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Twan</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/comment-page-1/#comment-3945</link>
		<dc:creator>Twan</dc:creator>
		<pubDate>Fri, 07 May 2010 12:03:35 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=841#comment-3945</guid>
		<description>&lt;p&gt;Hmm I&#039;m not sure what is going, it has something to do with my onTick and the fact that you remove the avatar before adding the new one i guess. I did manage to fix it though by doing the following:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;
public function switchState( newState:String ):void {&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;&lt;code&gt;        if ( newState == &quot;MovingLeft&quot; ) {
            addChild( new Avatar_Left() );
        } else if ( newState == &quot;MovingRight&quot; ) {
            addChild( new Avatar_Right() );
        } else if ( newState == &quot;MovingUp&quot; ) {
            addChild( new Avatar_Up() );
        } else if ( newState == &quot;MovingDown&quot; ) {
            addChild( new Avatar_Down() );
        } else if ( newState == &quot;StandingStill&quot; ) {
            addChild( new Avatar_Default() );
        }
        removeChildAt(numChildren-2);&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;&lt;/pre&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hmm I&#8217;m not sure what is going, it has something to do with my onTick and the fact that you remove the avatar before adding the new one i guess. I did manage to fix it though by doing the following:</p>

<p><pre>
public function switchState( newState:String ):void {</pre></p>

<p><pre><code>        if ( newState == "MovingLeft" ) {
            addChild( new Avatar_Left() );
        } else if ( newState == "MovingRight" ) {
            addChild( new Avatar_Right() );
        } else if ( newState == "MovingUp" ) {
            addChild( new Avatar_Up() );
        } else if ( newState == "MovingDown" ) {
            addChild( new Avatar_Down() );
        } else if ( newState == "StandingStill" ) {
            addChild( new Avatar_Default() );
        }
        removeChildAt(numChildren-2);</code></pre></p>

<pre><code>}
</code></pre>

<p></p>

<p></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Twan</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/comment-page-1/#comment-3944</link>
		<dc:creator>Twan</dc:creator>
		<pubDate>Fri, 07 May 2010 11:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=841#comment-3944</guid>
		<description>&lt;p&gt;Again a great tutorial, everything works up untill the last step. As soon as i add the remove child i get the following error as soon as a i press a button to move my character&lt;/p&gt;

&lt;p&gt;TypeError: Error #2007: Parameter child must be non-null.&lt;/p&gt;

&lt;p&gt;Any idea´s ?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Again a great tutorial, everything works up untill the last step. As soon as i add the remove child i get the following error as soon as a i press a button to move my character</p>

<p>TypeError: Error #2007: Parameter child must be non-null.</p>

<p>Any idea´s ?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Williams</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/18/basic-animation-as3-state-movieclips/comment-page-1/#comment-3111</link>
		<dc:creator>Michael Williams</dc:creator>
		<pubDate>Mon, 02 Nov 2009 22:59:07 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=841#comment-3111</guid>
		<description>&lt;p&gt;@tomdeaap: whoops, missed your comment somehow! Nice tip :)&lt;/p&gt;

&lt;p&gt;@default0: That is also a nice tip! Thanks :) You&#039;ve managed to combine State MovieClips with Divided Timelines; neat :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@tomdeaap: whoops, missed your comment somehow! Nice tip <img src='http://gamedev.michaeljameswilliams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>@default0: That is also a nice tip! Thanks <img src='http://gamedev.michaeljameswilliams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You&#8217;ve managed to combine State MovieClips with Divided Timelines; neat <img src='http://gamedev.michaeljameswilliams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
</channel>
</rss>
