<?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: New ImageLoader and LoadingQueue classes</title>
	<atom:link href="http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 00:04:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Siemer</title>
		<link>http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/comment-page-1/#comment-573</link>
		<dc:creator>Siemer</dc:creator>
		<pubDate>Wed, 17 Sep 2008 09:54:02 +0000</pubDate>
		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=98#comment-573</guid>
		<description>@Thomas: take a look at this class (http://www.actionscriptclasses.com/2008/queueloader-as2/), it at least pretends to do what you are looking for. The faking of the total loading progress could work for a lot of images of about the same size.</description>
		<content:encoded><![CDATA[<p>@Thomas: take a look at this class (<a href="http://www.actionscriptclasses.com/2008/queueloader-as2/" rel="nofollow">http://www.actionscriptclasses.com/2008/queueloader-as2/</a>), it at least pretends to do what you are looking for. The faking of the total loading progress could work for a lot of images of about the same size.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/comment-page-1/#comment-340</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Tue, 10 Jun 2008 11:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=98#comment-340</guid>
		<description>Hi Zeh!

I&#039;m using &quot;ImageLoader.as&quot; to preload a dynamic number of images. Which images to load is determined by an XML-file that contains 1-&gt;n number of image URL&#039;s. Using a for-loop I create a new ImageLoader for each image in the XML-file. Each ImageLoader is placed in an array for easy access, like this:

   loaderArr[i] = new ImageLoader(item);

All this works great and the images load just like they should and I get feedback on the amount of percent that each image has loaded.

The problem is that I would like to display how many percent are loaded for the TOTAL amount of images, not just an individual image. Each ImageLoader has the onUpdate event, but that only reports the loaded percentage of the particular instance to which the onUpdate event belongs, not the percentage of the whole loading queue.

Do you have an example showing how I can report the loading status (in percent) for all the images in the queue? Is this possible to do at all? I&#039;m fairly new to AS, but have worked as a web developer for many years. All things I&#039;ve tried so far has failed.

Thanks in advance!
/Thomas</description>
		<content:encoded><![CDATA[<p>Hi Zeh!</p>
<p>I&#8217;m using &#8220;ImageLoader.as&#8221; to preload a dynamic number of images. Which images to load is determined by an XML-file that contains 1-&gt;n number of image URL&#8217;s. Using a for-loop I create a new ImageLoader for each image in the XML-file. Each ImageLoader is placed in an array for easy access, like this:</p>
<p>   loaderArr[i] = new ImageLoader(item);</p>
<p>All this works great and the images load just like they should and I get feedback on the amount of percent that each image has loaded.</p>
<p>The problem is that I would like to display how many percent are loaded for the TOTAL amount of images, not just an individual image. Each ImageLoader has the onUpdate event, but that only reports the loaded percentage of the particular instance to which the onUpdate event belongs, not the percentage of the whole loading queue.</p>
<p>Do you have an example showing how I can report the loading status (in percent) for all the images in the queue? Is this possible to do at all? I&#8217;m fairly new to AS, but have worked as a web developer for many years. All things I&#8217;ve tried so far has failed.</p>
<p>Thanks in advance!<br />
/Thomas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeh</title>
		<link>http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/comment-page-1/#comment-339</link>
		<dc:creator>Zeh</dc:creator>
		<pubDate>Wed, 10 Oct 2007 13:01:06 +0000</pubDate>
		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=98#comment-339</guid>
		<description>Neil: they&#039;re code of my own, having a similar approach as these classes (ie, simplified loading) but using a more AS3-ish approach. Ie, the LoadingQueue uses events only.

Unfortunately they&#039;re not polished enough for release.</description>
		<content:encoded><![CDATA[<p>Neil: they&#8217;re code of my own, having a similar approach as these classes (ie, simplified loading) but using a more AS3-ish approach. Ie, the LoadingQueue uses events only.</p>
<p>Unfortunately they&#8217;re not polished enough for release.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil</title>
		<link>http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/comment-page-1/#comment-338</link>
		<dc:creator>Neil</dc:creator>
		<pubDate>Wed, 10 Oct 2007 04:44:35 +0000</pubDate>
		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=98#comment-338</guid>
		<description>Hi Zeh,

The problem is with &quot;polling&quot; the complete active queue on every cycle within &quot;tick&quot;. As the number of images increases the overhead becomes too much.

The solution would be to use callbacks from the queue to notify once an image is loaded, and then take action only on that. Unfortunately it is still not obvious to me how to do that as i need to get a little more familiar with the code.

Is the AS3 class that you are using of your own creation, or part of the standard library?</description>
		<content:encoded><![CDATA[<p>Hi Zeh,</p>
<p>The problem is with &#8220;polling&#8221; the complete active queue on every cycle within &#8220;tick&#8221;. As the number of images increases the overhead becomes too much.</p>
<p>The solution would be to use callbacks from the queue to notify once an image is loaded, and then take action only on that. Unfortunately it is still not obvious to me how to do that as i need to get a little more familiar with the code.</p>
<p>Is the AS3 class that you are using of your own creation, or part of the standard library?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeh</title>
		<link>http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/comment-page-1/#comment-337</link>
		<dc:creator>Zeh</dc:creator>
		<pubDate>Mon, 08 Oct 2007 14:38:02 +0000</pubDate>
		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=98#comment-337</guid>
		<description>Neil: although I&#039;ve used this with hundreds of files loading at the same time, you may as well be right.. I haven&#039;t done extensive performance tests.

I probably won&#039;t go back into it now as I&#039;m using an equivalent AS3 class now, but if you find what&#039;s the problem, be sure to post it/let me know.</description>
		<content:encoded><![CDATA[<p>Neil: although I&#8217;ve used this with hundreds of files loading at the same time, you may as well be right.. I haven&#8217;t done extensive performance tests.</p>
<p>I probably won&#8217;t go back into it now as I&#8217;m using an equivalent AS3 class now, but if you find what&#8217;s the problem, be sure to post it/let me know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil</title>
		<link>http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/comment-page-1/#comment-336</link>
		<dc:creator>Neil</dc:creator>
		<pubDate>Mon, 08 Oct 2007 14:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=98#comment-336</guid>
		<description>Hi Zeh and others,

I am having performance issues when trying to use the ImageLoader class with a larger number of files (~400). It appears that the problem is in the &quot;tick&quot; function and the fast that it re-evaluates all files in the queue, not just those that are currently loading.

Has anyone else seen anything like this or have any suggestions to improve performance?

I&#039;ll keep digging myself (hopefully not into a hole...) and if i find something i will provide feedback.</description>
		<content:encoded><![CDATA[<p>Hi Zeh and others,</p>
<p>I am having performance issues when trying to use the ImageLoader class with a larger number of files (~400). It appears that the problem is in the &#8220;tick&#8221; function and the fast that it re-evaluates all files in the queue, not just those that are currently loading.</p>
<p>Has anyone else seen anything like this or have any suggestions to improve performance?</p>
<p>I&#8217;ll keep digging myself (hopefully not into a hole&#8230;) and if i find something i will provide feedback.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeh</title>
		<link>http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/comment-page-1/#comment-335</link>
		<dc:creator>Zeh</dc:creator>
		<pubDate>Thu, 19 Jul 2007 02:09:36 +0000</pubDate>
		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=98#comment-335</guid>
		<description>Hey Niklas,

The LoadingQueue is just a queue; it&#039;s just used to delay certain loading procedures. Because of this, it doesn&#039;t really replace MovieClipLoader, nor act as a loading control. The reason why I build LoadingQueue this way is because I always use loading verification somewhere else, so it fits my own needs more than anything.

If you want to know if something has finished loading, you&#039;d need some external verification. Your onEnterFrame works, but you&#039;d need to read the data internally, as in

&lt;pre&gt;this.onEnterFrame = function() {
    var bytes_loaded = _root.frisk.friskImg.getBytesLoaded();
    var bytes_total = _root.frisk.friskImg.getBytesTotal();
    if(bytes_loaded == bytes_total &amp;&amp; bytes_total &gt; 10) {
        trace (”loaded”);
    }
}&lt;/pre&gt;

However, if you&#039;re used to using MovieClipLoader, maybe you don&#039;t need to change. This LoadingQueue is just a small step and maybe there are other queues out there that tie better with MovieClipLoader.</description>
		<content:encoded><![CDATA[<p>Hey Niklas,</p>
<p>The LoadingQueue is just a queue; it&#8217;s just used to delay certain loading procedures. Because of this, it doesn&#8217;t really replace MovieClipLoader, nor act as a loading control. The reason why I build LoadingQueue this way is because I always use loading verification somewhere else, so it fits my own needs more than anything.</p>
<p>If you want to know if something has finished loading, you&#8217;d need some external verification. Your onEnterFrame works, but you&#8217;d need to read the data internally, as in</p>
<pre>this.onEnterFrame = function() {
    var bytes_loaded = _root.frisk.friskImg.getBytesLoaded();
    var bytes_total = _root.frisk.friskImg.getBytesTotal();
    if(bytes_loaded == bytes_total &#038;&#038; bytes_total > 10) {
        trace (”loaded”);
    }
}</pre>
<p>However, if you&#8217;re used to using MovieClipLoader, maybe you don&#8217;t need to change. This LoadingQueue is just a small step and maybe there are other queues out there that tie better with MovieClipLoader.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Niklas</title>
		<link>http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/comment-page-1/#comment-334</link>
		<dc:creator>Niklas</dc:creator>
		<pubDate>Wed, 18 Jul 2007 23:41:26 +0000</pubDate>
		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=98#comment-334</guid>
		<description>Hi there zeh!

I really find your classes to be extremely useful. I&#039;ve started to use tweener and I love it!! Your classes are always so easy to use...
How can I detect if an external asset has completed loading with the queue class? I&#039;m so used to using MoviClipLoader...
What I have is this:

var lq:LoadingQueue = new LoadingQueue(this, 1);

lq.addMovie(this.hus.husImg, &quot;img/index_hus.jpg&quot;, 1);
lq.addMovie(this.frisk.friskImg, &quot;img/index_frisk.jpg&quot;, 2);
lq.start();

bytes_loaded = _root.frisk.friskImg.getBytesLoaded();
bytes_total = _root.frisk.friskImg.getBytesTotal();

this.onEnterFrame = function() {
	if(bytes_loaded==bytes_total){
		trace (&quot;loaded&quot;);
		XMLParser.load(&quot;xml/index.xml&quot;, onFinish, myXML);
		}else{
		}
	}
But the trace starts as soon as the first img begin loading with the queue class - I just don&#039;t get what I&#039;m doing wrong here...
Somethings wrong with this detection - probably something obvious that  I just can&#039;t see... :-)</description>
		<content:encoded><![CDATA[<p>Hi there zeh!</p>
<p>I really find your classes to be extremely useful. I&#8217;ve started to use tweener and I love it!! Your classes are always so easy to use&#8230;<br />
How can I detect if an external asset has completed loading with the queue class? I&#8217;m so used to using MoviClipLoader&#8230;<br />
What I have is this:</p>
<p>var lq:LoadingQueue = new LoadingQueue(this, 1);</p>
<p>lq.addMovie(this.hus.husImg, &#8220;img/index_hus.jpg&#8221;, 1);<br />
lq.addMovie(this.frisk.friskImg, &#8220;img/index_frisk.jpg&#8221;, 2);<br />
lq.start();</p>
<p>bytes_loaded = _root.frisk.friskImg.getBytesLoaded();<br />
bytes_total = _root.frisk.friskImg.getBytesTotal();</p>
<p>this.onEnterFrame = function() {<br />
	if(bytes_loaded==bytes_total){<br />
		trace (&#8220;loaded&#8221;);<br />
		XMLParser.load(&#8220;xml/index.xml&#8221;, onFinish, myXML);<br />
		}else{<br />
		}<br />
	}<br />
But the trace starts as soon as the first img begin loading with the queue class &#8211; I just don&#8217;t get what I&#8217;m doing wrong here&#8230;<br />
Somethings wrong with this detection &#8211; probably something obvious that  I just can&#8217;t see&#8230; <img src='http://zehfernando.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeh</title>
		<link>http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/comment-page-1/#comment-333</link>
		<dc:creator>Zeh</dc:creator>
		<pubDate>Fri, 06 Jul 2007 14:09:56 +0000</pubDate>
		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=98#comment-333</guid>
		<description>Fernando: yep, I thought about it a bit. It&#039;s just that I don&#039;t use MovieClipLoader so I never put too much thought about it.

About contributing: those classes are released as open-source. So anyone can extend them and release it on their own. Although they don&#039;t have any license attached, right now I expect people to be fair use of it, including mentioning the source if they do extend and re-release a version of their own.</description>
		<content:encoded><![CDATA[<p>Fernando: yep, I thought about it a bit. It&#8217;s just that I don&#8217;t use MovieClipLoader so I never put too much thought about it.</p>
<p>About contributing: those classes are released as open-source. So anyone can extend them and release it on their own. Although they don&#8217;t have any license attached, right now I expect people to be fair use of it, including mentioning the source if they do extend and re-release a version of their own.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fernando Silva</title>
		<link>http://zehfernando.com/2007/new-imageloader-and-loadingqueue-classes/comment-page-1/#comment-332</link>
		<dc:creator>Fernando Silva</dc:creator>
		<pubDate>Fri, 06 Jul 2007 13:34:28 +0000</pubDate>
		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=98#comment-332</guid>
		<description>Hi,

the LoadingQueue class with support for listeners (like MovieClipLoader) would make this awesome, because we could know the begin, end and how much it was already loaded.

Do you accept code from others to be included on your own?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>the LoadingQueue class with support for listeners (like MovieClipLoader) would make this awesome, because we could know the begin, end and how much it was already loaded.</p>
<p>Do you accept code from others to be included on your own?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

