<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Loading and Tracking Multiple Files at the Same Time (Part 2)</title>
	<link>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2</link>
	<description>Luck is the residue of good design.</description>
	<pubDate>Tue, 06 Jan 2009 10:36:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-302865</link>
		<pubDate>Thu, 20 Nov 2008 03:24:18 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-302865</guid>
					<description>&lt;strong&gt;To Rudy ...&lt;/strong&gt;

&lt;blockquote&gt;I save .as file, but I have no idea how to import it…&lt;/blockquote&gt;

The nice thing is, it really doesn't matter where you save the AS file, as long as you let Flash know where it is.  You can do this by configuring your classpath setting to the folder that contains the class file.  Here's a freebie article I wrote for Community MX that should steer you in the right direction:

&lt;a href=&quot;http://www.communitymx.com/content/article.cfm?cid=197DE&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.communitymx.com/content/article.cfm?cid=197DE&lt;/a&gt;

If you're still stuck, by all means, write back!  I realize you may have long since moved on, because it has taken me five months to reply (I do apologize for that!) but for what it's worth, I'm here now.  :)  I've been working on two Flash books this year, and they're finally done and shipping, so I tend to have time in the evenings now.

&lt;strong&gt;To Lauren ...&lt;/strong&gt;

So glad to hear that!  :)

&lt;strong&gt;To Mike ...&lt;/strong&gt;

&lt;blockquote&gt;I'm just wondering how to reset the mcloader so that you can load in a new array of images? [...] How do I clear the mcloader so that I can use the for loop again and populate a new array to send?&lt;/blockquote&gt;

Honestly, you might not have to clear anything out.  Have you tried simply continuing to invoke the &lt;code&gt;addClip()&lt;/code&gt; method?

I'm not sure exactly what you mean by &quot;How do I clear the mcloader,&quot; because this class creates a new &lt;code&gt;MovieClipLoader&lt;/code&gt; instance for each image file, but you could certainly add a new public method somewhere inside the body of the class.  Call it &lt;code&gt;reset()&lt;/code&gt;, maybe.  Pop it right between the &lt;code&gt;loadClips()&lt;/code&gt; and &lt;code&gt;getGroupProgress()&lt;/code&gt; functions:

&lt;pre&gt;&lt;code&gt;public function reset():Void {
  _clips = new Array();
}&lt;/code&gt;&lt;/pre&gt;

Notice that the function is public, just like &lt;code&gt;loadClip()&lt;/code&gt;, which lets you invoke it on your &lt;code&gt;MultiLoader&lt;/code&gt; instance.  In theory, that should do it, because setting an &lt;code&gt;Array&lt;/code&gt; instance to a new array.  However, if you notice any odd behavior, you could take matters into your own hands and clear out each item in the &lt;code&gt;_clips&lt;/code&gt; array, just for good measure:

&lt;pre&gt;&lt;code&gt;public function reset():Void {
  var i:Number = 0;
  var len:Number = _clips.length;
  for (i = 0; i &lt; len; i++) {
    delete _clips[i];
  }
  _clips = new Array();
}&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p><strong>To Rudy &#8230;</strong></p>
<blockquote><p>I save .as file, but I have no idea how to import it…</p></blockquote>
<p>The nice thing is, it really doesn&#8217;t matter where you save the AS file, as long as you let Flash know where it is.  You can do this by configuring your classpath setting to the folder that contains the class file.  Here&#8217;s a freebie article I wrote for Community MX that should steer you in the right direction:</p>
<p><a href="http://www.communitymx.com/content/article.cfm?cid=197DE" target="_blank" rel="nofollow"><a href='http://www.communitymx.com/content/article.cfm?cid=197DE' rel='nofollow'>http://www.communitymx.com/content/article.cfm?cid=197DE</a></a></p>
<p>If you&#8217;re still stuck, by all means, write back!  I realize you may have long since moved on, because it has taken me five months to reply (I do apologize for that!) but for what it&#8217;s worth, I&#8217;m here now.  <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   I&#8217;ve been working on two Flash books this year, and they&#8217;re finally done and shipping, so I tend to have time in the evenings now.</p>
<p><strong>To Lauren &#8230;</strong></p>
<p>So glad to hear that!  <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>To Mike &#8230;</strong></p>
<blockquote><p>I&#8217;m just wondering how to reset the mcloader so that you can load in a new array of images? [&#8230;] How do I clear the mcloader so that I can use the for loop again and populate a new array to send?</p></blockquote>
<p>Honestly, you might not have to clear anything out.  Have you tried simply continuing to invoke the <code>addClip()</code> method?</p>
<p>I&#8217;m not sure exactly what you mean by &#8220;How do I clear the mcloader,&#8221; because this class creates a new <code>MovieClipLoader</code> instance for each image file, but you could certainly add a new public method somewhere inside the body of the class.  Call it <code>reset()</code>, maybe.  Pop it right between the <code>loadClips()</code> and <code>getGroupProgress()</code> functions:</p>
<pre><code>public function reset():Void {
  _clips = new Array();
}</code></pre>
<p>Notice that the function is public, just like <code>loadClip()</code>, which lets you invoke it on your <code>MultiLoader</code> instance.  In theory, that should do it, because setting an <code>Array</code> instance to a new array.  However, if you notice any odd behavior, you could take matters into your own hands and clear out each item in the <code>_clips</code> array, just for good measure:</p>
<pre><code>public function reset():Void {
  var i:Number = 0;
  var len:Number = _clips.length;
  for (i = 0; i < len; i++) {
    delete _clips[i];
  }
  _clips = new Array();
}</code></pre>
]]></content:encoded>
				</item>
	<item>
		<title>by: Mike Jarrell</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-302646</link>
		<pubDate>Wed, 19 Nov 2008 22:08:28 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-302646</guid>
					<description>I'm just wondering how to reset the mcloader so that you can load in a new array of images?

For instance I have a gallery with multiple sections and I'm using a for loop to populate the array.  How do I clear the mcloader so that I can use the for loop again and populate a new array to send?</description>
		<content:encoded><![CDATA[<p>I&#8217;m just wondering how to reset the mcloader so that you can load in a new array of images?</p>
<p>For instance I have a gallery with multiple sections and I&#8217;m using a for loop to populate the array.  How do I clear the mcloader so that I can use the for loop again and populate a new array to send?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: lauren</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-263083</link>
		<pubDate>Tue, 02 Sep 2008 16:01:34 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-263083</guid>
					<description>David -
You did it again :) I wanted to thank you for putting a huge smile on my face today! Awesome preloader for a pain in the butt site I'm trying to finish :)

Thanks again!
Lauren</description>
		<content:encoded><![CDATA[<p>David -<br />
You did it again <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I wanted to thank you for putting a huge smile on my face today! Awesome preloader for a pain in the butt site I&#8217;m trying to finish <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks again!<br />
Lauren
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Rudy</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-214006</link>
		<pubDate>Wed, 02 Jul 2008 18:44:42 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-214006</guid>
					<description>Hey everyone.

This looks very cool and I have been trying hard to make it work, however, it won't work. I save .as file, but I have no idea how to import it... I am very new to this. Can anyone help me with this. Like really, explain. I mean, what I have to put in the main movieclip to import this class, cuz whatever I try, it would throw out that class can be defined outside the file. Maybe someone can send me example...  damrudy@yahoo.com

Thank you so much. 
Rudy</description>
		<content:encoded><![CDATA[<p>Hey everyone.</p>
<p>This looks very cool and I have been trying hard to make it work, however, it won&#8217;t work. I save .as file, but I have no idea how to import it&#8230; I am very new to this. Can anyone help me with this. Like really, explain. I mean, what I have to put in the main movieclip to import this class, cuz whatever I try, it would throw out that class can be defined outside the file. Maybe someone can send me example&#8230;  <a href="mailto:damrudy@yahoo.com">damrudy@yahoo.com</a></p>
<p>Thank you so much.<br />
Rudy
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-135059</link>
		<pubDate>Sat, 16 Feb 2008 23:55:43 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-135059</guid>
					<description>&lt;strong&gt;[Note on Rob's post ...]&lt;/strong&gt;

I followed up with Rob personally, several months ago, because his post was thorough and well thought out.  His idea of limiting the number of concurrent HTTP connections is a good one, but I haven't taken the time yet to experiment with it.</description>
		<content:encoded><![CDATA[<p><strong>[Note on Rob&#8217;s post &#8230;]</strong></p>
<p>I followed up with Rob personally, several months ago, because his post was thorough and well thought out.  His idea of limiting the number of concurrent HTTP connections is a good one, but I haven&#8217;t taken the time yet to experiment with it.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-135049</link>
		<pubDate>Sat, 16 Feb 2008 23:38:01 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-135049</guid>
					<description>widdowmaker,

Thanks!</description>
		<content:encoded><![CDATA[<p>widdowmaker,</p>
<p>Thanks!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: widdowmaker</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-134932</link>
		<pubDate>Sat, 16 Feb 2008 18:10:43 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-134932</guid>
					<description>Hi, all i just want to say a huge thanks to David Stiller for making this great class!! great work!!</description>
		<content:encoded><![CDATA[<p>Hi, all i just want to say a huge thanks to David Stiller for making this great class!! great work!!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Rob</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-71329</link>
		<pubDate>Wed, 08 Aug 2007 23:42:59 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-71329</guid>
					<description>Kudos David, this is very cool. I implemented something very similar to this in a project I am working on.

However, I wonder if you are seeing the same bug that I encounter when loading multiple files at the same time (~ 20-50 files) in Internet Explorer. To replicate the issue:

1. Create a Flash movie that loads 30 or so files at the same time
2. Create a web page with a link that opens the Flash movie in a *new* (pop-up) browser window.
3. In IE, load the web page with the link to the Flash movie.
4. Click on the link. The Flash movie should open in a new window.
5. Before the movie is finished loading all the files, close the browser window containing the Flash movie.
6. Repeat steps 4-5. The Flash movie will no longer load.

The IE Flash plugin does not seem to dispose of the multiple HTTP connections properly when the page is closed while the Flash movie is using those connections, and this somehow breaks the plugin.

I suspect that a queue manager, as Brian mentioned above, would solve this issue by limiting the number of HTTP connections that are open at one time. Brian, if you were able to implement this I would be interested to hear how you did it!</description>
		<content:encoded><![CDATA[<p>Kudos David, this is very cool. I implemented something very similar to this in a project I am working on.</p>
<p>However, I wonder if you are seeing the same bug that I encounter when loading multiple files at the same time (~ 20-50 files) in Internet Explorer. To replicate the issue:</p>
<p>1. Create a Flash movie that loads 30 or so files at the same time<br />
2. Create a web page with a link that opens the Flash movie in a *new* (pop-up) browser window.<br />
3. In IE, load the web page with the link to the Flash movie.<br />
4. Click on the link. The Flash movie should open in a new window.<br />
5. Before the movie is finished loading all the files, close the browser window containing the Flash movie.<br />
6. Repeat steps 4-5. The Flash movie will no longer load.</p>
<p>The IE Flash plugin does not seem to dispose of the multiple HTTP connections properly when the page is closed while the Flash movie is using those connections, and this somehow breaks the plugin.</p>
<p>I suspect that a queue manager, as Brian mentioned above, would solve this issue by limiting the number of HTTP connections that are open at one time. Brian, if you were able to implement this I would be interested to hear how you did it!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-68269</link>
		<pubDate>Tue, 31 Jul 2007 00:20:53 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-68269</guid>
					<description>George,

In that case, set the &lt;code&gt;MovieClip._visible&lt;/code&gt; properties of the relevant movie clip containers to &lt;code&gt;false&lt;/code&gt;.  When the &lt;code&gt;onGroupProgress&lt;/code&gt; event indicates that &lt;code&gt;groupBytesLoaded&lt;/code&gt; has gotten high enough, update the &lt;code&gt;_visible&lt;/code&gt; property for all to &lt;code&gt;true&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>George,</p>
<p>In that case, set the <code>MovieClip._visible</code> properties of the relevant movie clip containers to <code>false</code>.  When the <code>onGroupProgress</code> event indicates that <code>groupBytesLoaded</code> has gotten high enough, update the <code>_visible</code> property for all to <code>true</code>.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: George</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-67477</link>
		<pubDate>Fri, 27 Jul 2007 14:31:54 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2#comment-67477</guid>
					<description>Hey guys!!

I think that you've done a fine job, and the class is working as it suppose to. My problem is this, I load the menu icons through an XML, but I don't any of them to be displayed till the swf is fully loaded (ie the icons is fully loaded).

Thanks in Advance
George</description>
		<content:encoded><![CDATA[<p>Hey guys!!</p>
<p>I think that you&#8217;ve done a fine job, and the class is working as it suppose to. My problem is this, I load the menu icons through an XML, but I don&#8217;t any of them to be displayed till the swf is fully loaded (ie the icons is fully loaded).</p>
<p>Thanks in Advance<br />
George
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
