<?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; flash</title>
	<atom:link href="http://patriciachan.com/tag/flash/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>
		<item>
		<title>Action Script 2&#8242;s getURL equivalent in Action Script 3</title>
		<link>http://patriciachan.com/2010/04/action-script-2s-geturl-equivalent-in-action-script-3/</link>
		<comments>http://patriciachan.com/2010/04/action-script-2s-geturl-equivalent-in-action-script-3/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 01:43:35 +0000</pubDate>
		<dc:creator>Patricia Chan</dc:creator>
				<category><![CDATA[Geeky Stuff]]></category>
		<category><![CDATA[Action Script]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS2]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[AS3 class]]></category>
		<category><![CDATA[ExternalInterface]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[getURL]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[navigateToURL]]></category>

		<guid isPermaLink="false">http://patriciachan.com/?p=534</guid>
		<description><![CDATA[I have been helping a couple of clients migrating their existing Action Script 2 (AS2) flash assets/libraries to Action Script 3 (AS3). Amongst their many requirements, one of them is getting flash to talk to external javascript function. AS2: In AS2, you the simplest way is to use the getURL function. //Calling javascript of someFunction() that is embedded in the html page. getURL(&#8220;javascript:someFunction();&#8221;); You can also use the ExternalInterface class. import flash.external.*; ExternalInterface.call(&#8220;someFunction&#8221;); **or some variations of the above depending on the browser your client is using (hint: Browser bugs). AS3: As a general rule, you should use the ExternalInterface class to get your flash scripts to talk to other scripts. The code is very similar to AS2: import flash.external.* if (ExternalInterface.available) { &#160;&#160;&#160;ExternalInterface.call(&#8220;eval&#8221;, &#8220;someFunction();&#8221;); //Call the javascript function &#160;&#160;&#160;ExternalInterface.call(&#8220;eval&#8221;, &#8220;window.close();&#8221;); //Can also code js function &#160;&#160;&#160;ExternalInterface.call(&#8220;eval&#8221;, &#8220;window.opener.someFunction();&#8221;); //Call javascript function located in parent window } else { &#160;&#160;&#160;trace(&#8220;Oh No!&#8221;);// No external interface available } } More information: ExternalInteface However, if for some bizarre reason there is no link between your flash and the html page (a.k.a You are using Knowledge Presenter 7 to bring in flash assets into your eLearning program), the ExternalInterface may not work. Your alternative is to use navigateToURL function. var url:String = &#8220;JavaScript: gotoNextPause();&#8221;; var request:URLRequest = new URLRequest(url); try {    navigateToURL(request, &#8216;_self&#8217;);// second argument is target } catch (e:Error) {    trace(&#8220;Error occurred!&#8221;); } **Don&#8217;t forget to import all necessary classes. Point to remember: 1. External interface requires a link between your flash asset and the html page containing the javascript (e.g. your flash is embedded inside the html page). 2. If you need to directly call the javascript function, use getURL for AS2 and navigateToURL for AS3. Hopefully this will help some poor lost souls out there.]]></description>
		<wfw:commentRss>http://patriciachan.com/2010/04/action-script-2s-geturl-equivalent-in-action-script-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entertainment of the day&#8230; Animator vs Animation funny flash animation</title>
		<link>http://patriciachan.com/2009/06/entertainment-of-the-day-animator-vs-animation-funny-flash-animation/</link>
		<comments>http://patriciachan.com/2009/06/entertainment-of-the-day-animator-vs-animation-funny-flash-animation/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 01:32:26 +0000</pubDate>
		<dc:creator>Patricia Chan</dc:creator>
				<category><![CDATA[Anything Goes]]></category>
		<category><![CDATA[Geeky Stuff]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[animator vs animation]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[funny flash animation]]></category>
		<category><![CDATA[funny flash movie]]></category>
		<category><![CDATA[funny video]]></category>
		<category><![CDATA[stick figure]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://patriciachan.com/?p=457</guid>
		<description><![CDATA[You will enjoy it more if you understand adobe flash (or even if you dont use flash at all)&#8230; LOL&#8230; Wait&#8230; there is more: and more&#8230; ohh&#8230; just go and visit youtube, will ya?]]></description>
		<wfw:commentRss>http://patriciachan.com/2009/06/entertainment-of-the-day-animator-vs-animation-funny-flash-animation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

