<?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&#038;utm_medium=rss&#038;utm_campaign=the-finer-art-of-loading-2-handling-multiple-swfs</link>
	<description>AS3, Adobe AIR &#38; Mobile Development</description>
	<lastBuildDate>Fri, 03 Feb 2012 18:54:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: WRV90</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-2#comment-3564</link>
		<dc:creator>WRV90</dc:creator>
		<pubDate>Thu, 02 Feb 2012 20:39:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-3564</guid>
		<description>Works great! Thanks!</description>
		<content:encoded><![CDATA[<p>Works great! Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manju</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-2#comment-3532</link>
		<dc:creator>manju</dc:creator>
		<pubDate>Mon, 16 Jan 2012 06:50:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-3532</guid>
		<description>its not good please provide another one which is better than this.</description>
		<content:encoded><![CDATA[<p>its not good please provide another one which is better than this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giovanni Castello</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-2#comment-3499</link>
		<dc:creator>Giovanni Castello</dc:creator>
		<pubDate>Thu, 08 Dec 2011 05:47:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-3499</guid>
		<description>...Need your help!  I am using Concrete5 CMS and need Flash help.
 I am looking to load &quot;multiple&quot; swf [flash] files (as in the image Slideshow) on the header block of the default template (parent page) to show all across on the selected child pages.
 - note: FYI - I need multiple swf files, because each has its own animation and I want it to load randomly, not in the same order (otherwise I&#039;d just make one long flash mov).

Now I want to able to load multiple swf files (15-20 files), on the header, like so...
1. Load swf file and play/remain on stage for say... 30 seconds each 
2. unload and simultaneously repeat the process 
3. must load random swf as if it was an images slideshow.

Any suggestions? Thanks for your help.

 //G</description>
		<content:encoded><![CDATA[<p>&#8230;Need your help!  I am using Concrete5 CMS and need Flash help.<br />
 I am looking to load &#8220;multiple&#8221; swf [flash] files (as in the image Slideshow) on the header block of the default template (parent page) to show all across on the selected child pages.<br />
 &#8211; note: FYI &#8211; I need multiple swf files, because each has its own animation and I want it to load randomly, not in the same order (otherwise I&#8217;d just make one long flash mov).</p>
<p>Now I want to able to load multiple swf files (15-20 files), on the header, like so&#8230;<br />
1. Load swf file and play/remain on stage for say&#8230; 30 seconds each<br />
2. unload and simultaneously repeat the process<br />
3. must load random swf as if it was an images slideshow.</p>
<p>Any suggestions? Thanks for your help.</p>
<p> //G</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Olley</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-2#comment-2944</link>
		<dc:creator>Marcus Olley</dc:creator>
		<pubDate>Mon, 24 Oct 2011 12:12:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2944</guid>
		<description>Hi marvin,

Im using Flash CS5 AS3 and it all seems to work ok but how would i use this line of code // swfPreloader.percentTF.text = _perc + &quot;%&quot;; to add a preloader and is this for all swf&#039;s? Also how could you tween the swf&#039;s being loaded and unloaded?

kind regards

Marcus Olley</description>
		<content:encoded><![CDATA[<p>Hi marvin,</p>
<p>Im using Flash CS5 AS3 and it all seems to work ok but how would i use this line of code // swfPreloader.percentTF.text = _perc + &#8220;%&#8221;; to add a preloader and is this for all swf&#8217;s? Also how could you tween the swf&#8217;s being loaded and unloaded?</p>
<p>kind regards</p>
<p>Marcus Olley</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yo</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-2#comment-2881</link>
		<dc:creator>Yo</dc:creator>
		<pubDate>Mon, 17 Oct 2011 20:05:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2881</guid>
		<description>Hi, as duc asked, it would be really nice to know how to make it work like a presentation one swf after onother, without have mouse events

Thanks ! Very usefull code !</description>
		<content:encoded><![CDATA[<p>Hi, as duc asked, it would be really nice to know how to make it work like a presentation one swf after onother, without have mouse events</p>
<p>Thanks ! Very usefull code !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Woods</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-2#comment-2848</link>
		<dc:creator>David Woods</dc:creator>
		<pubDate>Tue, 26 Jul 2011 15:22:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2848</guid>
		<description>I have a question. I am using the code and it works great when I run it from my desktop. The problem occurs when I run it online. Only the last swf loaded plays. The others are &quot;paused?&quot; 

I have 4 swfs, all are simple with no code. Just an animation that loops. I have my buttons set up to switch the loaded swf.

What happens is that when I click the buttons, the clips switch but only the last clip in the array actually plays. This needs to work on IE 8, and flashplayer 10.3. 

Just to test, I switched the order of the swfs in the array and again only the last loaded swf plays so I know it isn&#039;t the swfs causing the problem. I suspect it is IE 8.</description>
		<content:encoded><![CDATA[<p>I have a question. I am using the code and it works great when I run it from my desktop. The problem occurs when I run it online. Only the last swf loaded plays. The others are &#8220;paused?&#8221; </p>
<p>I have 4 swfs, all are simple with no code. Just an animation that loops. I have my buttons set up to switch the loaded swf.</p>
<p>What happens is that when I click the buttons, the clips switch but only the last clip in the array actually plays. This needs to work on IE 8, and flashplayer 10.3. </p>
<p>Just to test, I switched the order of the swfs in the array and again only the last loaded swf plays so I know it isn&#8217;t the swfs causing the problem. I suspect it is IE 8.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry Greiner</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-2#comment-2842</link>
		<dc:creator>Jerry Greiner</dc:creator>
		<pubDate>Thu, 16 Jun 2011 15:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2842</guid>
		<description>Scene 1, Layer &#039;Layer 1&#039;, Frame 1, Line 59	1120: Access of undefined property news_btn.

Scene 1, Layer &#039;Layer 1&#039;, Frame 1, Line 60	1120: Access of undefined property portfolio_btn.

Scene 1, Layer &#039;Layer 1&#039;, Frame 1, Line 61	1120: Access of undefined property contact_btn.


I keep getting this Compiler Error</description>
		<content:encoded><![CDATA[<p>Scene 1, Layer &#8216;Layer 1&#8242;, Frame 1, Line 59	1120: Access of undefined property news_btn.</p>
<p>Scene 1, Layer &#8216;Layer 1&#8242;, Frame 1, Line 60	1120: Access of undefined property portfolio_btn.</p>
<p>Scene 1, Layer &#8216;Layer 1&#8242;, Frame 1, Line 61	1120: Access of undefined property contact_btn.</p>
<p>I keep getting this Compiler Error</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antandbee</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-2#comment-2838</link>
		<dc:creator>antandbee</dc:creator>
		<pubDate>Wed, 01 Jun 2011 20:47:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2838</guid>
		<description>hello bubdy, your code is great. I have one question more. if file &quot;00.swf&quot; need to load some files &quot;Image.jpg&quot; more, how to make preloader for all of them, example:
-&quot;00.swf&quot;
&#124;----&quot;image01.jpg&quot;
&#124;----&quot;image02.jpg&quot;
&#124;----&quot;image03.jpg&quot;
&#124;----&quot;image04.jpg&quot;
-&quot;01.swf&quot;,
-&quot;02.swf</description>
		<content:encoded><![CDATA[<p>hello bubdy, your code is great. I have one question more. if file &#8220;00.swf&#8221; need to load some files &#8220;Image.jpg&#8221; more, how to make preloader for all of them, example:<br />
-&#8221;00.swf&#8221;<br />
|&#8212;-&#8221;image01.jpg&#8221;<br />
|&#8212;-&#8221;image02.jpg&#8221;<br />
|&#8212;-&#8221;image03.jpg&#8221;<br />
|&#8212;-&#8221;image04.jpg&#8221;<br />
-&#8221;01.swf&#8221;,<br />
-&#8221;02.swf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antandbee</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-2#comment-2837</link>
		<dc:creator>antandbee</dc:creator>
		<pubDate>Wed, 01 Jun 2011 20:45:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2837</guid>
		<description>hello bubdy, your code is great. I have one question more. if file &quot;00.swf&quot; need to load some files &quot;Image.jpg&quot; more, how to make preloader for all of them, example:
-&quot;00.swf&quot;
  -&quot;image01.jpg&quot;
  -&quot;image02.jpg&quot;
  -&quot;image03.jpg&quot;
  -&quot;image04.jpg&quot;
-&quot;01.swf&quot;, 
-&quot;02.swf</description>
		<content:encoded><![CDATA[<p>hello bubdy, your code is great. I have one question more. if file &#8220;00.swf&#8221; need to load some files &#8220;Image.jpg&#8221; more, how to make preloader for all of them, example:<br />
-&#8221;00.swf&#8221;<br />
  -&#8221;image01.jpg&#8221;<br />
  -&#8221;image02.jpg&#8221;<br />
  -&#8221;image03.jpg&#8221;<br />
  -&#8221;image04.jpg&#8221;<br />
-&#8221;01.swf&#8221;,<br />
-&#8221;02.swf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duc</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-2#comment-2835</link>
		<dc:creator>Duc</dc:creator>
		<pubDate>Mon, 23 May 2011 16:46:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2835</guid>
		<description>Hey Marvin, what if I want multiple swfs to play like a presentation (one after the other) and not have a &quot;Click&quot; action? Thanks</description>
		<content:encoded><![CDATA[<p>Hey Marvin, what if I want multiple swfs to play like a presentation (one after the other) and not have a &#8220;Click&#8221; action? Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruthine Burton</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-2807</link>
		<dc:creator>Ruthine Burton</dc:creator>
		<pubDate>Sat, 16 Apr 2011 22:08:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2807</guid>
		<description>Hi,
Just wanted to send thanks for your well written article.  I&#039;m learning Actionscript 3 and enjoying it whilst tearing my hair out. Found your article on day 2 of trying to solve this one. Books help, but a &#039;straight to solution&#039; help site like yours is terrific.  Got it working using .as files rather than timeline code - due to your clarity - very much looking forward to your next article on this subject.  I&#039;m now going to apply it to my own project... 

Thanks again.
Ruthine</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Just wanted to send thanks for your well written article.  I&#8217;m learning Actionscript 3 and enjoying it whilst tearing my hair out. Found your article on day 2 of trying to solve this one. Books help, but a &#8216;straight to solution&#8217; help site like yours is terrific.  Got it working using .as files rather than timeline code &#8211; due to your clarity &#8211; very much looking forward to your next article on this subject.  I&#8217;m now going to apply it to my own project&#8230; </p>
<p>Thanks again.<br />
Ruthine</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-2693</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Mon, 14 Mar 2011 00:03:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2693</guid>
		<description>Hey,
thanks for your feedback. Weird stuff but anyways, I&#039;m planning the next article on that topic soon as there are some new perspectives open to me that I&#039;d like to share. So.. yea, glad you managed to get it up and running in the end. :)</description>
		<content:encoded><![CDATA[<p>Hey,<br />
thanks for your feedback. Weird stuff but anyways, I&#8217;m planning the next article on that topic soon as there are some new perspectives open to me that I&#8217;d like to share. So.. yea, glad you managed to get it up and running in the end. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-2647</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Wed, 09 Mar 2011 14:20:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2647</guid>
		<description>Razz was right. I was having the same issue (__PreLoader__) but all I had to do to fix it in CS5 was go to Publish Settings &gt;&gt; Flash Tab &gt;&gt; Actionscript settings... and change the Default Linkage at the bottom to Merge into Code.  Then I republished the swf I was loading and it worked perfectly!</description>
		<content:encoded><![CDATA[<p>Razz was right. I was having the same issue (__PreLoader__) but all I had to do to fix it in CS5 was go to Publish Settings &gt;&gt; Flash Tab &gt;&gt; Actionscript settings&#8230; and change the Default Linkage at the bottom to Merge into Code.  Then I republished the swf I was loading and it worked perfectly!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Razz</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-2480</link>
		<dc:creator>Razz</dc:creator>
		<pubDate>Sat, 26 Feb 2011 19:42:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2480</guid>
		<description>I discovered the problem more specific to those interested, it seems this TLF textfield course the problem. So the easiest thing is to changes these (if you can).

Otherwise look here for workaround:

http://www.stevensacks.net/2010/05/28/flash-cs5-tlf-engine-causes-errors-with-loaded-swfs/

I didnt have to typecast or uncheck anything in Actionscript 3 settings as suggest above.

Hope it helps someone.

Rasmus</description>
		<content:encoded><![CDATA[<p>I discovered the problem more specific to those interested, it seems this TLF textfield course the problem. So the easiest thing is to changes these (if you can).</p>
<p>Otherwise look here for workaround:</p>
<p><a href="http://www.stevensacks.net/2010/05/28/flash-cs5-tlf-engine-causes-errors-with-loaded-swfs/" rel="nofollow">http://www.stevensacks.net/2010/05/28/flash-cs5-tlf-engine-causes-errors-with-loaded-swfs/</a></p>
<p>I didnt have to typecast or uncheck anything in Actionscript 3 settings as suggest above.</p>
<p>Hope it helps someone.</p>
<p>Rasmus</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nettod</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-2313</link>
		<dc:creator>nettod</dc:creator>
		<pubDate>Wed, 16 Feb 2011 01:04:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2313</guid>
		<description>hi, i cannot use the code! Display this error:

1120: Access of undefined property _swfLoader.
1120: Access of undefined property _swfRequest.

do you know why???</description>
		<content:encoded><![CDATA[<p>hi, i cannot use the code! Display this error:</p>
<p>1120: Access of undefined property _swfLoader.<br />
1120: Access of undefined property _swfRequest.</p>
<p>do you know why???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-2267</link>
		<dc:creator>Juan</dc:creator>
		<pubDate>Fri, 11 Feb 2011 20:33:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2267</guid>
		<description>just found out what was wrong, might be about paths or domains..im new at as3 so cant figure out how to change the code..
my file structure was like this:
(only loads main..no swfs)
home.html
swf/
  &#124;--main.swf
  &#124;--00.swf
  &#124;--01.swf
  &#124;--02.swf

this one works (everything in the same folder)
home.html
main.swf
00.swf
01.swf
02.swf</description>
		<content:encoded><![CDATA[<p>just found out what was wrong, might be about paths or domains..im new at as3 so cant figure out how to change the code..<br />
my file structure was like this:<br />
(only loads main..no swfs)<br />
home.html<br />
swf/<br />
  |&#8211;main.swf<br />
  |&#8211;00.swf<br />
  |&#8211;01.swf<br />
  |&#8211;02.swf</p>
<p>this one works (everything in the same folder)<br />
home.html<br />
main.swf<br />
00.swf<br />
01.swf<br />
02.swf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-2264</link>
		<dc:creator>Juan</dc:creator>
		<pubDate>Fri, 11 Feb 2011 20:00:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-2264</guid>
		<description>first, thanks for  this code, its been really healpful.

im having some issues with it, i got it working in my local machine..but on webserver i cant get the parent to load th 3 swfs...any suggestions?</description>
		<content:encoded><![CDATA[<p>first, thanks for  this code, its been really healpful.</p>
<p>im having some issues with it, i got it working in my local machine..but on webserver i cant get the parent to load th 3 swfs&#8230;any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: greatxam</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-1824</link>
		<dc:creator>greatxam</dc:creator>
		<pubDate>Wed, 01 Dec 2010 14:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1824</guid>
		<description>to those who have encounter error on onSwfComplete listener, try to change this code:

_swfTempClip.customID = _loadedSWF;

to this:

_swfTempClip.customID = _loadedSWFs;</description>
		<content:encoded><![CDATA[<p>to those who have encounter error on onSwfComplete listener, try to change this code:</p>
<p>_swfTempClip.customID = _loadedSWF;</p>
<p>to this:</p>
<p>_swfTempClip.customID = _loadedSWFs;</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-1815</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Thu, 11 Nov 2010 22:30:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1815</guid>
		<description>Hey all,
first of all thanks for your comments. I was a bit too stressed out lately to reply. I have to admit, that something really, really weird has changed from CS4 to CS5. I had a talk with Adobe on that and it seams like there has been some framework based changes which lead to different variable-access times. I&#039;ll try to rework this post for CS5 asap!

@TAK: can you show your declaration of contentContainer? or is it just a clip on stage?
@Josh: CS5, yup.. really weird.
@Paolo: ...
@Bruce: ... 

Please keep being patient for some more days.</description>
		<content:encoded><![CDATA[<p>Hey all,<br />
first of all thanks for your comments. I was a bit too stressed out lately to reply. I have to admit, that something really, really weird has changed from CS4 to CS5. I had a talk with Adobe on that and it seams like there has been some framework based changes which lead to different variable-access times. I&#8217;ll try to rework this post for CS5 asap!</p>
<p>@TAK: can you show your declaration of contentContainer? or is it just a clip on stage?<br />
@Josh: CS5, yup.. really weird.<br />
@Paolo: &#8230;<br />
@Bruce: &#8230; </p>
<p>Please keep being patient for some more days.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-1814</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Mon, 08 Nov 2010 23:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1814</guid>
		<description>Great code, but I have the same problem as Patrick and Hallaback. I&#039;m using CS5

Error #1056: Cannot create property customID on test1_fla.MainTimeline__Preloader__.at test/onSwfComplete(). 

Any headway with the compiling issues with CS5 vs CS4?</description>
		<content:encoded><![CDATA[<p>Great code, but I have the same problem as Patrick and Hallaback. I&#8217;m using CS5</p>
<p>Error #1056: Cannot create property customID on test1_fla.MainTimeline__Preloader__.at test/onSwfComplete(). </p>
<p>Any headway with the compiling issues with CS5 vs CS4?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paolo</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-1812</link>
		<dc:creator>Paolo</dc:creator>
		<pubDate>Fri, 22 Oct 2010 13:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1812</guid>
		<description>firstly, sorry for the double post.. my laptop has been doing some odd things lately with the trackpad.

moreso to the point though, I&#039;ve tried this code on Flash CS5, and it doesn&#039;t seem to compile at all.

On Flash CS5 I keep getting: ReferenceError: Error #1056: Cannot create property customID on _1_fla.MainTimeline__Preloader__.

I&#039;ve read up on the other posts here, and tried the suggestions like casting _sefTempClip as a MovieClip before the customID, as well unchecking and checking the &quot;Automatically declare stage instances&quot; checkbox, and I&#039;m still getting the same thing.

Next thing I may do is just save it as a CS4 document, but that&#039;s a shot in the dark right now. :/</description>
		<content:encoded><![CDATA[<p>firstly, sorry for the double post.. my laptop has been doing some odd things lately with the trackpad.</p>
<p>moreso to the point though, I&#8217;ve tried this code on Flash CS5, and it doesn&#8217;t seem to compile at all.</p>
<p>On Flash CS5 I keep getting: ReferenceError: Error #1056: Cannot create property customID on _1_fla.MainTimeline__Preloader__.</p>
<p>I&#8217;ve read up on the other posts here, and tried the suggestions like casting _sefTempClip as a MovieClip before the customID, as well unchecking and checking the &#8220;Automatically declare stage instances&#8221; checkbox, and I&#8217;m still getting the same thing.</p>
<p>Next thing I may do is just save it as a CS4 document, but that&#8217;s a shot in the dark right now. :/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mimi</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-1808</link>
		<dc:creator>Mimi</dc:creator>
		<pubDate>Wed, 20 Oct 2010 02:35:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1808</guid>
		<description>Hi marvin.
Thanks for your work.
I have this error (I&#039;m using CS4):

TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::AVM1Movie@bbc3701 to flash.display.MovieClip.
	at LoadMultipleSWFs_fla::MainTimeline/onSwfComplete()

Feedback will be appreciated.</description>
		<content:encoded><![CDATA[<p>Hi marvin.<br />
Thanks for your work.<br />
I have this error (I&#8217;m using CS4):</p>
<p>TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::AVM1Movie@bbc3701 to flash.display.MovieClip.<br />
	at LoadMultipleSWFs_fla::MainTimeline/onSwfComplete()</p>
<p>Feedback will be appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-1807</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Tue, 19 Oct 2010 14:00:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1807</guid>
		<description>Would it be possible to post your work files? BTW I&#039;m getting the following error (on CS5): ReferenceError: Error #1056: Cannot create property customID on s_fla.MainTimeline__Preloader__.
	at s_fla::MainTimeline/onSwfComplete()</description>
		<content:encoded><![CDATA[<p>Would it be possible to post your work files? BTW I&#8217;m getting the following error (on CS5): ReferenceError: Error #1056: Cannot create property customID on s_fla.MainTimeline__Preloader__.<br />
	at s_fla::MainTimeline/onSwfComplete()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TAK</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-1804</link>
		<dc:creator>TAK</dc:creator>
		<pubDate>Thu, 14 Oct 2010 19:47:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1804</guid>
		<description>Anyone get this error or know how to fix it?  I&#039;ve been struggling for a few days now!

Error: Error #2069: The Loader class does not implement this method.
at Error$/throwError()
at flash.display::Loader/addChild()
at ProfileManagementWORKING_fla::MainTimeline/onCompletePreloading()
at ProfileManagementWORKING_fla::MainTimeline/onSwfComplete()

function onCompletePreloading():void {
	contentContainer.addChild(_swfClipsArr[0]);
	
	ed.addEventListener(MouseEvent.CLICK, setContent);
	daveh.addEventListener(MouseEvent.CLICK, setContent);
	davec.addEventListener(MouseEvent.CLICK, setContent);
	objB.visible = true
	percentLoaded.visible = false;
	trace(&quot;COMPLETE5&quot;);
}

I&#039;m assuming it&#039;s the contentContainer.addChild(_swfClipsArr[0]); line?</description>
		<content:encoded><![CDATA[<p>Anyone get this error or know how to fix it?  I&#8217;ve been struggling for a few days now!</p>
<p>Error: Error #2069: The Loader class does not implement this method.<br />
at Error$/throwError()<br />
at flash.display::Loader/addChild()<br />
at ProfileManagementWORKING_fla::MainTimeline/onCompletePreloading()<br />
at ProfileManagementWORKING_fla::MainTimeline/onSwfComplete()</p>
<p>function onCompletePreloading():void {<br />
	contentContainer.addChild(_swfClipsArr[0]);</p>
<p>	ed.addEventListener(MouseEvent.CLICK, setContent);<br />
	daveh.addEventListener(MouseEvent.CLICK, setContent);<br />
	davec.addEventListener(MouseEvent.CLICK, setContent);<br />
	objB.visible = true<br />
	percentLoaded.visible = false;<br />
	trace(&#8220;COMPLETE5&#8243;);<br />
}</p>
<p>I&#8217;m assuming it&#8217;s the contentContainer.addChild(_swfClipsArr[0]); line?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andras</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-1800</link>
		<dc:creator>andras</dc:creator>
		<pubDate>Fri, 01 Oct 2010 13:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1800</guid>
		<description>You saved my day Marvin, thank you very much!

I&#039;ve tried the COMPLETE replaced by an INIT listener but still throws that &quot;Parameter child must be non null&quot;. I am wondering is it because the swfs in the array are not instanciated with a new ...() command?

As i see you haven&#039;t published the 3rd serie of these articles:) Can we perhaps wait for it or you rejected the idea?</description>
		<content:encoded><![CDATA[<p>You saved my day Marvin, thank you very much!</p>
<p>I&#8217;ve tried the COMPLETE replaced by an INIT listener but still throws that &#8220;Parameter child must be non null&#8221;. I am wondering is it because the swfs in the array are not instanciated with a new &#8230;() command?</p>
<p>As i see you haven&#8217;t published the 3rd serie of these articles:) Can we perhaps wait for it or you rejected the idea?</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-1763</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Mon, 13 Sep 2010 20:44:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1763</guid>
		<description>hi laura, patrick,
you&#039;re both using CS5? i don&#039;t know why (yet!) but it really does compile code somewhat different to cs4 ALTHOUGH this is nearly impossible to think of. but i myself have got a project which works flawlessly in cs4 but compiling it in cs5 it throws reference errors. this is one of the most weird things i ever came across while working in the ide.

anyways - can one of you (or both) send me your .fla files? i&#039;ll give it a shot then.</description>
		<content:encoded><![CDATA[<p>hi laura, patrick,<br />
you&#8217;re both using CS5? i don&#8217;t know why (yet!) but it really does compile code somewhat different to cs4 ALTHOUGH this is nearly impossible to think of. but i myself have got a project which works flawlessly in cs4 but compiling it in cs5 it throws reference errors. this is one of the most weird things i ever came across while working in the ide.</p>
<p>anyways &#8211; can one of you (or both) send me your .fla files? i&#8217;ll give it a shot then.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LauraM</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-1746</link>
		<dc:creator>LauraM</dc:creator>
		<pubDate>Fri, 10 Sep 2010 14:54:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1746</guid>
		<description>http://blog.andrewpaulsimmons.com/2007/07/referenceerror-error-1056-caused-by.html</description>
		<content:encoded><![CDATA[<p><a href="http://blog.andrewpaulsimmons.com/2007/07/referenceerror-error-1056-caused-by.html" rel="nofollow">http://blog.andrewpaulsimmons.com/2007/07/referenceerror-error-1056-caused-by.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LauraM</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs/comment-page-1#comment-1745</link>
		<dc:creator>LauraM</dc:creator>
		<pubDate>Fri, 10 Sep 2010 14:52:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=668#comment-1745</guid>
		<description>I was happy to find this code..yet :(
Patrick Brown I am getting the same error - yes I have CS5.

Gabriel - I got the same error (Error #1034)- when I tried to load a Captivate made SWF..</description>
		<content:encoded><![CDATA[<p>I was happy to find this code..yet :(<br />
Patrick Brown I am getting the same error &#8211; yes I have CS5.</p>
<p>Gabriel &#8211; I got the same error (Error #1034)- when I tried to load a Captivate made SWF..</p>
]]></content:encoded>
	</item>
	<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>
</channel>
</rss>

