<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Flash CS3 Tutorial - ActionScript 3 Preloader</title>
	<link>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/</link>
	<description>Craig Campbell's Flash tutorials, insights, rantings, and general blather.</description>
	<pubDate>Thu, 21 Aug 2008 19:29:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Micke</title>
		<link>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-726</link>
		<dc:creator>Micke</dc:creator>
		<pubDate>Thu, 14 Aug 2008 09:50:59 +0000</pubDate>
		<guid>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-726</guid>
		<description>Hi Craig,

Thank you for a very good tutorial. I've got some problems with loading an external swf instead of the picture. I've tried to load it with this code 


stop();

this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);

function onProgress(e:ProgressEvent):void {
	var loaded:Number = e.target.bytesLoaded;
	var total:Number = e.target.bytesTotal;
	var pct:Number = loaded/total;
	loader_mc.scaleX = pct;
	loaded_txt.text = "Loading... " + (Math.round(pct * 100)) + "%";
}

function onComplete(e:Event):void {
	nextFrame();
	var request:URLRequest = newURLRequest("as3test.swf");
	var sida:Loader = new Loader();
	sida.load(request);
	addChild(sida);

}





but then the preloaders loading process gets interrupted. And I get this error message;  

Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed. 

Any suggestions on how to get past this?

regards Micke</description>
		<content:encoded><![CDATA[<p>Hi Craig,</p>
<p>Thank you for a very good tutorial. I&#8217;ve got some problems with loading an external swf instead of the picture. I&#8217;ve tried to load it with this code </p>
<p>stop();</p>
<p>this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);<br />
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);</p>
<p>function onProgress(e:ProgressEvent):void {<br />
	var loaded:Number = e.target.bytesLoaded;<br />
	var total:Number = e.target.bytesTotal;<br />
	var pct:Number = loaded/total;<br />
	loader_mc.scaleX = pct;<br />
	loaded_txt.text = &#8220;Loading&#8230; &#8221; + (Math.round(pct * 100)) + &#8220;%&#8221;;<br />
}</p>
<p>function onComplete(e:Event):void {<br />
	nextFrame();<br />
	var request:URLRequest = newURLRequest(&#8221;as3test.swf&#8221;);<br />
	var sida:Loader = new Loader();<br />
	sida.load(request);<br />
	addChild(sida);</p>
<p>}</p>
<p>but then the preloaders loading process gets interrupted. And I get this error message;  </p>
<p>Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed. </p>
<p>Any suggestions on how to get past this?</p>
<p>regards Micke</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TK</title>
		<link>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-657</link>
		<dc:creator>TK</dc:creator>
		<pubDate>Thu, 24 Jul 2008 20:36:36 +0000</pubDate>
		<guid>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-657</guid>
		<description>I am having a problem with this preloader in ie... works fine in firefox.  When I used your fix I get a syntax error (modulus is unexpected)... and when you publish the movie the status bar just flashes on and off and it never plays the movie.</description>
		<content:encoded><![CDATA[<p>I am having a problem with this preloader in ie&#8230; works fine in firefox.  When I used your fix I get a syntax error (modulus is unexpected)&#8230; and when you publish the movie the status bar just flashes on and off and it never plays the movie.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elliot J. Balanza</title>
		<link>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-653</link>
		<dc:creator>Elliot J. Balanza</dc:creator>
		<pubDate>Sun, 20 Jul 2008 06:44:46 +0000</pubDate>
		<guid>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-653</guid>
		<description>Simple...

Just add an scene on top of everything (with shift+f2 you enter the scene panel) and in that scene create the pre-loader.

Elliot</description>
		<content:encoded><![CDATA[<p>Simple&#8230;</p>
<p>Just add an scene on top of everything (with shift+f2 you enter the scene panel) and in that scene create the pre-loader.</p>
<p>Elliot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stealth-T4</title>
		<link>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-635</link>
		<dc:creator>Stealth-T4</dc:creator>
		<pubDate>Thu, 10 Jul 2008 15:34:03 +0000</pubDate>
		<guid>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-635</guid>
		<description>Hi Craig, I Built a complete Falsh Movie consisting of a few pictures fadding in and out with a whaite boarder around them...after finishing it I now need to and a preloader...I already have multiple frames and layers how can this be done???
Please let me know...
Thanks
Stealth-T4</description>
		<content:encoded><![CDATA[<p>Hi Craig, I Built a complete Falsh Movie consisting of a few pictures fadding in and out with a whaite boarder around them&#8230;after finishing it I now need to and a preloader&#8230;I already have multiple frames and layers how can this be done???<br />
Please let me know&#8230;<br />
Thanks<br />
Stealth-T4</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gainesville Florida Web Design</title>
		<link>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-631</link>
		<dc:creator>Gainesville Florida Web Design</dc:creator>
		<pubDate>Tue, 08 Jul 2008 20:44:52 +0000</pubDate>
		<guid>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-631</guid>
		<description>Fixed it. I had to hack togeher some codes from a few different solutions, but basically this code doesn't use any of the events that break in IE6 and 7 when reloading the already cached swf file. I used the same instance names so all you have to do is copy and paste, once 100% loaded I set it to go to and play frame 2, you can set it to go to any frame you want. Visit my website www.robertkrames.com for my contact info so you can send me your $100 tips for posting the solution, it took me like 5 hours to find it.

stop();
import flash.display.MovieClip;
import flash.events.Event;

this.addEventListener("enterFrame",onEnterFrame);
function onEnterFrame(e:Event){

loader_mc.scaleX = (this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal);
loaded_txt.text = "Loading... " + (Math.round((this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal)*100)) + "%";

if(this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
gotoAndPlay(2);
this.removeEventListener("enterFrame",onEnterFrame);
}
}</description>
		<content:encoded><![CDATA[<p>Fixed it. I had to hack togeher some codes from a few different solutions, but basically this code doesn&#8217;t use any of the events that break in IE6 and 7 when reloading the already cached swf file. I used the same instance names so all you have to do is copy and paste, once 100% loaded I set it to go to and play frame 2, you can set it to go to any frame you want. Visit my website <a href="http://www.robertkrames.com" rel="nofollow">http://www.robertkrames.com</a> for my contact info so you can send me your $100 tips for posting the solution, it took me like 5 hours to find it.</p>
<p>stop();<br />
import flash.display.MovieClip;<br />
import flash.events.Event;</p>
<p>this.addEventListener(&#8221;enterFrame&#8221;,onEnterFrame);<br />
function onEnterFrame(e:Event){</p>
<p>loader_mc.scaleX = (this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal);<br />
loaded_txt.text = &#8220;Loading&#8230; &#8221; + (Math.round((this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal)*100)) + &#8220;%&#8221;;</p>
<p>if(this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){<br />
gotoAndPlay(2);<br />
this.removeEventListener(&#8221;enterFrame&#8221;,onEnterFrame);<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gainesville Florida Web Design</title>
		<link>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-630</link>
		<dc:creator>Gainesville Florida Web Design</dc:creator>
		<pubDate>Tue, 08 Jul 2008 17:25:09 +0000</pubDate>
		<guid>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-630</guid>
		<description>Agreed, it doesn't seem to be working with IE7 after the first load, I have encountered this with other preloaders in AS3.

I'm going to look for a solution. Thank you.</description>
		<content:encoded><![CDATA[<p>Agreed, it doesn&#8217;t seem to be working with IE7 after the first load, I have encountered this with other preloaders in AS3.</p>
<p>I&#8217;m going to look for a solution. Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul D</title>
		<link>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-615</link>
		<dc:creator>Paul D</dc:creator>
		<pubDate>Wed, 25 Jun 2008 19:23:55 +0000</pubDate>
		<guid>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-615</guid>
		<description>Hello Craig,  Thanks a lot for this!  I have a quick question though, i can't seem to get this preloader to work with Internet Explorer?  It works fine with firefox? Not a web expert so i was wondering whats the deal?

thanks again</description>
		<content:encoded><![CDATA[<p>Hello Craig,  Thanks a lot for this!  I have a quick question though, i can&#8217;t seem to get this preloader to work with Internet Explorer?  It works fine with firefox? Not a web expert so i was wondering whats the deal?</p>
<p>thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nic</title>
		<link>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-603</link>
		<dc:creator>Nic</dc:creator>
		<pubDate>Wed, 18 Jun 2008 20:55:08 +0000</pubDate>
		<guid>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-603</guid>
		<description>Thank you!!! I cannot believe how many tutorials there are out there explaining why you have to make several classes to do what you have done here in less than 20 lines of code (including white space)!!! It took me some searching to find this one but I am sure glad I did. Well done :)</description>
		<content:encoded><![CDATA[<p>Thank you!!! I cannot believe how many tutorials there are out there explaining why you have to make several classes to do what you have done here in less than 20 lines of code (including white space)!!! It took me some searching to find this one but I am sure glad I did. Well done <img src='http://schoolofflash.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dstore10</title>
		<link>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-557</link>
		<dc:creator>dstore10</dc:creator>
		<pubDate>Wed, 04 Jun 2008 04:22:05 +0000</pubDate>
		<guid>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-557</guid>
		<description>Thanks heaps Craig, I think I may have scrapped through my assignment with a credit. I did reference you of course. 8)</description>
		<content:encoded><![CDATA[<p>Thanks heaps Craig, I think I may have scrapped through my assignment with a credit. I did reference you of course. <img src='http://schoolofflash.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-552</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 01 Jun 2008 04:22:00 +0000</pubDate>
		<guid>http://schoolofflash.com/2008/04/28/flash-cs3-tutorial-actionscript-3-preloader/#comment-552</guid>
		<description>If someone is experiencing the my preloader starts at 70%, or a similar issue.  It is because you have a very small flash file created where 70% of the file is the 1st frame loading bar.  Just past a 5 meg image in your second frame and you will see the loader appear at a fresh one percent as soon as it gets to 1 percent!

I hope that helps.

Also, if you want to have more than a 2 frame flash movie then in your second frame create a new action that simply says:

play();

You told it to stop in the first frame, now you have to tell it to play again in the second!  Waaalaa, hopefully this will keep others from experiencing the struggles I went through when following this tutorial!

Good work though, it was a great help in getting me started Craig!</description>
		<content:encoded><![CDATA[<p>If someone is experiencing the my preloader starts at 70%, or a similar issue.  It is because you have a very small flash file created where 70% of the file is the 1st frame loading bar.  Just past a 5 meg image in your second frame and you will see the loader appear at a fresh one percent as soon as it gets to 1 percent!</p>
<p>I hope that helps.</p>
<p>Also, if you want to have more than a 2 frame flash movie then in your second frame create a new action that simply says:</p>
<p>play();</p>
<p>You told it to stop in the first frame, now you have to tell it to play again in the second!  Waaalaa, hopefully this will keep others from experiencing the struggles I went through when following this tutorial!</p>
<p>Good work though, it was a great help in getting me started Craig!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
