<?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: Accessing document class of an externally loaded swf with AS3</title>
	<atom:link href="http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/</link>
	<description>Calgary Flash and Flex Developer</description>
	<lastBuildDate>Sat, 14 Jan 2012 02:54:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Laura</title>
		<link>http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/comment-page-1/#comment-1452</link>
		<dc:creator>Laura</dc:creator>
		<pubDate>Wed, 16 Dec 2009 18:12:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/#comment-1452</guid>
		<description>Done! I dont think it is logical to have to go through this

In the document class I have a setter called PanelX that sets the value for the variable panelX, and in the loaded swf, this

var swf1:Object=loaderInfo.content; //taken from Vincent Rose post
var test:MovieClip=MovieClip(swf1.parent)
test.PanelX=5000

Not neat but works. Even when the variable was public, i still couldnt set it as
panelX=5000
Beats me</description>
		<content:encoded><![CDATA[<p>Done! I dont think it is logical to have to go through this</p>
<p>In the document class I have a setter called PanelX that sets the value for the variable panelX, and in the loaded swf, this</p>
<p>var swf1:Object=loaderInfo.content; //taken from Vincent Rose post<br />
var test:MovieClip=MovieClip(swf1.parent)<br />
test.PanelX=5000</p>
<p>Not neat but works. Even when the variable was public, i still couldnt set it as<br />
panelX=5000<br />
Beats me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laura</title>
		<link>http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/comment-page-1/#comment-1451</link>
		<dc:creator>Laura</dc:creator>
		<pubDate>Wed, 16 Dec 2009 15:41:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/#comment-1451</guid>
		<description>With this I can access the variables of the loaded swf from the main class, but not the other way around. I need to set a static var in document class from an externally loaded swf. Cant seem to figure it out yet</description>
		<content:encoded><![CDATA[<p>With this I can access the variables of the loaded swf from the main class, but not the other way around. I need to set a static var in document class from an externally loaded swf. Cant seem to figure it out yet</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Light Splasher Graphics &#187; Blog Archive &#187; Flash Vector Texture</title>
		<link>http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/comment-page-1/#comment-1445</link>
		<dc:creator>Light Splasher Graphics &#187; Blog Archive &#187; Flash Vector Texture</dc:creator>
		<pubDate>Fri, 11 Dec 2009 08:08:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/#comment-1445</guid>
		<description>[...] with them ignoring each other.</description>
		<content:encoded><![CDATA[<p>[...] with them ignoring each other.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/comment-page-1/#comment-1427</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 30 Nov 2009 12:55:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/#comment-1427</guid>
		<description>thanks for posting this. 

but for me, i will never understand, why as3 is so much clearer. running in problems like this one - which is constant thing when you move from as2 to as3 - is a nightmare.

moving along with flash from plugin 3, for me, this is a break which will drive so many developers away, coming from the visual part. people that drove the flash thing up this point.</description>
		<content:encoded><![CDATA[<p>thanks for posting this. </p>
<p>but for me, i will never understand, why as3 is so much clearer. running in problems like this one &#8211; which is constant thing when you move from as2 to as3 &#8211; is a nightmare.</p>
<p>moving along with flash from plugin 3, for me, this is a break which will drive so many developers away, coming from the visual part. people that drove the flash thing up this point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco</title>
		<link>http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/comment-page-1/#comment-1410</link>
		<dc:creator>Marco</dc:creator>
		<pubDate>Thu, 08 Oct 2009 09:40:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/#comment-1410</guid>
		<description>really usefull and just what I needed.
Now i can &#039;design&#039; some classes on the timeline instead of designing the movieclip in code. saves a LOT of time (:

~Marco</description>
		<content:encoded><![CDATA[<p>really usefull and just what I needed.<br />
Now i can &#8216;design&#8217; some classes on the timeline instead of designing the movieclip in code. saves a LOT of time (:</p>
<p>~Marco</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent Rose</title>
		<link>http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/comment-page-1/#comment-1359</link>
		<dc:creator>Vincent Rose</dc:creator>
		<pubDate>Fri, 17 Jul 2009 09:02:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/#comment-1359</guid>
		<description>Hello,

Thanks for your posting which helped find out a solution for my problem.
IF you WANT TO EXECUTE A FUNCTION LOADED IN CHILD ON THE STAGE:
SAY A.SWF --- LOADS--- B.SWF
A NEEDS TO EXECUTE A FUNCTION IN B HERE IS THE SOLUTION

HERE THE FUNCTION IN B IS
function alert(msg:String):void {
               trace(msg);
}

THE ONLY THING TO DO IS IN YOUR FUNCTION CALLED FROM A MOVIE ... DO THIS
	var swf1:Object=myload.content;
	swf1.alert(&quot;yoyo&quot;);

I have been reading on post for 2 days to finally get part of it here.

Great Thanks

Vincent Rose</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Thanks for your posting which helped find out a solution for my problem.<br />
IF you WANT TO EXECUTE A FUNCTION LOADED IN CHILD ON THE STAGE:<br />
SAY A.SWF &#8212; LOADS&#8212; B.SWF<br />
A NEEDS TO EXECUTE A FUNCTION IN B HERE IS THE SOLUTION</p>
<p>HERE THE FUNCTION IN B IS<br />
function alert(msg:String):void {<br />
               trace(msg);<br />
}</p>
<p>THE ONLY THING TO DO IS IN YOUR FUNCTION CALLED FROM A MOVIE &#8230; DO THIS<br />
	var swf1:Object=myload.content;<br />
	swf1.alert(&#8220;yoyo&#8221;);</p>
<p>I have been reading on post for 2 days to finally get part of it here.</p>
<p>Great Thanks</p>
<p>Vincent Rose</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Figux</title>
		<link>http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/comment-page-1/#comment-1276</link>
		<dc:creator>Figux</dc:creator>
		<pubDate>Wed, 13 May 2009 16:35:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/#comment-1276</guid>
		<description>Hi, any way for do it on flex???</description>
		<content:encoded><![CDATA[<p>Hi, any way for do it on flex???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suzy</title>
		<link>http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/comment-page-1/#comment-1267</link>
		<dc:creator>suzy</dc:creator>
		<pubDate>Mon, 06 Apr 2009 00:51:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/#comment-1267</guid>
		<description>Hi, I have a question that I am hoping you can help me out with. 

I am creating a portfolio of my work using flash cs4 and I have a menu on the left side of my original file and I want to load a swf file into my AS3 flash file to the right of this menu bar on a certain frame so when someone clicks the button it takes them to that frame where the file will be loaded. But so far I can only figure out how to load it on top of the original flash document (covering the menu bar). 

Do you have the code or know the way to place the swf file in a certain place on the original document? Thanks so much, I am learning as3 still and I only know the old way in as2 to load into an empty movie clip.</description>
		<content:encoded><![CDATA[<p>Hi, I have a question that I am hoping you can help me out with. </p>
<p>I am creating a portfolio of my work using flash cs4 and I have a menu on the left side of my original file and I want to load a swf file into my AS3 flash file to the right of this menu bar on a certain frame so when someone clicks the button it takes them to that frame where the file will be loaded. But so far I can only figure out how to load it on top of the original flash document (covering the menu bar). </p>
<p>Do you have the code or know the way to place the swf file in a certain place on the original document? Thanks so much, I am learning as3 still and I only know the old way in as2 to load into an empty movie clip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris Meister</title>
		<link>http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/comment-page-1/#comment-1256</link>
		<dc:creator>Kris Meister</dc:creator>
		<pubDate>Fri, 06 Mar 2009 20:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/#comment-1256</guid>
		<description>I had the same issue that some folks are having about timeline scripts not showing up.

The problem is the that the LOADER swf is importing the class only- it has no idea that there is timeline actionscript. So when it loads it won&#039;t fire the timeline script of the LOADED.

To solve you either need to have the LOADER reference the LOADED by Interface, or you could have the LOADED swf extend the class which the LOADER swf imports.

heres a good explanation:
http://3lbmonkeybrain.blogspot.com/2008/02/of-document-classes-and-timeline-code.html

This was a monster of an issue for me yesterday, I wasted like 5 hours.</description>
		<content:encoded><![CDATA[<p>I had the same issue that some folks are having about timeline scripts not showing up.</p>
<p>The problem is the that the LOADER swf is importing the class only- it has no idea that there is timeline actionscript. So when it loads it won&#8217;t fire the timeline script of the LOADED.</p>
<p>To solve you either need to have the LOADER reference the LOADED by Interface, or you could have the LOADED swf extend the class which the LOADER swf imports.</p>
<p>heres a good explanation:<br />
<a href="http://3lbmonkeybrain.blogspot.com/2008/02/of-document-classes-and-timeline-code.html" rel="nofollow">http://3lbmonkeybrain.blogspot.com/2008/02/of-document-classes-and-timeline-code.html</a></p>
<p>This was a monster of an issue for me yesterday, I wasted like 5 hours.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Øyvind Nordhagen</title>
		<link>http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/comment-page-1/#comment-1251</link>
		<dc:creator>Øyvind Nordhagen</dc:creator>
		<pubDate>Tue, 03 Mar 2009 22:06:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottgmorgan.com/blog/index.php/2007/11/11/accessing-document-class-of-externally-loaded-swf-with-as3/#comment-1251</guid>
		<description>Doesn&#039;t this way of doing it kind of defeat the purpose of dividing the application up in smaller swfs? By datatyping the external SWF you are effectively ensuring that the class and any of its embedded assets are compiled into the loading swf, so using this method for loading external asset libraries would  not be so great.

Or am I wrong?</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t this way of doing it kind of defeat the purpose of dividing the application up in smaller swfs? By datatyping the external SWF you are effectively ensuring that the class and any of its embedded assets are compiled into the loading swf, so using this method for loading external asset libraries would  not be so great.</p>
<p>Or am I wrong?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

