<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Patricia Chan &#187; Sprite</title>
	<atom:link href="http://patriciachan.com/tag/sprite/feed/" rel="self" type="application/rss+xml" />
	<link>http://patriciachan.com</link>
	<description>Multimedia Consultant, Canberra, AU</description>
	<lastBuildDate>Fri, 18 May 2012 01:57:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Quick tips: ActionScript 2 (AS2) eval keyword equivalent in ActionScript 3 (AS3)</title>
		<link>http://patriciachan.com/2010/06/quick-tips-actionscript-2-as2-eval-keyword-equivalent-in-actionscript-3-as3/</link>
		<comments>http://patriciachan.com/2010/06/quick-tips-actionscript-2-as2-eval-keyword-equivalent-in-actionscript-3-as3/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 22:34:59 +0000</pubDate>
		<dc:creator>Patricia Chan</dc:creator>
				<category><![CDATA[Anything Goes]]></category>
		<category><![CDATA[Geeky Stuff]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ActionScript quick tips]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AS2]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[AS3 class]]></category>
		<category><![CDATA[eval]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[MovieClip]]></category>
		<category><![CDATA[Sprite]]></category>

		<guid isPermaLink="false">http://patriciachan.com/?p=787</guid>
		<description><![CDATA[ActionScript 3.0 is great! That&#8217;s if you look at it from a programmer perspective: modular object oriented faster more secure, etc etc&#8230; But, if you&#8217;re a designer, you may be lamenting on how it was not as straight forward and how some great functions in AS2 is no longer supported by AS3. One such great function is the keyword eval in AS2 if you need to access a variable (mainly MovieClip) and its properties, all you need to do is the variable name and the eval keyword. In AS3, you will need the variable name, the variable type and the variable location on the stage. EXAMPLE AS2: eval(&#8220;myMovie_mc&#8221;); AS3 //assuming the variable is on the same level as where your code is executing right now (i.e on a stage) MovieClip(this.getChildByName(&#8220;myMovie_mc&#8221;)); //eval as a movie clip or Sprite(this.getChildByName(&#8220;myMovie_mc&#8221;)) ;  //can be a sprite if it&#8217;s a one frame movie clip. //Keyword this indicate your movie clip location is on the same level. //if the variable is inside another movie clip called &#8220;myParentMovie&#8221;, use the parent movie MovieClip(getChildByName(&#8220;myParentMovie&#8221;).myMovie_mc;  //eval as a movie clip or Sprite(getChildByName(&#8220;myParentMovie&#8221;).myMovie_mc;  //eval as a Sprite or My next quick tips would be buttons in AS3. Why am I doing these series of quick tips? I am always working on multiple scripts and platform. Sometimes if I have not used AS3 for a few weeks or God forbid, months, I forgot. It&#8217;s sometimes easier for me to look it up on my blog than google search the whole www&#8230; or flip the book&#8230; or found similar codes in existing projects.]]></description>
		<wfw:commentRss>http://patriciachan.com/2010/06/quick-tips-actionscript-2-as2-eval-keyword-equivalent-in-actionscript-3-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

