<?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 (#1): Simple load &amp; unload</title>
	<atom:link href="http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/feed" rel="self" type="application/rss+xml" />
	<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-finer-art-of-loading-1-simple-load-unload</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: Mac Adobe</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-2#comment-3521</link>
		<dc:creator>Mac Adobe</dc:creator>
		<pubDate>Fri, 30 Dec 2011 08:47:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-3521</guid>
		<description>You are in reality a good webmaster. The site loading speed is amazing. It kind of feels that you&#039;re doing any unique trick. Also, The contents are masterwork. you&#039;ve performed a excellent process on this matter!</description>
		<content:encoded><![CDATA[<p>You are in reality a good webmaster. The site loading speed is amazing. It kind of feels that you&#8217;re doing any unique trick. Also, The contents are masterwork. you&#8217;ve performed a excellent process on this matter!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: karthik</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-2#comment-3412</link>
		<dc:creator>karthik</dc:creator>
		<pubDate>Wed, 30 Nov 2011 10:08:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-3412</guid>
		<description>i need to load second file after the first file was completely loaded. can any one help</description>
		<content:encoded><![CDATA[<p>i need to load second file after the first file was completely loaded. can any one help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ernie Rapin</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-2#comment-3217</link>
		<dc:creator>Ernie Rapin</dc:creator>
		<pubDate>Wed, 16 Nov 2011 09:16:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-3217</guid>
		<description>Does your blog have a contact page? I&#039;m having trouble locating it but, I&#039;d like to send you an email. I&#039;ve got some recommendations for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it expand over time.</description>
		<content:encoded><![CDATA[<p>Does your blog have a contact page? I&#8217;m having trouble locating it but, I&#8217;d like to send you an email. I&#8217;ve got some recommendations for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it expand over time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad Fluchel</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-2915</link>
		<dc:creator>Brad Fluchel</dc:creator>
		<pubDate>Fri, 21 Oct 2011 16:33:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-2915</guid>
		<description>Marvin,
This is $$$! Thank you SO much!
Brad</description>
		<content:encoded><![CDATA[<p>Marvin,<br />
This is $$$! Thank you SO much!<br />
Brad</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: San Antonio Bankruptcy Lawyer</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-2836</link>
		<dc:creator>San Antonio Bankruptcy Lawyer</dc:creator>
		<pubDate>Mon, 30 May 2011 22:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-2836</guid>
		<description>With havin so much written content do you ever run into any issues of plagorism or copyright violation? My blog has a lot of exclusive content I&#039;ve either written myself or outsourced but it looks like a lot of it is popping it up all over the web without my authorization. Do you know any methods to help prevent content from being stolen? I&#039;d genuinely appreciate it.</description>
		<content:encoded><![CDATA[<p>With havin so much written content do you ever run into any issues of plagorism or copyright violation? My blog has a lot of exclusive content I&#8217;ve either written myself or outsourced but it looks like a lot of it is popping it up all over the web without my authorization. Do you know any methods to help prevent content from being stolen? I&#8217;d genuinely appreciate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sscoder</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-2834</link>
		<dc:creator>sscoder</dc:creator>
		<pubDate>Sun, 22 May 2011 04:04:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-2834</guid>
		<description>Instead of it loading the movie. How can I make it so that a button loads the movie instead and positions it on a certain area of the stage?

And a silly question, I will be using this in different scenes loading different movie clips. Would I just have to rename the instance and var each time I place it on a new scene? AKA... I&#039;m very new to AS3.

Other then that, this works beautifully!</description>
		<content:encoded><![CDATA[<p>Instead of it loading the movie. How can I make it so that a button loads the movie instead and positions it on a certain area of the stage?</p>
<p>And a silly question, I will be using this in different scenes loading different movie clips. Would I just have to rename the instance and var each time I place it on a new scene? AKA&#8230; I&#8217;m very new to AS3.</p>
<p>Other then that, this works beautifully!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giuseppe</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-2800</link>
		<dc:creator>Giuseppe</dc:creator>
		<pubDate>Sat, 02 Apr 2011 09:26:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-2800</guid>
		<description>hi

I have several frames that load external swf and one of them upload a video to youtube but the sound of the video remains in the background when you switch to high-ul swf

could you help me and tell me how to do
thanks</description>
		<content:encoded><![CDATA[<p>hi</p>
<p>I have several frames that load external swf and one of them upload a video to youtube but the sound of the video remains in the background when you switch to high-ul swf</p>
<p>could you help me and tell me how to do<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liberty Leisure</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-2722</link>
		<dc:creator>Liberty Leisure</dc:creator>
		<pubDate>Wed, 16 Mar 2011 15:10:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-2722</guid>
		<description>I took CNA classes last year, but I wasn&#039;t prepared at all for the sheer amount of work involved with &lt;a href=&quot;http://cnaclasses.org&quot; rel=&quot;nofollow&quot;&gt;being a CNA&lt;/A&gt;. The information you provide is really helpful to new students I think, so keep it up.</description>
		<content:encoded><![CDATA[<p>I took CNA classes last year, but I wasn&#8217;t prepared at all for the sheer amount of work involved with <a href="http://cnaclasses.org" rel="nofollow">being a CNA</a>. The information you provide is really helpful to new students I think, so keep it up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Silver</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-2385</link>
		<dc:creator>Silver</dc:creator>
		<pubDate>Mon, 21 Feb 2011 16:03:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-2385</guid>
		<description>hello there..,
i want to ask you about how to implement this for unloading dynamicly loaded swf..,
what i meant by dynamic is that i just use 1 loader class variable to repeatedly load external swf.this is by done not using simple loop but to wait for each swf loaded and then check if there is still more swf to be loaded, if it is then call the load function again.

thanks..,</description>
		<content:encoded><![CDATA[<p>hello there..,<br />
i want to ask you about how to implement this for unloading dynamicly loaded swf..,<br />
what i meant by dynamic is that i just use 1 loader class variable to repeatedly load external swf.this is by done not using simple loop but to wait for each swf loaded and then check if there is still more swf to be loaded, if it is then call the load function again.</p>
<p>thanks..,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bone2moan</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-2201</link>
		<dc:creator>bone2moan</dc:creator>
		<pubDate>Sun, 06 Feb 2011 04:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-2201</guid>
		<description>using this code to load unload simple flash games for kids

controls games of some not operating

any ideas</description>
		<content:encoded><![CDATA[<p>using this code to load unload simple flash games for kids</p>
<p>controls games of some not operating</p>
<p>any ideas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stick2basics</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-2071</link>
		<dc:creator>stick2basics</dc:creator>
		<pubDate>Tue, 01 Feb 2011 08:28:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-2071</guid>
		<description>I&#039;m using the following code to load a page where I have a gallery. I&#039;m loading the gallery from a SWF file. THis is my first Flash website and I&#039;m having some issues. The page loads fine, the button loads and I click it and the swf file loads. But, it doesn&#039;t load in the center of the page...It is off to the top left and it overlaps the home, contact, etc, buttons. THen, when I go to to any other page the swf file continues to play and it won&#039;t stop. Can somebody give me some advice...?

The page loads at frame 23 and goes to frame 44. THat&#039;s where I have the code below.

stop();

movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF);

var fl_Loader:Loader;
var fl_ToLoad:Boolean = true;

function fl_ClickToLoadUnloadSWF(event:MouseEvent):void
{
	if(fl_ToLoad)
	{
		fl_Loader = new Loader();
		fl_Loader.load(new URLRequest(&quot;http://www.mywebsite.com/gallerie4website.swf&quot;));
		addChild(fl_Loader);
	}
	else
	{
		fl_Loader.unload();
		removeChild(fl_Loader);
		fl_Loader = null;
	}
	// Toggle whether you want to load or unload the SWF
	fl_ToLoad = !fl_ToLoad;
}

stop();</description>
		<content:encoded><![CDATA[<p>I&#8217;m using the following code to load a page where I have a gallery. I&#8217;m loading the gallery from a SWF file. THis is my first Flash website and I&#8217;m having some issues. The page loads fine, the button loads and I click it and the swf file loads. But, it doesn&#8217;t load in the center of the page&#8230;It is off to the top left and it overlaps the home, contact, etc, buttons. THen, when I go to to any other page the swf file continues to play and it won&#8217;t stop. Can somebody give me some advice&#8230;?</p>
<p>The page loads at frame 23 and goes to frame 44. THat&#8217;s where I have the code below.</p>
<p>stop();</p>
<p>movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF);</p>
<p>var fl_Loader:Loader;<br />
var fl_ToLoad:Boolean = true;</p>
<p>function fl_ClickToLoadUnloadSWF(event:MouseEvent):void<br />
{<br />
	if(fl_ToLoad)<br />
	{<br />
		fl_Loader = new Loader();<br />
		fl_Loader.load(new URLRequest(&#8220;http://www.mywebsite.com/gallerie4website.swf&#8221;));<br />
		addChild(fl_Loader);<br />
	}<br />
	else<br />
	{<br />
		fl_Loader.unload();<br />
		removeChild(fl_Loader);<br />
		fl_Loader = null;<br />
	}<br />
	// Toggle whether you want to load or unload the SWF<br />
	fl_ToLoad = !fl_ToLoad;<br />
}</p>
<p>stop();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Segara (novice at AS3)</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-1934</link>
		<dc:creator>Segara (novice at AS3)</dc:creator>
		<pubDate>Sun, 26 Dec 2010 09:36:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-1934</guid>
		<description>Ops I forgot to add some of more code here.

Try having this:

KEYFRAME 1:

var _swfLoader:Loader;
var _swfContent:MovieClip;
_swfLoader = new Loader();
var a:Number=0;

--------------------------------------------------------------
KEYFRAME 2:

//I still use MovieClips and then changing them into buttons...
//You may create button from the start [cont]
button1.addEventListener(MouseEvent.CLICK,clickHandlerButton);
button1.buttonMode = true; //[cont] and avoid using this string
function clickHandlerButton(evt:Object):void
{
if (a == 1)
        {
//in original code there is a function which performs these commands. 
	_swfLoader.unloadAndStop();
	removeChild(_swfContent);
	_swfContent = null;
//You could call that function (haven&#039;t tried doing that).
	a = 0;
	} 


if (a == 0)
        {
//REST of the code = Refer to the earlier post to know about &quot;REST&quot;
a=1;
        }
}
--------------------------------------------------------------
KEYFRAME 3:

gotoAndPlay(2);
--------------------------------------------------------------
That&#039;s all.
This solution-code should reload your SWF each time you click on the button1.
[click]
[load]

[click]
[unload]
[load]

[click]
[unload]
[load]
... 


Sorry for quite long comment...
Hope this helps and I haven&#039;t forgotten anything to mention any more.</description>
		<content:encoded><![CDATA[<p>Ops I forgot to add some of more code here.</p>
<p>Try having this:</p>
<p>KEYFRAME 1:</p>
<p>var _swfLoader:Loader;<br />
var _swfContent:MovieClip;<br />
_swfLoader = new Loader();<br />
var a:Number=0;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
KEYFRAME 2:</p>
<p>//I still use MovieClips and then changing them into buttons&#8230;<br />
//You may create button from the start [cont]<br />
button1.addEventListener(MouseEvent.CLICK,clickHandlerButton);<br />
button1.buttonMode = true; //[cont] and avoid using this string<br />
function clickHandlerButton(evt:Object):void<br />
{<br />
if (a == 1)<br />
        {<br />
//in original code there is a function which performs these commands.<br />
	_swfLoader.unloadAndStop();<br />
	removeChild(_swfContent);<br />
	_swfContent = null;<br />
//You could call that function (haven&#8217;t tried doing that).<br />
	a = 0;<br />
	} </p>
<p>if (a == 0)<br />
        {<br />
//REST of the code = Refer to the earlier post to know about &#8220;REST&#8221;<br />
a=1;<br />
        }<br />
}<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
KEYFRAME 3:</p>
<p>gotoAndPlay(2);<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
That&#8217;s all.<br />
This solution-code should reload your SWF each time you click on the button1.<br />
[click]<br />
[load]</p>
<p>[click]<br />
[unload]<br />
[load]</p>
<p>[click]<br />
[unload]<br />
[load]<br />
&#8230; </p>
<p>Sorry for quite long comment&#8230;<br />
Hope this helps and I haven&#8217;t forgotten anything to mention any more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Segara (novice at AS3)</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-1933</link>
		<dc:creator>Segara (novice at AS3)</dc:creator>
		<pubDate>Sun, 26 Dec 2010 09:06:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-1933</guid>
		<description>Q:
is there a way to set the x, y, z for the loaded swf file?
**********************************************************
A: 
_swfContent.x = ;
_swfContent.y = ;
_swfContent.z = ;

==========================================================
=====================ANOTHER QUESTION=====================
==========================================================
Q:
... I created an instance of the close button in the loaded swf, but can&#039;t get it to unload the swf...

Would it be possible to clarify this a bit? 
*******************************************
A:
Pay attention on the string of the code, which is:
_swfLoader = new Loader();

I did the following for the code to work:

&#124;&#124;&#124;If you wish to use this script like so you would be able to use it with only just 1 KeyFrame make instead 3 KeyFrames&#124;&#124;&#124;

Along with the:
		var _swfLoader:Loader;
		var _swfContent:MovieClip;
                             +
		_swfLoader = new Loader(); (I cut from the code only this)

Cut &amp; Paste these to the: KEYFRAME 1.
----------------------------------------------------------
Copy &amp; Paste the REST of the whole script 

(no second part, e.g. without the code that starts with:
var _closeEvent:Event = new Event(&quot;close&quot;, true, false);)

to the KEYFRAME 2.
----------------------------------------------------------
Write a code for the KEYFRAME 3:
gotoAndPlay(2);


This is my version of how to set up any variable after defining them, and run them no more than once for the whole time, unless referred to the KEYFRAME 1  once again throughout the coding.

Hope this helps someone.</description>
		<content:encoded><![CDATA[<p>Q:<br />
is there a way to set the x, y, z for the loaded swf file?<br />
**********************************************************<br />
A:<br />
_swfContent.x = ;<br />
_swfContent.y = ;<br />
_swfContent.z = ;</p>
<p>==========================================================<br />
=====================ANOTHER QUESTION=====================<br />
==========================================================<br />
Q:<br />
&#8230; I created an instance of the close button in the loaded swf, but can&#8217;t get it to unload the swf&#8230;</p>
<p>Would it be possible to clarify this a bit?<br />
*******************************************<br />
A:<br />
Pay attention on the string of the code, which is:<br />
_swfLoader = new Loader();</p>
<p>I did the following for the code to work:</p>
<p>|||If you wish to use this script like so you would be able to use it with only just 1 KeyFrame make instead 3 KeyFrames|||</p>
<p>Along with the:<br />
		var _swfLoader:Loader;<br />
		var _swfContent:MovieClip;<br />
                             +<br />
		_swfLoader = new Loader(); (I cut from the code only this)</p>
<p>Cut &amp; Paste these to the: KEYFRAME 1.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Copy &amp; Paste the REST of the whole script </p>
<p>(no second part, e.g. without the code that starts with:<br />
var _closeEvent:Event = new Event(&#8220;close&#8221;, true, false);)</p>
<p>to the KEYFRAME 2.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Write a code for the KEYFRAME 3:<br />
gotoAndPlay(2);</p>
<p>This is my version of how to set up any variable after defining them, and run them no more than once for the whole time, unless referred to the KEYFRAME 1  once again throughout the coding.</p>
<p>Hope this helps someone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Meghan</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-1874</link>
		<dc:creator>Meghan</dc:creator>
		<pubDate>Sun, 12 Dec 2010 17:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-1874</guid>
		<description>I used the code and it works perfect.  The only issue I ran into is when I have published the file, the SWF would not play.  A gray section is shown.  Any help?

Thanks.</description>
		<content:encoded><![CDATA[<p>I used the code and it works perfect.  The only issue I ran into is when I have published the file, the SWF would not play.  A gray section is shown.  Any help?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stine</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-1806</link>
		<dc:creator>Stine</dc:creator>
		<pubDate>Sun, 17 Oct 2010 14:34:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-1806</guid>
		<description>Thank you very much for this tutorial! 
I would love for my loader to display the external swf in the center of my main swf. So one question.. is there a way to set the x, y, z for the loaded swf file?

Thank you again!</description>
		<content:encoded><![CDATA[<p>Thank you very much for this tutorial!<br />
I would love for my loader to display the external swf in the center of my main swf. So one question.. is there a way to set the x, y, z for the loaded swf file?</p>
<p>Thank you again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: [Actionscript 3] As3+on click button+load swf file</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-1803</link>
		<dc:creator>[Actionscript 3] As3+on click button+load swf file</dc:creator>
		<pubDate>Thu, 14 Oct 2010 17:08:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-1803</guid>
		<description>[...] As3+on click button+load swf file     Load &amp; Unload SWF Tutorial (AS3) &#124; Beautify Code Blog  this helped me. The next article has information on loading multiple SWF&#039;s              Reply With [...]</description>
		<content:encoded><![CDATA[<p>[...] As3+on click button+load swf file     Load &amp; Unload SWF Tutorial (AS3) | Beautify Code Blog  this helped me. The next article has information on loading multiple SWF&#039;s              Reply With [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 熱水器</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-1802</link>
		<dc:creator>熱水器</dc:creator>
		<pubDate>Tue, 12 Oct 2010 03:55:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-1802</guid>
		<description>I understand the 2concern;I am very z sad to hear that you got your Supra fixed. I remember reading about some of your problems5x !.</description>
		<content:encoded><![CDATA[<p>I understand the 2concern;I am very z sad to hear that you got your Supra fixed. I remember reading about some of your problems5x !.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Herman</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-1795</link>
		<dc:creator>Herman</dc:creator>
		<pubDate>Wed, 22 Sep 2010 14:18:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-1795</guid>
		<description>how i make if i want to place button to load swfs.

a.addEventListener(MouseEvent.MOUSE_DOWN, cargaa);
b.addEventListener(MouseEvent.MOUSE_DOWN, cargab);
c.addEventListener(MouseEvent.MOUSE_DOWN, cargac);


function cargaa():void {

      loadSWF(&quot;a.swf&quot;);

     
}

function cargab():void {

      loadSWF(&quot;carro1.swf&quot;);

     
}

function cargac():void {

      loadSWF(&quot;a.swf&quot;);

     
}

i make this but say error 1063. Can you help me.</description>
		<content:encoded><![CDATA[<p>how i make if i want to place button to load swfs.</p>
<p>a.addEventListener(MouseEvent.MOUSE_DOWN, cargaa);<br />
b.addEventListener(MouseEvent.MOUSE_DOWN, cargab);<br />
c.addEventListener(MouseEvent.MOUSE_DOWN, cargac);</p>
<p>function cargaa():void {</p>
<p>      loadSWF(&#8220;a.swf&#8221;);</p>
<p>}</p>
<p>function cargab():void {</p>
<p>      loadSWF(&#8220;carro1.swf&#8221;);</p>
<p>}</p>
<p>function cargac():void {</p>
<p>      loadSWF(&#8220;a.swf&#8221;);</p>
<p>}</p>
<p>i make this but say error 1063. Can you help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Solly</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-1780</link>
		<dc:creator>Solly</dc:creator>
		<pubDate>Thu, 16 Sep 2010 13:33:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-1780</guid>
		<description>Hi

I have uploaded the swf 
My swf plays from the middle when I uploaded it to the website.

What I think happens is that the swf starts playing in the background when the load command is given. It is only visible when we put it on stage through addchild command. 

The swf size is about 2.5 MB. 

Kindly suggest.

Thanks

Solly</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I have uploaded the swf<br />
My swf plays from the middle when I uploaded it to the website.</p>
<p>What I think happens is that the swf starts playing in the background when the load command is given. It is only visible when we put it on stage through addchild command. </p>
<p>The swf size is about 2.5 MB. </p>
<p>Kindly suggest.</p>
<p>Thanks</p>
<p>Solly</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-1705</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Mon, 06 Sep 2010 08:54:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-1705</guid>
		<description>hey man im a total beginner with programming, flash or actionscript - thats almost 4 days now! im setting up my online portolio site, everythings been great, ure codes finally helped me to work out the separate project clips, and their load/unload buttons! thank you!
i do have however a small problem. for my main timeline ive found this preloader code that works perfectly:

this.addEventListener(Event.ENTER_FRAME, loading);

function loading(e:Event):void{

var total:Number = this.stage.loaderInfo.bytesTotal;
var loaded:Number = this.stage.loaderInfo.bytesLoaded;

bar_mc.scaleX = loaded/total;


if (total == loaded){
bar_mc.visible=false	
}

...where bar_mc obviously (not for me! :) ) is my preloader clip.


now when i go to frame 5 i placed your code and my first project portfolio clip loads...but i just cannot embed the above preloader code into yours! i do want to use my bar_mc, not some template progressbar, so what should i do? i keep getting the errors:




ComponentShim (Compiled Clip), Line 1	5000: The class &#039;fl.core.ComponentShim&#039; must subclass &#039;flash.display.MovieClip&#039; since it is linked to a library symbol of that type.


ComponentShim (Compiled Clip), Line 1	5000: The class &#039;fl.controls.ProgressBar&#039; must subclass &#039;flash.display.MovieClip&#039; since it is linked to a library symbol of that type.



thank you and excuse me for bothering u with such on abvious stupid question !</description>
		<content:encoded><![CDATA[<p>hey man im a total beginner with programming, flash or actionscript &#8211; thats almost 4 days now! im setting up my online portolio site, everythings been great, ure codes finally helped me to work out the separate project clips, and their load/unload buttons! thank you!<br />
i do have however a small problem. for my main timeline ive found this preloader code that works perfectly:</p>
<p>this.addEventListener(Event.ENTER_FRAME, loading);</p>
<p>function loading(e:Event):void{</p>
<p>var total:Number = this.stage.loaderInfo.bytesTotal;<br />
var loaded:Number = this.stage.loaderInfo.bytesLoaded;</p>
<p>bar_mc.scaleX = loaded/total;</p>
<p>if (total == loaded){<br />
bar_mc.visible=false<br />
}</p>
<p>&#8230;where bar_mc obviously (not for me! :) ) is my preloader clip.</p>
<p>now when i go to frame 5 i placed your code and my first project portfolio clip loads&#8230;but i just cannot embed the above preloader code into yours! i do want to use my bar_mc, not some template progressbar, so what should i do? i keep getting the errors:</p>
<p>ComponentShim (Compiled Clip), Line 1	5000: The class &#8216;fl.core.ComponentShim&#8217; must subclass &#8216;flash.display.MovieClip&#8217; since it is linked to a library symbol of that type.</p>
<p>ComponentShim (Compiled Clip), Line 1	5000: The class &#8216;fl.controls.ProgressBar&#8217; must subclass &#8216;flash.display.MovieClip&#8217; since it is linked to a library symbol of that type.</p>
<p>thank you and excuse me for bothering u with such on abvious stupid question !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lizzie</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-1631</link>
		<dc:creator>Lizzie</dc:creator>
		<pubDate>Thu, 26 Aug 2010 18:44:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-1631</guid>
		<description>Hi Marvin,

You may have answered this already, but I am pretty slow when it comes to programming with as3. I have a swf that has a button that when clicked, will load an external swf. In the external swf I  have an &quot;X&quot; movieclip. Is there a way to have this movieclip make the swf remove itself?

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi Marvin,</p>
<p>You may have answered this already, but I am pretty slow when it comes to programming with as3. I have a swf that has a button that when clicked, will load an external swf. In the external swf I  have an &#8220;X&#8221; movieclip. Is there a way to have this movieclip make the swf remove itself?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Владислав</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-515</link>
		<dc:creator>Владислав</dc:creator>
		<pubDate>Wed, 21 Jul 2010 19:41:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-515</guid>
		<description>Спасибо за ответы на все вопросы :) Действительно узнал много нового. Правда до конца так и не разобрался что и откуда.</description>
		<content:encoded><![CDATA[<p>Спасибо за ответы на все вопросы :) Действительно узнал много нового. Правда до конца так и не разобрался что и откуда.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Legal Sounds</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-478</link>
		<dc:creator>Legal Sounds</dc:creator>
		<pubDate>Sun, 18 Jul 2010 14:48:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-478</guid>
		<description>Pretty good post. I just came across your site and wanted to say that I have really enjoyed reading your opinions. Any way I&#039;ll be subscribing to your feed and I hope you post again soon.</description>
		<content:encoded><![CDATA[<p>Pretty good post. I just came across your site and wanted to say that I have really enjoyed reading your opinions. Any way I&#8217;ll be subscribing to your feed and I hope you post again soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elkin Siabato</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-456</link>
		<dc:creator>Elkin Siabato</dc:creator>
		<pubDate>Fri, 16 Jul 2010 01:37:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-456</guid>
		<description>Muchas gracias por el unloadAndStop()... me sirvio de mucho!</description>
		<content:encoded><![CDATA[<p>Muchas gracias por el unloadAndStop()&#8230; me sirvio de mucho!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CNA jobs</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-376</link>
		<dc:creator>CNA jobs</dc:creator>
		<pubDate>Wed, 05 May 2010 10:09:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-376</guid>
		<description>What a great resource!</description>
		<content:encoded><![CDATA[<p>What a great resource!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam76</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-371</link>
		<dc:creator>sam76</dc:creator>
		<pubDate>Thu, 29 Apr 2010 06:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-371</guid>
		<description>I am working in a linear presentation in which 10swf files load one after another in a main swf movie. I see your code above but not able to do it properly. can you please help by joining the code in which movie load/unload and automatically jump to another swf and so on.

Thank You Very Much</description>
		<content:encoded><![CDATA[<p>I am working in a linear presentation in which 10swf files load one after another in a main swf movie. I see your code above but not able to do it properly. can you please help by joining the code in which movie load/unload and automatically jump to another swf and so on.</p>
<p>Thank You Very Much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shondy</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-366</link>
		<dc:creator>shondy</dc:creator>
		<pubDate>Sun, 18 Apr 2010 01:14:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-366</guid>
		<description>Thanks for the great tutorial.  I am however struggling with the part of how dispatching the &quot;close&quot; event works.  You said:

just write:

dispatchEvent(new Event(“close”, true, false));

Not sure where that is supposed to go...

You had a block of code you said to use on the loaded swf:

var _closeEvent:Event = new Event(&quot;close&quot;, true, false);
closeBtn.addEventListener(MouseEvent.CLICK, dispatchUnload);
function dispatchUnload(event:MouseEvent):void {
	dispatchEvent(_closeEvent);
}

I can&#039;t seem to get this to work.  I created an instance of the close button in the loaded swf, but can&#039;t get it to unload the swf.

Would it be possible to clarify this a bit?  

Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks for the great tutorial.  I am however struggling with the part of how dispatching the &#8220;close&#8221; event works.  You said:</p>
<p>just write:</p>
<p>dispatchEvent(new Event(“close”, true, false));</p>
<p>Not sure where that is supposed to go&#8230;</p>
<p>You had a block of code you said to use on the loaded swf:</p>
<p>var _closeEvent:Event = new Event(&#8220;close&#8221;, true, false);<br />
closeBtn.addEventListener(MouseEvent.CLICK, dispatchUnload);<br />
function dispatchUnload(event:MouseEvent):void {<br />
	dispatchEvent(_closeEvent);<br />
}</p>
<p>I can&#8217;t seem to get this to work.  I created an instance of the close button in the loaded swf, but can&#8217;t get it to unload the swf.</p>
<p>Would it be possible to clarify this a bit?  </p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-326</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Tue, 23 Feb 2010 08:14:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-326</guid>
		<description>hey, you can use memstats for this: http://www.beautifycode.com/fps-ms-and-mem-stats</description>
		<content:encoded><![CDATA[<p>hey, you can use memstats for this: <a href="http://www.beautifycode.com/fps-ms-and-mem-stats" rel="nofollow">http://www.beautifycode.com/fps-ms-and-mem-stats</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alejandro</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-325</link>
		<dc:creator>Alejandro</dc:creator>
		<pubDate>Mon, 22 Feb 2010 17:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-325</guid>
		<description>Thanks a lot for answering. Actually, I had guessed as much and modified your code to look like this:

function unloadSWF(event : Event):void {
	_swfLoader.unloadAndStop();
	extContainer.removeChild(_swfContent);
	extContainer._swfContent = null;
}

However, I&#039;m not quite sure it&#039;s working. How can I check if it is actually removing my loaded swf&#039;s from memory?

Thanks,</description>
		<content:encoded><![CDATA[<p>Thanks a lot for answering. Actually, I had guessed as much and modified your code to look like this:</p>
<p>function unloadSWF(event : Event):void {<br />
	_swfLoader.unloadAndStop();<br />
	extContainer.removeChild(_swfContent);<br />
	extContainer._swfContent = null;<br />
}</p>
<p>However, I&#8217;m not quite sure it&#8217;s working. How can I check if it is actually removing my loaded swf&#8217;s from memory?</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-323</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Thu, 18 Feb 2010 08:19:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-323</guid>
		<description>@alejando:
mh? just use yourMC.addChild(...) to add the _swfContainer to it. than you can keep on using the unload function as well with yourMC.removeChild(..) - simple as that.

@jeff:
for sure, part 3 will cover the beginning of writing that kind of bulk-loader yourself :) but you need some preparation and pre-knowledge to do so - at least i&#039;m not the fan of &quot;here, download and use&quot; but more &quot;learn while read, use it and tell somebody how you&#039;ve managed it&quot;.</description>
		<content:encoded><![CDATA[<p>@alejando:<br />
mh? just use yourMC.addChild(&#8230;) to add the _swfContainer to it. than you can keep on using the unload function as well with yourMC.removeChild(..) &#8211; simple as that.</p>
<p>@jeff:<br />
for sure, part 3 will cover the beginning of writing that kind of bulk-loader yourself :) but you need some preparation and pre-knowledge to do so &#8211; at least i&#8217;m not the fan of &#8220;here, download and use&#8221; but more &#8220;learn while read, use it and tell somebody how you&#8217;ve managed it&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-322</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Wed, 17 Feb 2010 22:51:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-322</guid>
		<description>Have you tried out bulk-loader?

http://code.google.com/p/bulk-loader/</description>
		<content:encoded><![CDATA[<p>Have you tried out bulk-loader?</p>
<p><a href="http://code.google.com/p/bulk-loader/" rel="nofollow">http://code.google.com/p/bulk-loader/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alejandro</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-320</link>
		<dc:creator>Alejandro</dc:creator>
		<pubDate>Wed, 17 Feb 2010 20:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-320</guid>
		<description>Great tutorial! I have just one question. What if I want to load the swf inside an empty movieclip? I managed to load it, but how will I have to modify your code in order to unload it?

Thanks!</description>
		<content:encoded><![CDATA[<p>Great tutorial! I have just one question. What if I want to load the swf inside an empty movieclip? I managed to load it, but how will I have to modify your code in order to unload it?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-313</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Tue, 16 Feb 2010 02:00:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-313</guid>
		<description>hey student,
i recently published an article about that. you can check it out.</description>
		<content:encoded><![CDATA[<p>hey student,<br />
i recently published an article about that. you can check it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AS3 student</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-307</link>
		<dc:creator>AS3 student</dc:creator>
		<pubDate>Sat, 13 Feb 2010 19:53:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-307</guid>
		<description>Marvin,  
SO Happy to read your post.  THANK YOU for your consideration.  I have a good 40 hours of research and still not the best practice example to follow.  Your example, and post spoke from someone who knows what they are doing and I understand that if external .swfs are not properly unloaded then the site will just slow down.

I will be studying up and will keep an eye out on your page here.  

Best,
AS3 Student.</description>
		<content:encoded><![CDATA[<p>Marvin,<br />
SO Happy to read your post.  THANK YOU for your consideration.  I have a good 40 hours of research and still not the best practice example to follow.  Your example, and post spoke from someone who knows what they are doing and I understand that if external .swfs are not properly unloaded then the site will just slow down.</p>
<p>I will be studying up and will keep an eye out on your page here.  </p>
<p>Best,<br />
AS3 Student.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-306</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Sat, 13 Feb 2010 01:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-306</guid>
		<description>@dee: you can unload the current swf and AFTER that call the next load-swf. just pass the current swf-params through this bridge-function. 

@as3-student: 
1. yep, for sure! just set it up as an actionscript 3 project.
2. well, the direction you&#039;ve got to head is pretty simple. because my snippet allows it to use always the same loader you can easily call the unload-function and after that you need to call the load-function with the swf-path depending on the nav-button you&#039;ve clicked. well, to be honest this snippet wasn&#039;t meant to be universally used for multiple loadings as the preloading-behaviour isn&#039;t able to really preload the other swfs. only on calling - but if you&#039;re going to be stay tuned for some days i&#039;ll try my best to continue this tutorial-series and especially target website-building with external swfs. 

deal? :)</description>
		<content:encoded><![CDATA[<p>@dee: you can unload the current swf and AFTER that call the next load-swf. just pass the current swf-params through this bridge-function. </p>
<p>@as3-student:<br />
1. yep, for sure! just set it up as an actionscript 3 project.<br />
2. well, the direction you&#8217;ve got to head is pretty simple. because my snippet allows it to use always the same loader you can easily call the unload-function and after that you need to call the load-function with the swf-path depending on the nav-button you&#8217;ve clicked. well, to be honest this snippet wasn&#8217;t meant to be universally used for multiple loadings as the preloading-behaviour isn&#8217;t able to really preload the other swfs. only on calling &#8211; but if you&#8217;re going to be stay tuned for some days i&#8217;ll try my best to continue this tutorial-series and especially target website-building with external swfs. </p>
<p>deal? :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AS3 student</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-300</link>
		<dc:creator>AS3 student</dc:creator>
		<pubDate>Thu, 04 Feb 2010 16:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-300</guid>
		<description>Hello Marvin Blase,

Thank you for taking the time to help us ALL out and especially to those of us who are newer and slower at understanding AS3.

I wanted to ask a couple of things:

1. Can your code be used with Flash CS3? (Flash Pro 9.)

2. If #1 is true, then I am trying to figure out how to implement your code using my site architecture and wanted to ask for some clarification.

I would like to load an initial external.swf then I have nav on the left and would like each of them to unload the current.swf and then load the new.swf associated with that menu section.

Would you have the time to help point me in the write direction?

Thank you for your consideration.</description>
		<content:encoded><![CDATA[<p>Hello Marvin Blase,</p>
<p>Thank you for taking the time to help us ALL out and especially to those of us who are newer and slower at understanding AS3.</p>
<p>I wanted to ask a couple of things:</p>
<p>1. Can your code be used with Flash CS3? (Flash Pro 9.)</p>
<p>2. If #1 is true, then I am trying to figure out how to implement your code using my site architecture and wanted to ask for some clarification.</p>
<p>I would like to load an initial external.swf then I have nav on the left and would like each of them to unload the current.swf and then load the new.swf associated with that menu section.</p>
<p>Would you have the time to help point me in the write direction?</p>
<p>Thank you for your consideration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dee</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-296</link>
		<dc:creator>Dee</dc:creator>
		<pubDate>Mon, 25 Jan 2010 10:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-296</guid>
		<description>Hello. I have a quick question?

Here is a piece of code...

http://pastebin.com/f62c89941

My question is:
How can I call &quot;unloadSWF&quot; if the function loadSWF has been called before?</description>
		<content:encoded><![CDATA[<p>Hello. I have a quick question?</p>
<p>Here is a piece of code&#8230;</p>
<p><a href="http://pastebin.com/f62c89941" rel="nofollow">http://pastebin.com/f62c89941</a></p>
<p>My question is:<br />
How can I call &#8220;unloadSWF&#8221; if the function loadSWF has been called before?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin Moser</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-295</link>
		<dc:creator>justin Moser</dc:creator>
		<pubDate>Wed, 20 Jan 2010 13:51:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-295</guid>
		<description>ahh ok, here the link to the zip file containing the full document class file, the site.fla, a stats class, and ive replaced the swfs that were loading in, with example ones, as the real swfs contain copyrighted material.

http://www.baysickdesign.com/resources/Help files.zip

Thanks alot!</description>
		<content:encoded><![CDATA[<p>ahh ok, here the link to the zip file containing the full document class file, the site.fla, a stats class, and ive replaced the swfs that were loading in, with example ones, as the real swfs contain copyrighted material.</p>
<p><a href="http://www.baysickdesign.com/resources/Help" rel="nofollow">http://www.baysickdesign.com/resources/Help</a> files.zip</p>
<p>Thanks alot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-294</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Wed, 20 Jan 2010 13:30:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-294</guid>
		<description>well, i can&#039;t compile without a .fla :)</description>
		<content:encoded><![CDATA[<p>well, i can&#8217;t compile without a .fla :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin Moser</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-293</link>
		<dc:creator>justin Moser</dc:creator>
		<pubDate>Wed, 20 Jan 2010 13:08:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-293</guid>
		<description>hey, thanks a lot, here&#039;s the link to the action script class I&#039;m using as the document class for the site this is going to be for:

http://www.baysickdesign.com/resources/loaders_examplecode.zip

also, one last question, and its a bit weird, when you look at the code, I wonder if you&#039;d be able to notice why it is, that when the swf is compiled, the second button (Nav2 in the code) only works after the first button has been clicked...weird! Could you let me know please when youve downloaded that, so i can remove it from my server.

Thanks so much :)</description>
		<content:encoded><![CDATA[<p>hey, thanks a lot, here&#8217;s the link to the action script class I&#8217;m using as the document class for the site this is going to be for:</p>
<p><a href="http://www.baysickdesign.com/resources/loaders_examplecode.zip" rel="nofollow">http://www.baysickdesign.com/resources/loaders_examplecode.zip</a></p>
<p>also, one last question, and its a bit weird, when you look at the code, I wonder if you&#8217;d be able to notice why it is, that when the swf is compiled, the second button (Nav2 in the code) only works after the first button has been clicked&#8230;weird! Could you let me know please when youve downloaded that, so i can remove it from my server.</p>
<p>Thanks so much :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-292</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Wed, 20 Jan 2010 12:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-292</guid>
		<description>hey, for sure - i&#039;ll try having a look later then.</description>
		<content:encoded><![CDATA[<p>hey, for sure &#8211; i&#8217;ll try having a look later then.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin Moser</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-291</link>
		<dc:creator>justin Moser</dc:creator>
		<pubDate>Wed, 20 Jan 2010 12:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-291</guid>
		<description>Hi Marvin, would it be alright to post a link to the code I have for the buttons and loaders here?

Thanks
Justin</description>
		<content:encoded><![CDATA[<p>Hi Marvin, would it be alright to post a link to the code I have for the buttons and loaders here?</p>
<p>Thanks<br />
Justin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin Moser</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-290</link>
		<dc:creator>justin Moser</dc:creator>
		<pubDate>Wed, 20 Jan 2010 12:20:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-290</guid>
		<description>Hi Marvin
Thanks for that, im loading the swf using url requests into a loader object, for which there is new instances of these loaded when the appropriate button is loaded, so would it be simpler to use the same loader object for each button? 

thanks alot

Justin</description>
		<content:encoded><![CDATA[<p>Hi Marvin<br />
Thanks for that, im loading the swf using url requests into a loader object, for which there is new instances of these loaded when the appropriate button is loaded, so would it be simpler to use the same loader object for each button? </p>
<p>thanks alot</p>
<p>Justin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-289</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Wed, 20 Jan 2010 08:19:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-289</guid>
		<description>hi justin,
are you using the same container ever again? so the simplest thing you could do ist just overwrite the loader&#039;s content with the new swf so there will be no chance ever adding 2 swfs at the same time. if you&#039;re using multiple containers and loaders you have to iterate through them and delete them by asking if they are not null.</description>
		<content:encoded><![CDATA[<p>hi justin,<br />
are you using the same container ever again? so the simplest thing you could do ist just overwrite the loader&#8217;s content with the new swf so there will be no chance ever adding 2 swfs at the same time. if you&#8217;re using multiple containers and loaders you have to iterate through them and delete them by asking if they are not null.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin Moser</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-288</link>
		<dc:creator>justin Moser</dc:creator>
		<pubDate>Tue, 19 Jan 2010 23:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-288</guid>
		<description>Hey, great tutorial! I have one question however, I have 4 buttons which load external swf&#039;s when clicked...what i would like to know, is how to make sure that when one button is clicked, all other swfs are removed so that there is only ever one swf on stage, instead of having the swfs piling up on top of each other...

thanks alot!</description>
		<content:encoded><![CDATA[<p>Hey, great tutorial! I have one question however, I have 4 buttons which load external swf&#8217;s when clicked&#8230;what i would like to know, is how to make sure that when one button is clicked, all other swfs are removed so that there is only ever one swf on stage, instead of having the swfs piling up on top of each other&#8230;</p>
<p>thanks alot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-285</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Thu, 14 Jan 2010 22:01:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-285</guid>
		<description>hey ectype - it´s pretty easy. all you need is a count and a function that unloads the current swf and adds another. so basically just dispatch the unload event (just ask, if sth. is not clear :) at the end of your loaded swf to be listened by the loading one. the main-swf is calling a function then (in itself) to unload&amp;add a new one. 

i would try doing it this way:
create an array which holds the paths to your swfs, so e.g.:

var swfPathArr:Array = new Array(&quot;01.swf&quot;, &quot;02.swf&quot;, &quot;03.swf&quot;);

whenever a movie is finished you simply raise a count (which starts with 0). so after the 01.swf is done, the count will get 1. this count you use to tell your loading function which index (so: which swfpath) of your array it should load.

looking above in my code you simply call this loading function after your unloading is done (and therefore already removed from stage if you use my code) with 

loadSwf(swfPathArr[count]);


what will come up to you is doing a clever preloading-system which preloads the swfs already while the first one is running. but if you can wait some days i&#039;m going to publish it as a little how-to. was going to anyway, so.. hope this helped a bit - otherwise just keep asking :)</description>
		<content:encoded><![CDATA[<p>hey ectype &#8211; it´s pretty easy. all you need is a count and a function that unloads the current swf and adds another. so basically just dispatch the unload event (just ask, if sth. is not clear :) at the end of your loaded swf to be listened by the loading one. the main-swf is calling a function then (in itself) to unload&#038;add a new one. </p>
<p>i would try doing it this way:<br />
create an array which holds the paths to your swfs, so e.g.:</p>
<p>var swfPathArr:Array = new Array(&#8220;01.swf&#8221;, &#8220;02.swf&#8221;, &#8220;03.swf&#8221;);</p>
<p>whenever a movie is finished you simply raise a count (which starts with 0). so after the 01.swf is done, the count will get 1. this count you use to tell your loading function which index (so: which swfpath) of your array it should load.</p>
<p>looking above in my code you simply call this loading function after your unloading is done (and therefore already removed from stage if you use my code) with </p>
<p>loadSwf(swfPathArr[count]);</p>
<p>what will come up to you is doing a clever preloading-system which preloads the swfs already while the first one is running. but if you can wait some days i&#8217;m going to publish it as a little how-to. was going to anyway, so.. hope this helped a bit &#8211; otherwise just keep asking :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ectype</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-284</link>
		<dc:creator>ectype</dc:creator>
		<pubDate>Thu, 14 Jan 2010 07:43:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-284</guid>
		<description>Hi.  I&#039;m trying to make the transition from AS2 to AS3.  If I had a parent swf that loads a child into it and when the child reaches the end of it&#039;s animation timeline, is it possible for the child to unload itself on the current index and then load another swf to take it&#039;s place on the level or come up one level above it while the one below is unloaded?  Right now the swfs merely stack on top of each other.  I&#039;ve tried 

var _swfLoader2:Loader = new Loader();
addChildAt(_swfLoader2,1);

_swfLoader2.load(new URLRequest(&quot;ch02.swf&quot;));
stage.removeChildAt(0);

My example is like a book with chapters that automatically loads the chapters within itself when they reach their respective ends.  I know unloadmovienum() is deprecated in AS3 so I&#039;m trying to figure out the best way to execute your example in mine.  Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi.  I&#8217;m trying to make the transition from AS2 to AS3.  If I had a parent swf that loads a child into it and when the child reaches the end of it&#8217;s animation timeline, is it possible for the child to unload itself on the current index and then load another swf to take it&#8217;s place on the level or come up one level above it while the one below is unloaded?  Right now the swfs merely stack on top of each other.  I&#8217;ve tried </p>
<p>var _swfLoader2:Loader = new Loader();<br />
addChildAt(_swfLoader2,1);</p>
<p>_swfLoader2.load(new URLRequest(&#8220;ch02.swf&#8221;));<br />
stage.removeChildAt(0);</p>
<p>My example is like a book with chapters that automatically loads the chapters within itself when they reach their respective ends.  I know unloadmovienum() is deprecated in AS3 so I&#8217;m trying to figure out the best way to execute your example in mine.  Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin Blase</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-283</link>
		<dc:creator>Marvin Blase</dc:creator>
		<pubDate>Tue, 12 Jan 2010 15:02:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-283</guid>
		<description>hey dbam, the close event gets dispatched by any button or whatever in the loaded swf. just write: 

dispatchEvent(new Event(&quot;close&quot;, true, false));

this will create a new event and dispatches it - it&#039;s bubbling up and therefore reaches the loader-swf.</description>
		<content:encoded><![CDATA[<p>hey dbam, the close event gets dispatched by any button or whatever in the loaded swf. just write: </p>
<p>dispatchEvent(new Event(&#8220;close&#8221;, true, false));</p>
<p>this will create a new event and dispatches it &#8211; it&#8217;s bubbling up and therefore reaches the loader-swf.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dbam</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-275</link>
		<dc:creator>dbam</dc:creator>
		<pubDate>Sat, 02 Jan 2010 14:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-275</guid>
		<description>pretty / beautify...
I have to ask You a question,

_swfContent.addEventListener(&quot;close&quot;, unloadSWF);

Where does this &quot;close&quot; event gets dispatched?
Is it automatic, or &quot;putted in&quot; manually into the event-flow?

cheers.</description>
		<content:encoded><![CDATA[<p>pretty / beautify&#8230;<br />
I have to ask You a question,</p>
<p>_swfContent.addEventListener(&#8220;close&#8221;, unloadSWF);</p>
<p>Where does this &#8220;close&#8221; event gets dispatched?<br />
Is it automatic, or &#8220;putted in&#8221; manually into the event-flow?</p>
<p>cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simple Load &#38; Unload SWF (AS3) - Flashforum</title>
		<link>http://www.beautifycode.com/the-finer-art-of-loading-1-simple-load-unload/comment-page-1#comment-255</link>
		<dc:creator>Simple Load &#38; Unload SWF (AS3) - Flashforum</dc:creator>
		<pubDate>Fri, 13 Nov 2009 08:52:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.beautifycode.com/?p=515#comment-255</guid>
		<description>[...]  [...]</description>
		<content:encoded><![CDATA[<p>[...]  [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

