<?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: How to Swap Depth using AS3 via setChildIndex</title>
	<atom:link href="http://newsourcemedia.com/blog/as3-getnexthighestdepth-is-no-longer-supported/feed/" rel="self" type="application/rss+xml" />
	<link>http://newsourcemedia.com/blog/as3-getnexthighestdepth-is-no-longer-supported/</link>
	<description>Focused on Interactive Design, Development and Marketing</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:42:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: dinesh</title>
		<link>http://newsourcemedia.com/blog/as3-getnexthighestdepth-is-no-longer-supported/comment-page-1/#comment-629</link>
		<dc:creator>dinesh</dc:creator>
		<pubDate>Mon, 11 Apr 2011 12:52:59 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/?p=534#comment-629</guid>
		<description>its not working....</description>
		<content:encoded><![CDATA[<p>its not working&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: relationssidan är relativt färdig &#124; Berättelser från Yngsjö</title>
		<link>http://newsourcemedia.com/blog/as3-getnexthighestdepth-is-no-longer-supported/comment-page-1/#comment-613</link>
		<dc:creator>relationssidan är relativt färdig &#124; Berättelser från Yngsjö</dc:creator>
		<pubDate>Sat, 19 Mar 2011 23:04:12 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/?p=534#comment-613</guid>
		<description>[...] från http://newsourcemedia.com/blog/as3-getnexthighestdepth-is-no-longer-supported/_ _ [...]</description>
		<content:encoded><![CDATA[<p>[...] från <a href="http://newsourcemedia.com/blog/as3-getnexthighestdepth-is-no-longer-supported/_" rel="nofollow">http://newsourcemedia.com/blog/as3-getnexthighestdepth-is-no-longer-supported/_</a> _ [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: derek</title>
		<link>http://newsourcemedia.com/blog/as3-getnexthighestdepth-is-no-longer-supported/comment-page-1/#comment-435</link>
		<dc:creator>derek</dc:creator>
		<pubDate>Tue, 02 Mar 2010 02:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/?p=534#comment-435</guid>
		<description>didnt seem to work for me.  i altered it to correct the problem:
/////////
// loop through to create three mc&#039;s on stage
for (var i:int = 0; i &lt;3; i++) {
	var myColor:ColorTransform = new ColorTransform();
	myColor.color = (Math.random() * 0xFFFFFF);
	var mc:MovieClip = new MyMC();
	mc.x = ((i * 80) );
	mc.y = 100+ (i*10);
	mc.id = i;
	mc.name = &quot;b&quot;+i;
	mc.transform.colorTransform = myColor;
	mc.buttonMode = true;
	mc.addEventListener (MouseEvent.MOUSE_OVER, swapDepths);
	holder_mc.addChild (mc);
}
 
function swapDepths (e:MouseEvent):void {
	trace (e.target.id);
	var mc:MovieClip;
	mc = (e.target.parent as MovieClip);
	trace (mc.id);
	holder_mc.setChildIndex (holder_mc.getChildByName(&quot;b&quot;+e.target.id), (holder_mc.numChildren - 1));
}</description>
		<content:encoded><![CDATA[<p>didnt seem to work for me.  i altered it to correct the problem:<br />
/////////<br />
// loop through to create three mc&#8217;s on stage<br />
for (var i:int = 0; i &lt;3; i++) {<br />
	var myColor:ColorTransform = new ColorTransform();<br />
	myColor.color = (Math.random() * 0xFFFFFF);<br />
	var mc:MovieClip = new MyMC();<br />
	mc.x = ((i * 80) );<br />
	mc.y = 100+ (i*10);<br />
	mc.id = i;<br />
	mc.name = &quot;b&quot;+i;<br />
	mc.transform.colorTransform = myColor;<br />
	mc.buttonMode = true;<br />
	mc.addEventListener (MouseEvent.MOUSE_OVER, swapDepths);<br />
	holder_mc.addChild (mc);<br />
}</p>
<p>function swapDepths (e:MouseEvent):void {<br />
	trace (e.target.id);<br />
	var mc:MovieClip;<br />
	mc = (e.target.parent as MovieClip);<br />
	trace (mc.id);<br />
	holder_mc.setChildIndex (holder_mc.getChildByName(&quot;b&quot;+e.target.id), (holder_mc.numChildren &#8211; 1));<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: greg</title>
		<link>http://newsourcemedia.com/blog/as3-getnexthighestdepth-is-no-longer-supported/comment-page-1/#comment-394</link>
		<dc:creator>greg</dc:creator>
		<pubDate>Sun, 03 Jan 2010 12:51:52 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/?p=534#comment-394</guid>
		<description>I&#039;m trying to enter a depth but I get this error:
RangeError: Error #2006: The supplied index is out of bounds.
	at flash.display::DisplayObjectContainer/setChildIndex()
	at soundSpectrum_fla::MainTimeline/onLoaded()
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at flash.net::URLLoader/onComplete()</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to enter a depth but I get this error:<br />
RangeError: Error #2006: The supplied index is out of bounds.<br />
	at flash.display::DisplayObjectContainer/setChildIndex()<br />
	at soundSpectrum_fla::MainTimeline/onLoaded()<br />
	at flash.events::EventDispatcher/dispatchEventFunction()<br />
	at flash.events::EventDispatcher/dispatchEvent()<br />
	at flash.net::URLLoader/onComplete()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mattis</title>
		<link>http://newsourcemedia.com/blog/as3-getnexthighestdepth-is-no-longer-supported/comment-page-1/#comment-323</link>
		<dc:creator>Mattis</dc:creator>
		<pubDate>Wed, 26 Aug 2009 08:50:37 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/?p=534#comment-323</guid>
		<description>Thanks for this, helped me with my nested movieclips sorting problem.</description>
		<content:encoded><![CDATA[<p>Thanks for this, helped me with my nested movieclips sorting problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Enzo</title>
		<link>http://newsourcemedia.com/blog/as3-getnexthighestdepth-is-no-longer-supported/comment-page-1/#comment-279</link>
		<dc:creator>Enzo</dc:creator>
		<pubDate>Wed, 03 Jun 2009 14:16:49 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/?p=534#comment-279</guid>
		<description>Thanks I always get confused at livedocs.</description>
		<content:encoded><![CDATA[<p>Thanks I always get confused at livedocs.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
