<?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: The finer Art of Loading (#2): It&#8217;s all about timing</title>
	<atom:link href="http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/feed" rel="self" type="application/rss+xml" />
	<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=the-finer-art-of-loading-2-handling-multiple-swfs</link>
	<description>Web Development &#60; Actionscript</description>
	<lastBuildDate>Mon, 06 Sep 2010 08:54:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Gabriel Sanchez</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-1620</link>
		<dc:creator>Gabriel Sanchez</dc:creator>
		<pubDate>Wed, 25 Aug 2010 17:46:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1620</guid>
		<description>HELP!!

Im a graphic designer aka a copy and past actionscripter. LOL!~

Im getting this error... Error #1034: Type Coercion failed: cannot convert flash.display::AVM1Movie@28eeadc1 to flash.display.MovieClip.</description>
		<content:encoded><![CDATA[<p>HELP!!</p>
<p>Im a graphic designer aka a copy and past actionscripter. LOL!~</p>
<p>Im getting this error&#8230; Error #1034: Type Coercion failed: cannot convert flash.display::AVM1Movie@28eeadc1 to flash.display.MovieClip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Brown</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-906</link>
		<dc:creator>Patrick Brown</dc:creator>
		<pubDate>Fri, 13 Aug 2010 11:14:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-906</guid>
		<description>Hey Marvin, I&#039;m back.  :(  So, I thought I had this thing licked, but now I&#039;m getting another error...the same one that Hallaback is getting.  I didn&#039;t get this error until upgrading to CS5 two days ago and voila, I&#039;m getting ReferenceError: Error #1056: Cannot create property customID on test1_fla.MainTimeline__Preloader__.at test/onSwfComplete().

I&#039;ve read quite a bit about the built in preloader in CS5 and tried everything I could find on the internet (mainly messing with the AS3 advanced publish setting) to no avail.  I also tried your suggestion to Hallback, but it didn&#039;t work.  Can you think of anything else?

My code:

var _swfLoader:Loader;
var _swfRequest:URLRequest;
var _swfPathArr:Array = new Array(&quot;test1.swf&quot;, &quot;test2.swf&quot;, &quot;test3.swf&quot;);
var _swfClipsArr:Array = new Array();
var _swfTempClip:MovieClip;
var _loadedSWFs:int;
startLoading(_swfPathArr);
function startLoading(pathArr:Array):void {
	_swfLoader = new Loader();
	_swfRequest = new URLRequest();
	loadSWF(pathArr[0]);
}
function loadSWF(path:String):void {
	setupListeners(_swfLoader.contentLoaderInfo);
	_swfRequest.url = path;
	_swfLoader.load(_swfRequest);
}
function setupListeners(dispatcher:IEventDispatcher):void {
	dispatcher.addEventListener(Event.COMPLETE, onSwfComplete);
	dispatcher.addEventListener(ProgressEvent.PROGRESS, currentSwfProgress);
}
function currentSwfProgress(event:ProgressEvent):void {
	var _perc:int = (event.bytesLoaded / event.bytesTotal) * 100;
	// swfPreloader.percentTF.text = _perc + &quot;%&quot;;
}
function onSwfComplete(event:Event):void {
	event.target.removeEventListener(Event.COMPLETE, onSwfComplete);
	event.target.removeEventListener(ProgressEvent.PROGRESS, currentSwfProgress);
	_swfTempClip = event.target.content;
	_swfTempClip.customID = _loadedSWFs;
	_swfClipsArr.push(_swfTempClip);
	if(_loadedSWFs &lt;_swfPathArr.length - 1) {
		_loadedSWFs++;
		loadSWF(_swfPathArr[_loadedSWFs]);
	} else {
		_swfLoader.unloadAndStop();
		_swfLoader = null;
		onCompletePreloading();
	}
}
function onCompletePreloading():void {
	contentContainer.addChild(_swfClipsArr[0]);
	news_btn.addEventListener(MouseEvent.CLICK, setContent);
	portfolio_btn.addEventListener(MouseEvent.CLICK, setContent);
	contact_btn.addEventListener(MouseEvent.CLICK, setContent);
}
function setContent(event:MouseEvent):void {
	var _swfToAdd:MovieClip;
	switch(event.target.name) {
		case &quot;news_btn&quot;:
		_swfToAdd = _swfClipsArr[0];
		break;
		case &quot;portfolio_btn&quot;:
		_swfToAdd = _swfClipsArr[1];
		break;
		case &quot;contact_btn&quot;:
		_swfToAdd = _swfClipsArr[2];
		break;
	}
	contentContainer.removeChildAt(contentContainer.numChildren-1);
	contentContainer.addChild(_swfToAdd);
	trace(_swfToAdd.customID);
}</description>
		<content:encoded><![CDATA[<p>Hey Marvin, I&#8217;m back.  :(  So, I thought I had this thing licked, but now I&#8217;m getting another error&#8230;the same one that Hallaback is getting.  I didn&#8217;t get this error until upgrading to CS5 two days ago and voila, I&#8217;m getting ReferenceError: Error #1056: Cannot create property customID on test1_fla.MainTimeline__Preloader__.at test/onSwfComplete().</p>
<p>I&#8217;ve read quite a bit about the built in preloader in CS5 and tried everything I could find on the internet (mainly messing with the AS3 advanced publish setting) to no avail.  I also tried your suggestion to Hallback, but it didn&#8217;t work.  Can you think of anything else?</p>
<p>My code:</p>
<p>var _swfLoader:Loader;<br />
var _swfRequest:URLRequest;<br />
var _swfPathArr:Array = new Array(&#8220;test1.swf&#8221;, &#8220;test2.swf&#8221;, &#8220;test3.swf&#8221;);<br />
var _swfClipsArr:Array = new Array();<br />
var _swfTempClip:MovieClip;<br />
var _loadedSWFs:int;<br />
startLoading(_swfPathArr);<br />
function startLoading(pathArr:Array):void {<br />
	_swfLoader = new Loader();<br />
	_swfRequest = new URLRequest();<br />
	loadSWF(pathArr[0]);<br />
}<br />
function loadSWF(path:String):void {<br />
	setupListeners(_swfLoader.contentLoaderInfo);<br />
	_swfRequest.url = path;<br />
	_swfLoader.load(_swfRequest);<br />
}<br />
function setupListeners(dispatcher:IEventDispatcher):void {<br />
	dispatcher.addEventListener(Event.COMPLETE, onSwfComplete);<br />
	dispatcher.addEventListener(ProgressEvent.PROGRESS, currentSwfProgress);<br />
}<br />
function currentSwfProgress(event:ProgressEvent):void {<br />
	var _perc:int = (event.bytesLoaded / event.bytesTotal) * 100;<br />
	// swfPreloader.percentTF.text = _perc + &#8220;%&#8221;;<br />
}<br />
function onSwfComplete(event:Event):void {<br />
	event.target.removeEventListener(Event.COMPLETE, onSwfComplete);<br />
	event.target.removeEventListener(ProgressEvent.PROGRESS, currentSwfProgress);<br />
	_swfTempClip = event.target.content;<br />
	_swfTempClip.customID = _loadedSWFs;<br />
	_swfClipsArr.push(_swfTempClip);<br />
	if(_loadedSWFs &lt;_swfPathArr.length &#8211; 1) {<br />
		_loadedSWFs++;<br />
		loadSWF(_swfPathArr[_loadedSWFs]);<br />
	} else {<br />
		_swfLoader.unloadAndStop();<br />
		_swfLoader = null;<br />
		onCompletePreloading();<br />
	}<br />
}<br />
function onCompletePreloading():void {<br />
	contentContainer.addChild(_swfClipsArr[0]);<br />
	news_btn.addEventListener(MouseEvent.CLICK, setContent);<br />
	portfolio_btn.addEventListener(MouseEvent.CLICK, setContent);<br />
	contact_btn.addEventListener(MouseEvent.CLICK, setContent);<br />
}<br />
function setContent(event:MouseEvent):void {<br />
	var _swfToAdd:MovieClip;<br />
	switch(event.target.name) {<br />
		case &quot;news_btn&quot;:<br />
		_swfToAdd = _swfClipsArr[0];<br />
		break;<br />
		case &quot;portfolio_btn&quot;:<br />
		_swfToAdd = _swfClipsArr[1];<br />
		break;<br />
		case &quot;contact_btn&quot;:<br />
		_swfToAdd = _swfClipsArr[2];<br />
		break;<br />
	}<br />
	contentContainer.removeChildAt(contentContainer.numChildren-1);<br />
	contentContainer.addChild(_swfToAdd);<br />
	trace(_swfToAdd.customID);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-878</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Wed, 11 Aug 2010 08:30:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-878</guid>
		<description>You&#039;re welcome :)</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Brown</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-867</link>
		<dc:creator>Patrick Brown</dc:creator>
		<pubDate>Tue, 10 Aug 2010 19:28:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-867</guid>
		<description>Marvin,

Thanks for your reply.  I didn&#039;t realize I had to publish it in Flash Player 10, which is tricky with CS3...but I found a way.  Yes, I dropped the contentContainer on the stage, but put it on the wrong place (I had to put it inside the movieClip where my button was).  All is well now.  I can&#039;t begin to tell you how much this post and site have helped me.  Thank you so very much.</description>
		<content:encoded><![CDATA[<p>Marvin,</p>
<p>Thanks for your reply.  I didn&#8217;t realize I had to publish it in Flash Player 10, which is tricky with CS3&#8230;but I found a way.  Yes, I dropped the contentContainer on the stage, but put it on the wrong place (I had to put it inside the movieClip where my button was).  All is well now.  I can&#8217;t begin to tell you how much this post and site have helped me.  Thank you so very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-858</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Tue, 10 Aug 2010 06:40:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-858</guid>
		<description>Hey Patrick,
a) you have to use Flash Player 10 
b) you have to set up a clip named contentContainer to the stage.</description>
		<content:encoded><![CDATA[<p>Hey Patrick,<br />
a) you have to use Flash Player 10<br />
b) you have to set up a clip named contentContainer to the stage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Brown</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-852</link>
		<dc:creator>Patrick Brown</dc:creator>
		<pubDate>Tue, 10 Aug 2010 03:02:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-852</guid>
		<description>...as well as: 1120: Access of undefined property contentContainer.</description>
		<content:encoded><![CDATA[<p>&#8230;as well as: 1120: Access of undefined property contentContainer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Brown</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-851</link>
		<dc:creator>Patrick Brown</dc:creator>
		<pubDate>Tue, 10 Aug 2010 02:59:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-851</guid>
		<description>Hey guys, I&#039;m running into a problem.  I&#039;m receiving these errors:

1061: Call to a possibly undefined method unloadAndStop through a reference with static type flash.display:Loader.</description>
		<content:encoded><![CDATA[<p>Hey guys, I&#8217;m running into a problem.  I&#8217;m receiving these errors:</p>
<p>1061: Call to a possibly undefined method unloadAndStop through a reference with static type flash.display:Loader.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-798</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Sat, 07 Aug 2010 11:02:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-798</guid>
		<description>Hey Hallabak,
what happens if you cast _swfTempClip as a MovieClip before assigning the customID-property? Like _swfTempClip = MovieClip(event.target.content);

A third tutorial is still in progress but will come soon - thanks for reminding me :)</description>
		<content:encoded><![CDATA[<p>Hey Hallabak,<br />
what happens if you cast _swfTempClip as a MovieClip before assigning the customID-property? Like _swfTempClip = MovieClip(event.target.content);</p>
<p>A third tutorial is still in progress but will come soon &#8211; thanks for reminding me :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hallabak</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-787</link>
		<dc:creator>Hallabak</dc:creator>
		<pubDate>Sat, 07 Aug 2010 03:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-787</guid>
		<description>I get this message. 

ReferenceError: Error #1056: Cannot create property customID on _1_fla.MainTimeline__Preloader__.
	at MainTimeline_fla::MainTimeline/onSwfComplete()

Here is my code:


var _swfLoader:Loader;
var _swfRequest:URLRequest;
 
var _swfPathArr:Array = new Array(&quot;_1.swf&quot;, &quot;_2.swf&quot;, &quot;_3.swf&quot;, &quot;_4.swf&quot;, &quot;_5.swf&quot;, &quot;_6.swf&quot;);
 
var _swfClipsArr:Array = new Array();
var _swfTempClip:MovieClip;
var _loadedSWFs:int;
 
 
startLoading(_swfPathArr);
 
function startLoading(pathArr:Array):void {
    _swfLoader = new Loader();
    _swfRequest = new URLRequest();
   
    loadSWF(pathArr[0]);
}
 
function loadSWF(path:String):void {
    setupListeners(_swfLoader.contentLoaderInfo);
   
    _swfRequest.url = path;
    _swfLoader.load(_swfRequest);
}
 
function setupListeners(dispatcher:IEventDispatcher):void {
    dispatcher.addEventListener(Event.COMPLETE, onSwfComplete);
    dispatcher.addEventListener(ProgressEvent.PROGRESS, currentSwfProgress);
}
 
function currentSwfProgress(event:ProgressEvent):void {
    var _perc:int = (event.bytesLoaded / event.bytesTotal) * 100;
    // swfPreloader.percentTF.text = _perc + &quot;%&quot;;
}
 
 
function onSwfComplete(event:Event):void {
    event.target.removeEventListener(Event.COMPLETE, onSwfComplete);
    event.target.removeEventListener(ProgressEvent.PROGRESS, currentSwfProgress);
 
    _swfTempClip = event.target.content;
    _swfTempClip.customID = _loadedSWFs;
    _swfClipsArr.push(_swfTempClip);
   
    if(_loadedSWFs &lt;_swfPathArr.length - 1) {
        _loadedSWFs++;
        loadSWF(_swfPathArr[_loadedSWFs]);
    } else {
        _swfLoader.unloadAndStop();
        _swfLoader = null;
        onCompletePreloading();
    }
}
 
function onCompletePreloading():void {
    contentContainer.addChild(_swfClipsArr[0]);
   
    _1.addEventListener(MouseEvent.CLICK, setContent);
    _2.addEventListener(MouseEvent.CLICK, setContent);
    _3.addEventListener(MouseEvent.CLICK, setContent);
	_4.addEventListener(MouseEvent.CLICK, setContent);
    _5.addEventListener(MouseEvent.CLICK, setContent);
    _6.addEventListener(MouseEvent.CLICK, setContent);
}
 
function setContent(event:MouseEvent):void {
    var _swfToAdd:MovieClip;
   
    switch(event.target.name) {
        case &quot;_1&quot;:
        _swfToAdd = _swfClipsArr[0];
        break;
       
        case &quot;_2&quot;:
        _swfToAdd = _swfClipsArr[1];
        break;
       
        case &quot;_3&quot;:
        _swfToAdd = _swfClipsArr[2];
        break;
		
		case &quot;_4&quot;:
        _swfToAdd = _swfClipsArr[2];
        break;
		
		case &quot;_5&quot;:
        _swfToAdd = _swfClipsArr[2];
        break;
		
		case &quot;_6&quot;:
        _swfToAdd = _swfClipsArr[2];
        break;
    }
   
    contentContainer.removeChildAt(contentContainer.numChildren-1);
    contentContainer.addChild(_swfToAdd);
    trace(_swfToAdd.customID);
}


Any Ideas? 

Also... when are we gonna see that 3rd tutorial?

Thanks a bunch</description>
		<content:encoded><![CDATA[<p>I get this message. </p>
<p>ReferenceError: Error #1056: Cannot create property customID on _1_fla.MainTimeline__Preloader__.<br />
	at MainTimeline_fla::MainTimeline/onSwfComplete()</p>
<p>Here is my code:</p>
<p>var _swfLoader:Loader;<br />
var _swfRequest:URLRequest;</p>
<p>var _swfPathArr:Array = new Array(&#8220;_1.swf&#8221;, &#8220;_2.swf&#8221;, &#8220;_3.swf&#8221;, &#8220;_4.swf&#8221;, &#8220;_5.swf&#8221;, &#8220;_6.swf&#8221;);</p>
<p>var _swfClipsArr:Array = new Array();<br />
var _swfTempClip:MovieClip;<br />
var _loadedSWFs:int;</p>
<p>startLoading(_swfPathArr);</p>
<p>function startLoading(pathArr:Array):void {<br />
    _swfLoader = new Loader();<br />
    _swfRequest = new URLRequest();</p>
<p>    loadSWF(pathArr[0]);<br />
}</p>
<p>function loadSWF(path:String):void {<br />
    setupListeners(_swfLoader.contentLoaderInfo);</p>
<p>    _swfRequest.url = path;<br />
    _swfLoader.load(_swfRequest);<br />
}</p>
<p>function setupListeners(dispatcher:IEventDispatcher):void {<br />
    dispatcher.addEventListener(Event.COMPLETE, onSwfComplete);<br />
    dispatcher.addEventListener(ProgressEvent.PROGRESS, currentSwfProgress);<br />
}</p>
<p>function currentSwfProgress(event:ProgressEvent):void {<br />
    var _perc:int = (event.bytesLoaded / event.bytesTotal) * 100;<br />
    // swfPreloader.percentTF.text = _perc + &#8220;%&#8221;;<br />
}</p>
<p>function onSwfComplete(event:Event):void {<br />
    event.target.removeEventListener(Event.COMPLETE, onSwfComplete);<br />
    event.target.removeEventListener(ProgressEvent.PROGRESS, currentSwfProgress);</p>
<p>    _swfTempClip = event.target.content;<br />
    _swfTempClip.customID = _loadedSWFs;<br />
    _swfClipsArr.push(_swfTempClip);</p>
<p>    if(_loadedSWFs &lt;_swfPathArr.length &#8211; 1) {<br />
        _loadedSWFs++;<br />
        loadSWF(_swfPathArr[_loadedSWFs]);<br />
    } else {<br />
        _swfLoader.unloadAndStop();<br />
        _swfLoader = null;<br />
        onCompletePreloading();<br />
    }<br />
}</p>
<p>function onCompletePreloading():void {<br />
    contentContainer.addChild(_swfClipsArr[0]);</p>
<p>    _1.addEventListener(MouseEvent.CLICK, setContent);<br />
    _2.addEventListener(MouseEvent.CLICK, setContent);<br />
    _3.addEventListener(MouseEvent.CLICK, setContent);<br />
	_4.addEventListener(MouseEvent.CLICK, setContent);<br />
    _5.addEventListener(MouseEvent.CLICK, setContent);<br />
    _6.addEventListener(MouseEvent.CLICK, setContent);<br />
}</p>
<p>function setContent(event:MouseEvent):void {<br />
    var _swfToAdd:MovieClip;</p>
<p>    switch(event.target.name) {<br />
        case &quot;_1&quot;:<br />
        _swfToAdd = _swfClipsArr[0];<br />
        break;</p>
<p>        case &quot;_2&quot;:<br />
        _swfToAdd = _swfClipsArr[1];<br />
        break;</p>
<p>        case &quot;_3&quot;:<br />
        _swfToAdd = _swfClipsArr[2];<br />
        break;</p>
<p>		case &quot;_4&quot;:<br />
        _swfToAdd = _swfClipsArr[2];<br />
        break;</p>
<p>		case &quot;_5&quot;:<br />
        _swfToAdd = _swfClipsArr[2];<br />
        break;</p>
<p>		case &quot;_6&quot;:<br />
        _swfToAdd = _swfClipsArr[2];<br />
        break;<br />
    }</p>
<p>    contentContainer.removeChildAt(contentContainer.numChildren-1);<br />
    contentContainer.addChild(_swfToAdd);<br />
    trace(_swfToAdd.customID);<br />
}</p>
<p>Any Ideas? </p>
<p>Also&#8230; when are we gonna see that 3rd tutorial?</p>
<p>Thanks a bunch</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-587</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Tue, 27 Jul 2010 07:11:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-587</guid>
		<description>Where &amp; how do you want to access it?</description>
		<content:encoded><![CDATA[<p>Where &#038; how do you want to access it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MJP</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-580</link>
		<dc:creator>MJP</dc:creator>
		<pubDate>Tue, 27 Jul 2010 02:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-580</guid>
		<description>Very nice thank you but as a previous poster wrote this snippet of code will not load my xml scroller (Error #1009: Cannot access a property or method of a null object reference.) that&#039;s contained in my external swf. The snippet from your chapter 1 will load the scroller though. hmmmm....</description>
		<content:encoded><![CDATA[<p>Very nice thank you but as a previous poster wrote this snippet of code will not load my xml scroller (Error #1009: Cannot access a property or method of a null object reference.) that&#8217;s contained in my external swf. The snippet from your chapter 1 will load the scroller though. hmmmm&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Archut</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-445</link>
		<dc:creator>Archut</dc:creator>
		<pubDate>Thu, 15 Jul 2010 01:20:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-445</guid>
		<description>Thanks for this excellent read. I liked every little bit of it. I bookmarked this and will be reading again.</description>
		<content:encoded><![CDATA[<p>Thanks for this excellent read. I liked every little bit of it. I bookmarked this and will be reading again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: estong</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-388</link>
		<dc:creator>estong</dc:creator>
		<pubDate>Mon, 05 Jul 2010 03:08:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-388</guid>
		<description>simply awesome! thanks</description>
		<content:encoded><![CDATA[<p>simply awesome! thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Lapczynski</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-387</link>
		<dc:creator>Adam Lapczynski</dc:creator>
		<pubDate>Wed, 02 Jun 2010 19:53:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-387</guid>
		<description>This is a great tutorial that really breaks down how to properly preload multiple swfs. this can easily be applied to images. Thanks!
Another tool I&#039;ve used on multiple occasions to preload all swfs or images at once is team2p0&#039;s implementation, that also returns an array of files you wish to preload

http://www.microhome.com.co/com/team2p0/Preload.as</description>
		<content:encoded><![CDATA[<p>This is a great tutorial that really breaks down how to properly preload multiple swfs. this can easily be applied to images. Thanks!<br />
Another tool I&#8217;ve used on multiple occasions to preload all swfs or images at once is team2p0&#8242;s implementation, that also returns an array of files you wish to preload</p>
<p><a href="http://www.microhome.com.co/com/team2p0/Preload.as" rel="nofollow">http://www.microhome.com.co/com/team2p0/Preload.as</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jessica</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-384</link>
		<dc:creator>Jessica</dc:creator>
		<pubDate>Fri, 28 May 2010 23:17:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-384</guid>
		<description>This is EXACTLY what I needed after three days of blood, sweat and tears! I am absolutely over the moon to finally get the coding side of my website sorted. Thank you SO much for sharing this.</description>
		<content:encoded><![CDATA[<p>This is EXACTLY what I needed after three days of blood, sweat and tears! I am absolutely over the moon to finally get the coding side of my website sorted. Thank you SO much for sharing this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-381</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Sun, 16 May 2010 14:44:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-381</guid>
		<description>hey johannes,
for sure - this it what it&#039;s all about :) just use the last snippet loads multiple swfs sequentially, means one after another. in the end you&#039;ve got an array holding all your loaded clips, accessible with clipsArr[0] for the first one, e.g.

i&#039;m going to publish part #3 soon, especially going deeper into building a gallery that way.</description>
		<content:encoded><![CDATA[<p>hey johannes,<br />
for sure &#8211; this it what it&#8217;s all about :) just use the last snippet loads multiple swfs sequentially, means one after another. in the end you&#8217;ve got an array holding all your loaded clips, accessible with clipsArr[0] for the first one, e.g.</p>
<p>i&#8217;m going to publish part #3 soon, especially going deeper into building a gallery that way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johannes</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-380</link>
		<dc:creator>johannes</dc:creator>
		<pubDate>Sun, 16 May 2010 06:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-380</guid>
		<description>can this be used for a gallery where the thumbnails are &quot;synched&quot;, ie. when the first thumbnail is loaded it begins to load next and so forth. i tried to &quot;hack&quot; it in order to do so but my limited AS3 skills doesn&#039;t let me.. :-)

right now I load about 20 thumbnails all at once, it slows the whole thing down, plus it doesn&#039;t look that good when it&#039;s added to the stage randomly.</description>
		<content:encoded><![CDATA[<p>can this be used for a gallery where the thumbnails are &#8220;synched&#8221;, ie. when the first thumbnail is loaded it begins to load next and so forth. i tried to &#8220;hack&#8221; it in order to do so but my limited AS3 skills doesn&#8217;t let me.. :-)</p>
<p>right now I load about 20 thumbnails all at once, it slows the whole thing down, plus it doesn&#8217;t look that good when it&#8217;s added to the stage randomly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Desperate</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-377</link>
		<dc:creator>Desperate</dc:creator>
		<pubDate>Wed, 12 May 2010 20:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-377</guid>
		<description>I&#039;m new to flash and have been trying to figure out how to load a series of swf files, one after the other without any button. That is after swfFile01 completes, swfFile02 begins, and after it completes, swfFile03, etc.

Thanks.</description>
		<content:encoded><![CDATA[<p>I&#8217;m new to flash and have been trying to figure out how to load a series of swf files, one after the other without any button. That is after swfFile01 completes, swfFile02 begins, and after it completes, swfFile03, etc.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralph W.</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-374</link>
		<dc:creator>Ralph W.</dc:creator>
		<pubDate>Mon, 03 May 2010 09:31:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-374</guid>
		<description>just use the plain text button at the top left corner.</description>
		<content:encoded><![CDATA[<p>just use the plain text button at the top left corner.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-373</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 03 May 2010 02:39:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-373</guid>
		<description>Could you post the code without all the line numbers? We can&#039;t copy and paste with all that in there. Thanks!</description>
		<content:encoded><![CDATA[<p>Could you post the code without all the line numbers? We can&#8217;t copy and paste with all that in there. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-350</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Fri, 12 Mar 2010 02:23:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-350</guid>
		<description>Fantastic tutorial, thanks. As with most people here, I&#039;m trying to grasp AS3, this has been very helpful. I was able to get everything working, however, when you select a button to load the .swf, how do you do a crossover fade? I would like to have a smooth transition from 00.swf to 01.swf etc. I&#039;m able to get the swf to fade in, but only after you remove the previous clip. Is there a way to remove the clip once the next one has loaded.

Thanks... Colin</description>
		<content:encoded><![CDATA[<p>Fantastic tutorial, thanks. As with most people here, I&#8217;m trying to grasp AS3, this has been very helpful. I was able to get everything working, however, when you select a button to load the .swf, how do you do a crossover fade? I would like to have a smooth transition from 00.swf to 01.swf etc. I&#8217;m able to get the swf to fade in, but only after you remove the previous clip. Is there a way to remove the clip once the next one has loaded.</p>
<p>Thanks&#8230; Colin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sConvey</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-349</link>
		<dc:creator>sConvey</dc:creator>
		<pubDate>Wed, 10 Mar 2010 12:56:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-349</guid>
		<description>Marvin thanks for the response.
I have 3 buttons on my stage, each appropriately instantiated.
I have also created a MC instantiated as contentContainer 
in the same directory as my .fla I have three swf&#039;s named 00, 01, 02.swf
when I test the swf&#039;s independently using flash player they play correctly.

however when I attempt to load them into the .fla using this code I get many 
TypeError: Error #1009: Cannot access a property or method of a null object reference.
errors.

I am using in each of the swf&#039;s a component called slideshowpro/ and thumbgrid 
(as the content I want to load are the galleries on my site) and their names are often referenced in the errors.

I do have all of the image data, xml files and everything else needed to play those swfs in the 
same directory...

any ideas?

I am sure I am dong something silly. I am quite new to loading external files and also still relatively green to coding in general.
thanks for your help... cheers</description>
		<content:encoded><![CDATA[<p>Marvin thanks for the response.<br />
I have 3 buttons on my stage, each appropriately instantiated.<br />
I have also created a MC instantiated as contentContainer<br />
in the same directory as my .fla I have three swf&#8217;s named 00, 01, 02.swf<br />
when I test the swf&#8217;s independently using flash player they play correctly.</p>
<p>however when I attempt to load them into the .fla using this code I get many<br />
TypeError: Error #1009: Cannot access a property or method of a null object reference.<br />
errors.</p>
<p>I am using in each of the swf&#8217;s a component called slideshowpro/ and thumbgrid<br />
(as the content I want to load are the galleries on my site) and their names are often referenced in the errors.</p>
<p>I do have all of the image data, xml files and everything else needed to play those swfs in the<br />
same directory&#8230;</p>
<p>any ideas?</p>
<p>I am sure I am dong something silly. I am quite new to loading external files and also still relatively green to coding in general.<br />
thanks for your help&#8230; cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-346</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Tue, 09 Mar 2010 10:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-346</guid>
		<description>hey everyone, sorry for letting you wait for some days, haven&#039;t been able to response here.. but now :)

@Patrick Hill: well, this one&#039;s might occur because of the missing button-instances on stage. i will upload an example-fla tonight which might help you then!

@Michael Roebuck: thanks - i&#039;m not quite sure why this happens, but i guess the error depends on a timing problem. the swfs try to execute the code in their docclass/first frames though not completely initiated. try to use the INIT-event instead of COMPLETE. maybe send me your files so i can have a closer look at them..

@sConvey: hey, inasmuch? i mean, what&#039;s wrong? :) without any information i can&#039;t do too much but my first guess is &quot;are the button-instances on your stage declared with names?&quot; - because the lines 59-61 are trying to add eventlistener to movieclips which are already on stage (with these names in properties-window set). keep on asking, i&#039;m always glad to help :)</description>
		<content:encoded><![CDATA[<p>hey everyone, sorry for letting you wait for some days, haven&#8217;t been able to response here.. but now :)</p>
<p>@Patrick Hill: well, this one&#8217;s might occur because of the missing button-instances on stage. i will upload an example-fla tonight which might help you then!</p>
<p>@Michael Roebuck: thanks &#8211; i&#8217;m not quite sure why this happens, but i guess the error depends on a timing problem. the swfs try to execute the code in their docclass/first frames though not completely initiated. try to use the INIT-event instead of COMPLETE. maybe send me your files so i can have a closer look at them..</p>
<p>@sConvey: hey, inasmuch? i mean, what&#8217;s wrong? :) without any information i can&#8217;t do too much but my first guess is &#8220;are the button-instances on your stage declared with names?&#8221; &#8211; because the lines 59-61 are trying to add eventlistener to movieclips which are already on stage (with these names in properties-window set). keep on asking, i&#8217;m always glad to help :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sConvey</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-345</link>
		<dc:creator>sConvey</dc:creator>
		<pubDate>Mon, 08 Mar 2010 19:51:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-345</guid>
		<description>hey I am loving what I think this does
and can&#039;t wait until #3
but was wondering if a fla could at all be provided.
(I know it seems lazy but I am very visual and things click so quick 
if I have a fla accompaniment) 
I am currently playing with it and It is not working the way I know it should which I am certain is because I am missing something (read the article 4x ;-)  )
either way thanks</description>
		<content:encoded><![CDATA[<p>hey I am loving what I think this does<br />
and can&#8217;t wait until #3<br />
but was wondering if a fla could at all be provided.<br />
(I know it seems lazy but I am very visual and things click so quick<br />
if I have a fla accompaniment)<br />
I am currently playing with it and It is not working the way I know it should which I am certain is because I am missing something (read the article 4x ;-)  )<br />
either way thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Roebuck</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-344</link>
		<dc:creator>Michael Roebuck</dc:creator>
		<pubDate>Sat, 06 Mar 2010 20:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-344</guid>
		<description>Wicked tutorial! You are a genius! With clean code. You&#039;ve made a lot of people incredibly happy.


Heads up: If by the luck of the draw the child swf file that&#039;s being loaded into the parent swf happens to include some actionscript that consist of building components programmatically rather than dragging and dropping from the Components window, you might run into trouble. For example, in one of my child swfs, I&#039;m programmatically loading a DataGrid object; in a second one, I&#039;m programmatically creating a Scrollbar. In my case, I&#039;m getting &quot;TypeError: Error #2007: Parameter child must be non-null&quot; errors. 

I haven&#039;t quite pinpointed the culprit yet. You&#039;re more than welcome to provide a tip. Keep it real!</description>
		<content:encoded><![CDATA[<p>Wicked tutorial! You are a genius! With clean code. You&#8217;ve made a lot of people incredibly happy.</p>
<p>Heads up: If by the luck of the draw the child swf file that&#8217;s being loaded into the parent swf happens to include some actionscript that consist of building components programmatically rather than dragging and dropping from the Components window, you might run into trouble. For example, in one of my child swfs, I&#8217;m programmatically loading a DataGrid object; in a second one, I&#8217;m programmatically creating a Scrollbar. In my case, I&#8217;m getting &#8220;TypeError: Error #2007: Parameter child must be non-null&#8221; errors. </p>
<p>I haven&#8217;t quite pinpointed the culprit yet. You&#8217;re more than welcome to provide a tip. Keep it real!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Hill</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-342</link>
		<dc:creator>Patrick Hill</dc:creator>
		<pubDate>Wed, 03 Mar 2010 10:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-342</guid>
		<description>I tried the code and got an error 2035 message. I apparently have not properly specified the path to the .swf/s (to-be-loaded). All my .swf&#039;s are in the same directory.

I look forward to understanding ALL this code and to using it. Thank you for help.</description>
		<content:encoded><![CDATA[<p>I tried the code and got an error 2035 message. I apparently have not properly specified the path to the .swf/s (to-be-loaded). All my .swf&#8217;s are in the same directory.</p>
<p>I look forward to understanding ALL this code and to using it. Thank you for help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zugriff auf eine Funktion einer geladenen swf - Flashforum</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-334</link>
		<dc:creator>Zugriff auf eine Funktion einer geladenen swf - Flashforum</dc:creator>
		<pubDate>Fri, 26 Feb 2010 16:01:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-334</guid>
		<description>[...] &#8800; Musiker &amp; Grafiker  # Die beste Idee wird als Open Source Projekt umgesetzt! # The finer Art of Loading (#2) - It&#039;s all about timing!  # Auf MovieClips &amp; Funktionen von externen SWFs [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8800; Musiker &amp; Grafiker  # Die beste Idee wird als Open Source Projekt umgesetzt! # The finer Art of Loading (#2) &#8211; It&#39;s all about timing!  # Auf MovieClips &amp; Funktionen von externen SWFs [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-331</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Thu, 25 Feb 2010 15:17:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-331</guid>
		<description>hey, you&#039;re all welcome :) glad to help! stay tuned for part three which again will get deeper into loading processes, e.g. preloading images from an xml.</description>
		<content:encoded><![CDATA[<p>hey, you&#8217;re all welcome :) glad to help! stay tuned for part three which again will get deeper into loading processes, e.g. preloading images from an xml.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Gerald</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-330</link>
		<dc:creator>Joe Gerald</dc:creator>
		<pubDate>Thu, 25 Feb 2010 15:12:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-330</guid>
		<description>thanks so much. i was searching so long for a solution to load multiple swfs from an array. this works like a charm!</description>
		<content:encoded><![CDATA[<p>thanks so much. i was searching so long for a solution to load multiple swfs from an array. this works like a charm!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephan</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-327</link>
		<dc:creator>Stephan</dc:creator>
		<pubDate>Tue, 23 Feb 2010 10:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-327</guid>
		<description>Would donate as well! :-D Seriously this was a lot of work which really helped me taking a deeper look at this topic. Many many thanks to you, Marvin!</description>
		<content:encoded><![CDATA[<p>Would donate as well! :-D Seriously this was a lot of work which really helped me taking a deeper look at this topic. Many many thanks to you, Marvin!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AS3 Student</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-318</link>
		<dc:creator>AS3 Student</dc:creator>
		<pubDate>Wed, 17 Feb 2010 05:45:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-318</guid>
		<description>THANKS FOR THE HEADS UP MARVIN!  Just checked the other post and read your quick note, and so I went to the root page on this site.  wow this article is amazing.  going to read over it ALL carefully.  THANK YOU SIR for taking the time and writing such thorough explanations. you should have a PAYPAL DONATE button by the article.  IM SERIOUS!

THank you,
AS3 Student.</description>
		<content:encoded><![CDATA[<p>THANKS FOR THE HEADS UP MARVIN!  Just checked the other post and read your quick note, and so I went to the root page on this site.  wow this article is amazing.  going to read over it ALL carefully.  THANK YOU SIR for taking the time and writing such thorough explanations. you should have a PAYPAL DONATE button by the article.  IM SERIOUS!</p>
<p>THank you,<br />
AS3 Student.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raphael W.</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-314</link>
		<dc:creator>Raphael W.</dc:creator>
		<pubDate>Tue, 16 Feb 2010 09:33:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-314</guid>
		<description>Hi Marvin,
thank you so much for this article! Made me see some things clearer now and because I am going to work with loading stuff in future more often I will definetly follow your tips and think about everything before starting. Thanks again, also for your time to write such a detailed &amp; rich article. 

Kind regards,
Raphael.</description>
		<content:encoded><![CDATA[<p>Hi Marvin,<br />
thank you so much for this article! Made me see some things clearer now and because I am going to work with loading stuff in future more often I will definetly follow your tips and think about everything before starting. Thanks again, also for your time to write such a detailed &amp; rich article. </p>
<p>Kind regards,<br />
Raphael.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
