<?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 Library, Classes and MovieClips in AS3</title>
	<atom:link href="http://www.eastcoastinteractive.co.uk/flash/the-library-classes-and-movieclips-in-as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eastcoastinteractive.co.uk/flash/the-library-classes-and-movieclips-in-as3/</link>
	<description>Web development, design and multimedia</description>
	<lastBuildDate>Tue, 04 May 2010 13:09:41 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: James</title>
		<link>http://www.eastcoastinteractive.co.uk/flash/the-library-classes-and-movieclips-in-as3/comment-page-1/#comment-571</link>
		<dc:creator>James</dc:creator>
		<pubDate>Wed, 19 Aug 2009 12:10:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.eastcoastinteractive.co.uk/?p=30#comment-571</guid>
		<description>Hi

Can you access a movieclip on stage (which has an instance name) from within a class that isn&#039;t the Document class?

(In my current project I don&#039;t have a Document class and most of my AS3.0 code is on the timeline.  I&#039;m just starting to introduce some external .AS class files to perform various tasks however I can&#039;t seem to get hold of the instances that I know exist on stage).</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Can you access a movieclip on stage (which has an instance name) from within a class that isn&#8217;t the Document class?</p>
<p>(In my current project I don&#8217;t have a Document class and most of my AS3.0 code is on the timeline.  I&#8217;m just starting to introduce some external .AS class files to perform various tasks however I can&#8217;t seem to get hold of the instances that I know exist on stage).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: graeme</title>
		<link>http://www.eastcoastinteractive.co.uk/flash/the-library-classes-and-movieclips-in-as3/comment-page-1/#comment-570</link>
		<dc:creator>graeme</dc:creator>
		<pubDate>Mon, 15 Jun 2009 09:49:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.eastcoastinteractive.co.uk/?p=30#comment-570</guid>
		<description>Hi Mike,

I investigated this.

You do not need to export inner movieclips. It is optional. 

In the Square example above I edited the Square movieclip in the library and dragged a newly created Circle movieclip on to the first layer inside Square. The example still compiled.

I then gave the circle movieclip a stage instance name of testCircle. This allowed me to reference and alter properties of the testCircle clip from actionscript inside Square.as.

I then exported the Circle movieclip for export and extended the functionality of it by writing a class for it, similar to Square, and saved it as Circle.as. I created a constructor function for Circle and added it to Circle.as that would be called when any Circle clip gets created.

public function Circle()
{
	trace( &quot;Circle constructor&quot; );
}

I added a similar constructor to Square. The output shows that the inner testCircle is created before the Square.

If you are having problems watch out for Capitalization of the class names and their .as file names. They must match.

Beware that you can alter the default behaviour of the flash compiler for a fla by entering Publish Settings -&gt; Flash and clicking the actionscript 3.0 settings button. There is check box for &#039;Automatically declare stage instances&#039;. If you uncheck this you will need to write declerations for each stage instance before you can use them. 

Hope that helps</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>I investigated this.</p>
<p>You do not need to export inner movieclips. It is optional. </p>
<p>In the Square example above I edited the Square movieclip in the library and dragged a newly created Circle movieclip on to the first layer inside Square. The example still compiled.</p>
<p>I then gave the circle movieclip a stage instance name of testCircle. This allowed me to reference and alter properties of the testCircle clip from actionscript inside Square.as.</p>
<p>I then exported the Circle movieclip for export and extended the functionality of it by writing a class for it, similar to Square, and saved it as Circle.as. I created a constructor function for Circle and added it to Circle.as that would be called when any Circle clip gets created.</p>
<p>public function Circle()<br />
{<br />
	trace( &#8220;Circle constructor&#8221; );<br />
}</p>
<p>I added a similar constructor to Square. The output shows that the inner testCircle is created before the Square.</p>
<p>If you are having problems watch out for Capitalization of the class names and their .as file names. They must match.</p>
<p>Beware that you can alter the default behaviour of the flash compiler for a fla by entering Publish Settings -> Flash and clicking the actionscript 3.0 settings button. There is check box for &#8216;Automatically declare stage instances&#8217;. If you uncheck this you will need to write declerations for each stage instance before you can use them. </p>
<p>Hope that helps</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.eastcoastinteractive.co.uk/flash/the-library-classes-and-movieclips-in-as3/comment-page-1/#comment-569</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sat, 13 Jun 2009 08:50:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.eastcoastinteractive.co.uk/?p=30#comment-569</guid>
		<description>Good explanation, but how about a movieclip inside a movieclip that has already been exported for actionscript at runtime? Do I need to export the movieclip inside as wel??</description>
		<content:encoded><![CDATA[<p>Good explanation, but how about a movieclip inside a movieclip that has already been exported for actionscript at runtime? Do I need to export the movieclip inside as wel??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Meta</title>
		<link>http://www.eastcoastinteractive.co.uk/flash/the-library-classes-and-movieclips-in-as3/comment-page-1/#comment-499</link>
		<dc:creator>Meta</dc:creator>
		<pubDate>Wed, 22 Apr 2009 12:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.eastcoastinteractive.co.uk/?p=30#comment-499</guid>
		<description>Best explanation found so far on the net. Thank y ou for making it simple.  it is not as simple at it was in as2.</description>
		<content:encoded><![CDATA[<p>Best explanation found so far on the net. Thank y ou for making it simple.  it is not as simple at it was in as2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stijn Fastenaekels</title>
		<link>http://www.eastcoastinteractive.co.uk/flash/the-library-classes-and-movieclips-in-as3/comment-page-1/#comment-498</link>
		<dc:creator>Stijn Fastenaekels</dc:creator>
		<pubDate>Mon, 06 Apr 2009 19:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.eastcoastinteractive.co.uk/?p=30#comment-498</guid>
		<description>Thanks! This helped alot because I have a great book on AS3, but not a single word was spent on explaining how AS3 comminucates with library classes.

Cheers,
Stijn</description>
		<content:encoded><![CDATA[<p>Thanks! This helped alot because I have a great book on AS3, but not a single word was spent on explaining how AS3 comminucates with library classes.</p>
<p>Cheers,<br />
Stijn</p>
]]></content:encoded>
	</item>
</channel>
</rss>

