<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.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: Loading an External .swf in AS3</title>
	<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/</link>
	<description>Actionscript Tutorials and Articles for AS3 and AS2 by Rob Gungor.</description>
	<pubDate>Mon, 06 Sep 2010 14:39:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
		<item>
		<title>By: Aaron</title>
		<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-341</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Tue, 16 Dec 2008 23:14:14 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-341</guid>
		<description>I'm getting this error with my solution.

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
	at flash.display::DisplayObjectContainer/removeChild()
	at screenulacra_fla::site_4/removeSprite()

oops</description>
		<content:encoded><![CDATA[<p>I&#8217;m getting this error with my solution.</p>
<p>ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.<br />
	at flash.display::DisplayObjectContainer/removeChild()<br />
	at screenulacra_fla::site_4/removeSprite()</p>
<p>oops</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-340</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Tue, 16 Dec 2008 16:17:25 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-340</guid>
		<description>sorry about the formatting

i request a bigger comment input box!!  :)</description>
		<content:encoded><![CDATA[<p>sorry about the formatting</p>
<p>i request a bigger comment input box!!  <img src='http://www.iheartactionscript.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-339</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Tue, 16 Dec 2008 16:14:33 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-339</guid>
		<description>This is how I was able to remove the .swf!

import flash.net.URLRequest; import flash.display.Loader; import flash.events.Event; import flash.events.ProgressEvent; function startLoad() { var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest(“MouseActions.swf”);
mLoader.addEventListener(Event.ENTER_FRAME, removeSWF);   //this checks if you have gotten to the frame where you want to remove the swf mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); mLoader.load(mRequest); }
function removeSWF(e:Event){
	if(currentFrame == 555){     // the frame on which you want to remove the swf
	trace("removed swf!");
	removeChild(e.currentTarget.content);
	}
 function onCompleteHandler(loadEvent:Event) {         addChild(loadEvent.currentTarget.content); } function onProgressHandler(mProgress:ProgressEvent) { var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal; trace(percent); } startLoad();


hope this helps.  thanks for the great post!</description>
		<content:encoded><![CDATA[<p>This is how I was able to remove the .swf!</p>
<p>import flash.net.URLRequest; import flash.display.Loader; import flash.events.Event; import flash.events.ProgressEvent; function startLoad() { var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest(“MouseActions.swf”);<br />
mLoader.addEventListener(Event.ENTER_FRAME, removeSWF);   //this checks if you have gotten to the frame where you want to remove the swf mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); mLoader.load(mRequest); }<br />
function removeSWF(e:Event){<br />
	if(currentFrame == 555){     // the frame on which you want to remove the swf<br />
	trace(&#8221;removed swf!&#8221;);<br />
	removeChild(e.currentTarget.content);<br />
	}<br />
 function onCompleteHandler(loadEvent:Event) {         addChild(loadEvent.currentTarget.content); } function onProgressHandler(mProgress:ProgressEvent) { var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal; trace(percent); } startLoad();</p>
<p>hope this helps.  thanks for the great post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mvdp</title>
		<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-304</link>
		<dc:creator>mvdp</dc:creator>
		<pubDate>Thu, 06 Nov 2008 14:39:03 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-304</guid>
		<description>hey, tnx for this. its basicaly what i was looking for. 
one problem tho, im just starting to work with flash so mostly just doin tutorials and such..

when trying out this code i keep ending up with the following error:

TypeError: Error #1010: A term is undefined and has no properties.
	at Untitled_fla::MainTimeline/frame1()

its probably somthing really simple, but i have no idea what to do with it..
what am i doing wrong?

tnx</description>
		<content:encoded><![CDATA[<p>hey, tnx for this. its basicaly what i was looking for.<br />
one problem tho, im just starting to work with flash so mostly just doin tutorials and such..</p>
<p>when trying out this code i keep ending up with the following error:</p>
<p>TypeError: Error #1010: A term is undefined and has no properties.<br />
	at Untitled_fla::MainTimeline/frame1()</p>
<p>its probably somthing really simple, but i have no idea what to do with it..<br />
what am i doing wrong?</p>
<p>tnx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: delta</title>
		<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-288</link>
		<dc:creator>delta</dc:creator>
		<pubDate>Wed, 29 Oct 2008 17:06:39 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-288</guid>
		<description>once i've loaded my external swf into my parent swf.....how can I communicate with it (send event info)?</description>
		<content:encoded><![CDATA[<p>once i&#8217;ve loaded my external swf into my parent swf&#8230;..how can I communicate with it (send event info)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jan</title>
		<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-221</link>
		<dc:creator>jan</dc:creator>
		<pubDate>Tue, 30 Sep 2008 14:56:42 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-221</guid>
		<description>I've run into issues with my files. I need to unload movies, but I read there is a bug with as3 with the unload script. when you select the next movie while one is still playing they play on to of each other.

Can i load my movies in to a container, would that solve my problem? If so how do i do that?
http://www.graphicmuse.com/web_help/unload.zip
thanks!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve run into issues with my files. I need to unload movies, but I read there is a bug with as3 with the unload script. when you select the next movie while one is still playing they play on to of each other.</p>
<p>Can i load my movies in to a container, would that solve my problem? If so how do i do that?<br />
<a href="http://www.graphicmuse.com/web_help/unload.zip" rel="nofollow">http://www.graphicmuse.com/web_help/unload.zip</a><br />
thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jan</title>
		<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-220</link>
		<dc:creator>jan</dc:creator>
		<pubDate>Tue, 30 Sep 2008 14:52:42 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-220</guid>
		<description>works now. I was getting a syntax error. But I just replaced the quotes and now it works.
Just in case anyone else has this issue.
http://curtismorley.com/2007/08/25/flash-cs3-flex-2-as3-error-1093/</description>
		<content:encoded><![CDATA[<p>works now. I was getting a syntax error. But I just replaced the quotes and now it works.<br />
Just in case anyone else has this issue.<br />
<a href="http://curtismorley.com/2007/08/25/flash-cs3-flex-2-as3-error-1093/" rel="nofollow">http://curtismorley.com/2007/08/25/flash-cs3-flex-2-as3-error-1093/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin</title>
		<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-219</link>
		<dc:creator>justin</dc:creator>
		<pubDate>Tue, 30 Sep 2008 05:12:26 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-219</guid>
		<description>it does work. You need to fix the dobble quotes</description>
		<content:encoded><![CDATA[<p>it does work. You need to fix the dobble quotes</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hansolo</title>
		<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-185</link>
		<dc:creator>hansolo</dc:creator>
		<pubDate>Wed, 10 Sep 2008 03:29:30 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-185</guid>
		<description>Hello,
Great post!  I'm having some issues loading certain swfs this way.  When I test it with a basic swf with just a image in it it works fine.  However, the swf that I want to load seems to run fine on its own, but when I try to load it this way within a container swf I get an odd error on the init function of the constructor.  Like it can't see the movieclips on the stage.  TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at view3$iinit().   However, I don't get this error when I run it without the preload swf.  Any ideas why?</description>
		<content:encoded><![CDATA[<p>Hello,<br />
Great post!  I&#8217;m having some issues loading certain swfs this way.  When I test it with a basic swf with just a image in it it works fine.  However, the swf that I want to load seems to run fine on its own, but when I try to load it this way within a container swf I get an odd error on the init function of the constructor.  Like it can&#8217;t see the movieclips on the stage.  TypeError: Error #1009: Cannot access a property or method of a null object reference.<br />
	at view3$iinit().   However, I don&#8217;t get this error when I run it without the preload swf.  Any ideas why?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lisa</title>
		<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-172</link>
		<dc:creator>Lisa</dc:creator>
		<pubDate>Tue, 26 Aug 2008 09:29:09 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comment-172</guid>
		<description>The code won't work for me :(. I get a syntax error in line 9. Is it me??</description>
		<content:encoded><![CDATA[<p>The code won&#8217;t work for me :(. I get a syntax error in line 9. Is it me??</p>
]]></content:encoded>
	</item>
</channel>
</rss>
