<?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"
	>
<channel>
	<title>Comments on: Remove all children from DisplayObject3D</title>
	<atom:link href="http://www.flashmonkey.co.uk/remove-all-children-from-displayobject3d/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flashmonkey.co.uk/remove-all-children-from-displayobject3d/</link>
	<description>Stephen Burgess - ActionScript Developer</description>
	<pubDate>Sun, 01 Aug 2010 06:55:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: joshk</title>
		<link>http://www.flashmonkey.co.uk/remove-all-children-from-displayobject3d/#comment-945</link>
		<dc:creator>joshk</dc:creator>
		<pubDate>Tue, 22 Dec 2009 02:08:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.flashmonkey.co.uk/?p=698#comment-945</guid>
		<description>good stuff mr. flashmonkey</description>
		<content:encoded><![CDATA[<p>good stuff mr. flashmonkey</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FlashMonkey</title>
		<link>http://www.flashmonkey.co.uk/remove-all-children-from-displayobject3d/#comment-505</link>
		<dc:creator>FlashMonkey</dc:creator>
		<pubDate>Wed, 14 Oct 2009 09:03:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.flashmonkey.co.uk/?p=698#comment-505</guid>
		<description>I have an Abstract class that extend Sprite and contains a public dispose() method. That way you can do something like this:

while(myContainer.numChildren)
{
	AbstractDisplay(myContainer.getChildAt(0)).dispose();
	myContainer.removeChildAt(0);
}

That way it doesn't matter what your Class is, or even if it contains an override of the dispose method, as long as somewhere along the inheritance line it extends AbstractDisplay. I also always &lt;a href="http://onflash.org/ted/2008/09/useweakreferencesboolean-false.php"  target="_blank" rel="nofollow"&gt;set useWeakReference to true&lt;/a&gt; when adding event listeners.

I got the Abstract class from &lt;a href="http://www.lostinactionscript.com"  target="_blank" rel="nofollow"&gt;Shane McCartney&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>I have an Abstract class that extend Sprite and contains a public dispose() method. That way you can do something like this:</p>
<p>while(myContainer.numChildren)<br />
{<br />
	AbstractDisplay(myContainer.getChildAt(0)).dispose();<br />
	myContainer.removeChildAt(0);<br />
}</p>
<p>That way it doesn&#8217;t matter what your Class is, or even if it contains an override of the dispose method, as long as somewhere along the inheritance line it extends AbstractDisplay. I also always <a href="http://onflash.org/ted/2008/09/useweakreferencesboolean-false.php"  target="_blank" rel="nofollow">set useWeakReference to true</a> when adding event listeners.</p>
<p>I got the Abstract class from <a href="http://www.lostinactionscript.com"  target="_blank" rel="nofollow">Shane McCartney</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rauri</title>
		<link>http://www.flashmonkey.co.uk/remove-all-children-from-displayobject3d/#comment-499</link>
		<dc:creator>rauri</dc:creator>
		<pubDate>Mon, 12 Oct 2009 10:23:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.flashmonkey.co.uk/?p=698#comment-499</guid>
		<description>and don't forget to remove those eventlisteners within myContainer.getChildAt(0-&#62;numChildren-1)
and within myContainer.getChildAt(0-&#62;numChildren-1).getChildAt(0-&#62;numChildren-1) and etc...

surely there's a better way? 

i often make a kill function within any class that kills all event listeners, is optionally called when you want to disable a class, and is automatically called if you remove an instance of the class from the displaylist since it listens for the removed from stage event.</description>
		<content:encoded><![CDATA[<p>and don&#8217;t forget to remove those eventlisteners within myContainer.getChildAt(0-&gt;numChildren-1)<br />
and within myContainer.getChildAt(0-&gt;numChildren-1).getChildAt(0-&gt;numChildren-1) and etc&#8230;</p>
<p>surely there&#8217;s a better way? </p>
<p>i often make a kill function within any class that kills all event listeners, is optionally called when you want to disable a class, and is automatically called if you remove an instance of the class from the displaylist since it listens for the removed from stage event.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FlashMonkey</title>
		<link>http://www.flashmonkey.co.uk/remove-all-children-from-displayobject3d/#comment-498</link>
		<dc:creator>FlashMonkey</dc:creator>
		<pubDate>Mon, 12 Oct 2009 09:34:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.flashmonkey.co.uk/?p=698#comment-498</guid>
		<description>Cheers... :)</description>
		<content:encoded><![CDATA[<p>Cheers&#8230; <img src='http://www.flashmonkey.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rauri</title>
		<link>http://www.flashmonkey.co.uk/remove-all-children-from-displayobject3d/#comment-497</link>
		<dc:creator>rauri</dc:creator>
		<pubDate>Mon, 12 Oct 2009 09:24:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.flashmonkey.co.uk/?p=698#comment-497</guid>
		<description>while(myContainer.numChildren) myContainer.removeChildAt(0);

cheers for the papervision version...</description>
		<content:encoded><![CDATA[<p>while(myContainer.numChildren) myContainer.removeChildAt(0);</p>
<p>cheers for the papervision version&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
