<?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: (As2) swapDepths Vs (As3) setChildIndex</title>
	<atom:link href="http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/</link>
	<description>There is no universally agreed-upon biological definition of dreaming</description>
	<pubDate>Fri, 21 Nov 2008 09:20:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: From AS2 to AS3 - Where did it go - swapDepths &#124; [mck]</title>
		<link>http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-455</link>
		<dc:creator>From AS2 to AS3 - Where did it go - swapDepths &#124; [mck]</dc:creator>
		<pubDate>Wed, 27 Aug 2008 08:00:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-455</guid>
		<description>[...] #2 not possible anymore&#8230; if you want a detailed explanation visit dreaming in Flash blog, and read more about swapDepths() in AS3 (it&#8217;s explained with a [...]</description>
		<content:encoded><![CDATA[<p>[...] #2 not possible anymore&#8230; if you want a detailed explanation visit dreaming in Flash blog, and read more about swapDepths() in AS3 (it&#8217;s explained with a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Idoru</title>
		<link>http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-396</link>
		<dc:creator>Idoru</dc:creator>
		<pubDate>Tue, 24 Jun 2008 09:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-396</guid>
		<description>Well it will throw you an error as there's no index 42.
if you want you can immediatly change the index of s1 by container.addChildAt(s2,0); which would make s1 top to s2.</description>
		<content:encoded><![CDATA[<p>Well it will throw you an error as there&#8217;s no index 42.<br />
if you want you can immediatly change the index of s1 by container.addChildAt(s2,0); which would make s1 top to s2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reid</title>
		<link>http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-395</link>
		<dc:creator>Reid</dc:creator>
		<pubDate>Mon, 23 Jun 2008 18:49:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-395</guid>
		<description>This seems to be a common approach, but I'm skeptical.  What happens in the following scenario?  Let's assume container is an empty DisplayObjectContainer...

-----------------------------------
var s1:Sprite = new Sprite();
var s2:Sprite = new Sprite();

container.addChild(s1);
container.addChildAt(s2, 42);

container.setChildIndex(s1, container.numChildren - 1);
-----------------------------------

Now, what are the indeces of s1 and s2?</description>
		<content:encoded><![CDATA[<p>This seems to be a common approach, but I&#8217;m skeptical.  What happens in the following scenario?  Let&#8217;s assume container is an empty DisplayObjectContainer&#8230;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
var s1:Sprite = new Sprite();<br />
var s2:Sprite = new Sprite();</p>
<p>container.addChild(s1);<br />
container.addChildAt(s2, 42);</p>
<p>container.setChildIndex(s1, container.numChildren - 1);<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Now, what are the indeces of s1 and s2?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Idoru</title>
		<link>http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-355</link>
		<dc:creator>Idoru</dc:creator>
		<pubDate>Fri, 23 May 2008 07:06:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-355</guid>
		<description>Yep that's what happens, it is better but it also forces you to delete that displayObject manually, as in AS2 you'd just 'replace' it :)</description>
		<content:encoded><![CDATA[<p>Yep that&#8217;s what happens, it is better but it also forces you to delete that displayObject manually, as in AS2 you&#8217;d just &#8216;replace&#8217; it <img src='http://www.dreaminginflash.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JesseJimz</title>
		<link>http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-354</link>
		<dc:creator>JesseJimz</dc:creator>
		<pubDate>Fri, 23 May 2008 06:04:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-354</guid>
		<description>So basically, in your example, when swapping the child object at index 0 to index 3, the other children are "pushed" down the stacking order? This IS better than having a movie clip (originally at index 3) killed.</description>
		<content:encoded><![CDATA[<p>So basically, in your example, when swapping the child object at index 0 to index 3, the other children are &#8220;pushed&#8221; down the stacking order? This IS better than having a movie clip (originally at index 3) killed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-254</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 28 Mar 2008 17:24:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/11/06/as2-swapdepths-vs-as3-setchildindex/#comment-254</guid>
		<description>Thanks</description>
		<content:encoded><![CDATA[<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
