<?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: AS3: Stopping All Timeline Animations</title>
	<atom:link href="http://blog.nobien.net/2009/02/05/as3-stopping-all-timeline-animations/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nobien.net/2009/02/05/as3-stopping-all-timeline-animations/</link>
	<description>A nerd blog about nerdy things by ... nerdy guys?</description>
	<lastBuildDate>Mon, 30 Aug 2010 06:39:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Amer</title>
		<link>http://blog.nobien.net/2009/02/05/as3-stopping-all-timeline-animations/comment-page-1/#comment-4894</link>
		<dc:creator>Amer</dc:creator>
		<pubDate>Mon, 30 Aug 2010 06:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nobien.net/?p=119#comment-4894</guid>
		<description>Very helpful thanks a lot.</description>
		<content:encoded><![CDATA[<p>Very helpful thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pezzomon</title>
		<link>http://blog.nobien.net/2009/02/05/as3-stopping-all-timeline-animations/comment-page-1/#comment-4467</link>
		<dc:creator>pezzomon</dc:creator>
		<pubDate>Wed, 09 Sep 2009 16:55:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nobien.net/?p=119#comment-4467</guid>
		<description>Used the reply by Mike, worked great. I passed the stage as the displayObject, and everything stopped. Problem came up where I couldn&#039;t resume play on the nested timeline, but the main timeline did resume.  To resume play, I basically copied the function above, and changed stop to play.</description>
		<content:encoded><![CDATA[<p>Used the reply by Mike, worked great. I passed the stage as the displayObject, and everything stopped. Problem came up where I couldn&#8217;t resume play on the nested timeline, but the main timeline did resume.  To resume play, I basically copied the function above, and changed stop to play.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://blog.nobien.net/2009/02/05/as3-stopping-all-timeline-animations/comment-page-1/#comment-4332</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Thu, 14 May 2009 13:09:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nobien.net/?p=119#comment-4332</guid>
		<description>I approved this comment but never actually commented on it back... sorry ... But yeah, Mike, that&#039;s a much better way of including everything. I didn&#039;t think about Sprites. Thank you for the contribution!</description>
		<content:encoded><![CDATA[<p>I approved this comment but never actually commented on it back&#8230; sorry &#8230; But yeah, Mike, that&#8217;s a much better way of including everything. I didn&#8217;t think about Sprites. Thank you for the contribution!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blog.nobien.net/2009/02/05/as3-stopping-all-timeline-animations/comment-page-1/#comment-4302</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 25 Mar 2009 01:44:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nobien.net/?p=119#comment-4302</guid>
		<description>Useful, but not perfect. What if you pass Sprite instance to haltAllAnimations method? Sprites can have MovieClips as children, so your solution will not work. Try this one:

function stopAllChildMovieClips(displayObject:DisplayObjectContainer):void {
			var numChildren:int = displayObject.numChildren;
			for (var i:int = 0; i &lt; numChildren; i++) {
				var child:DisplayObject = displayObject.getChildAt(i);
				if (child is DisplayObjectContainer) {
					if (child is MovieClip) {
						MovieClip(child).stop();
					}
					stopAllChildMovieClips(DisplayObjectContainer(child));
				}
			}
		}</description>
		<content:encoded><![CDATA[<p>Useful, but not perfect. What if you pass Sprite instance to haltAllAnimations method? Sprites can have MovieClips as children, so your solution will not work. Try this one:</p>
<p>function stopAllChildMovieClips(displayObject:DisplayObjectContainer):void {<br />
			var numChildren:int = displayObject.numChildren;<br />
			for (var i:int = 0; i &lt; numChildren; i++) {<br />
				var child:DisplayObject = displayObject.getChildAt(i);<br />
				if (child is DisplayObjectContainer) {<br />
					if (child is MovieClip) {<br />
						MovieClip(child).stop();<br />
					}<br />
					stopAllChildMovieClips(DisplayObjectContainer(child));<br />
				}<br />
			}<br />
		}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
