<?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: ActionScript 3.0 Document Class Tutorial</title>
	<atom:link href="http://www.flashdev.ca/article/document-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flashdev.ca/article/document-class/</link>
	<description>Web developer specializing in rich internet applications. Located in Calgary, Alberta, Canada</description>
	<lastBuildDate>Mon, 17 Jan 2011 16:45:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Daniel</title>
		<link>http://www.flashdev.ca/article/document-class/comment-page-1/#comment-33520</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Thu, 27 Sep 2007 00:05:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.flashdev.ca/?p=14#comment-33520</guid>
		<description>That&#039;s because Orsike has opted to disable the automatic declaration of stage instances (enabled by default under publish settings -&gt; ActionScript 3.0 Settings).</description>
		<content:encoded><![CDATA[<p>That&#8217;s because Orsike has opted to disable the automatic declaration of stage instances (enabled by default under publish settings -&gt; ActionScript 3.0 Settings).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TMJ</title>
		<link>http://www.flashdev.ca/article/document-class/comment-page-1/#comment-13738</link>
		<dc:creator>TMJ</dc:creator>
		<pubDate>Sun, 10 Jun 2007 08:52:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.flashdev.ca/?p=14#comment-13738</guid>
		<description>it works for me only without 
&quot;public var myMc:myClip;&quot;
but thanks :)</description>
		<content:encoded><![CDATA[<p>it works for me only without<br />
&#8220;public var myMc:myClip;&#8221;<br />
but thanks <img src='http://www.flashdev.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Orsike</title>
		<link>http://www.flashdev.ca/article/document-class/comment-page-1/#comment-7843</link>
		<dc:creator>Orsike</dc:creator>
		<pubDate>Mon, 23 Apr 2007 10:34:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.flashdev.ca/?p=14#comment-7843</guid>
		<description>It&#039;s actually very simple once you see it :)

If I define a class in Main.as in the same directory as my .fla file containing the code:

package{
 import flash.display.MovieClip;
 import flash.events.*;
	
 // Class definition
 public class Main extends MovieClip{
  public var myMc:myClip;
		
  // Class Constructor
  function Main(){
   myMc.stop();
   
   myMc.addEventListener(MouseEvent.MOUSE_DOWN,
                         PressListener);
  }
		
  // Handle mouse press over myMc
  private function PressListener(evt:Event):void{
   if(myMc.currentFrame == 1){
    myMc.gotoAndStop(2);
   }else myMc.gotoAndStop(1);
  }
		
 }
	
}

Then I can drag a MovieClip having the linkage name myClip onto the stage, it&#039;s instance name will be myMc (I have to define this in my Main class as public var myMc:myClip;) and acces it from inside my Main class.
If I don&#039;t define it or define it as a private member flash will throw an error.

Hope this helps</description>
		<content:encoded><![CDATA[<p>It&#8217;s actually very simple once you see it <img src='http://www.flashdev.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If I define a class in Main.as in the same directory as my .fla file containing the code:</p>
<p>package{<br />
 import flash.display.MovieClip;<br />
 import flash.events.*;</p>
<p> // Class definition<br />
 public class Main extends MovieClip{<br />
  public var myMc:myClip;</p>
<p>  // Class Constructor<br />
  function Main(){<br />
   myMc.stop();</p>
<p>   myMc.addEventListener(MouseEvent.MOUSE_DOWN,<br />
                         PressListener);<br />
  }</p>
<p>  // Handle mouse press over myMc<br />
  private function PressListener(evt:Event):void{<br />
   if(myMc.currentFrame == 1){<br />
    myMc.gotoAndStop(2);<br />
   }else myMc.gotoAndStop(1);<br />
  }</p>
<p> }</p>
<p>}</p>
<p>Then I can drag a MovieClip having the linkage name myClip onto the stage, it&#8217;s instance name will be myMc (I have to define this in my Main class as public var myMc:myClip;) and acces it from inside my Main class.<br />
If I don&#8217;t define it or define it as a private member flash will throw an error.</p>
<p>Hope this helps</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: camarao</title>
		<link>http://www.flashdev.ca/article/document-class/comment-page-1/#comment-4539</link>
		<dc:creator>camarao</dc:creator>
		<pubDate>Thu, 29 Mar 2007 19:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.flashdev.ca/?p=14#comment-4539</guid>
		<description>The Document Class seems like a great addition to the environment. One problem I&#039;m having is placing something on the stage and having a Document Class. Doing so results in all kinds of errors...

I looked inside each of the as3_labs_samples and it seems like its either one way or the other. Either there is a document class with no objects on stage, or there are objects/ui/artwork on stage and there is no document class.

Anyone know the correct way to merge the two?</description>
		<content:encoded><![CDATA[<p>The Document Class seems like a great addition to the environment. One problem I&#8217;m having is placing something on the stage and having a Document Class. Doing so results in all kinds of errors&#8230;</p>
<p>I looked inside each of the as3_labs_samples and it seems like its either one way or the other. Either there is a document class with no objects on stage, or there are objects/ui/artwork on stage and there is no document class.</p>
<p>Anyone know the correct way to merge the two?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pauline</title>
		<link>http://www.flashdev.ca/article/document-class/comment-page-1/#comment-4414</link>
		<dc:creator>pauline</dc:creator>
		<pubDate>Tue, 27 Mar 2007 13:56:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.flashdev.ca/?p=14#comment-4414</guid>
		<description>Thanks Fraser, great stuff. Searching livedocs for &quot;Document class&quot; brings up nothing, thank goodness for googledocs ;) that brings up your post at the top of the list.

And no more code on the timeline means *no* more code, not even comments!</description>
		<content:encoded><![CDATA[<p>Thanks Fraser, great stuff. Searching livedocs for &#8220;Document class&#8221; brings up nothing, thank goodness for googledocs <img src='http://www.flashdev.ca/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  that brings up your post at the top of the list.</p>
<p>And no more code on the timeline means *no* more code, not even comments!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Chua</title>
		<link>http://www.flashdev.ca/article/document-class/comment-page-1/#comment-750</link>
		<dc:creator>Chris Chua</dc:creator>
		<pubDate>Tue, 05 Dec 2006 03:19:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.flashdev.ca/?p=14#comment-750</guid>
		<description>Haha
yeah Fraser it was weird at first, but I&#039;m pretty sure most of us will be in your situation.  ActionScript is trully an OOP language now and having to use class linkage to our symbols will make everyone&#039;s lives easier.

good job on the tutorials.  it helped me get use to the new features ActionScript 3.0 has to offer.

cschua</description>
		<content:encoded><![CDATA[<p>Haha<br />
yeah Fraser it was weird at first, but I&#8217;m pretty sure most of us will be in your situation.  ActionScript is trully an OOP language now and having to use class linkage to our symbols will make everyone&#8217;s lives easier.</p>
<p>good job on the tutorials.  it helped me get use to the new features ActionScript 3.0 has to offer.</p>
<p>cschua</p>
]]></content:encoded>
	</item>
</channel>
</rss>

