<?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>Web 2.1 &#187; ActionScript</title>
	<atom:link href="http://web.2point1.com/tag/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://web.2point1.com</link>
	<description>Tim Whitlock&#039;s home in the Blogohedron</description>
	<lastBuildDate>Thu, 13 May 2010 21:26:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Eulogy</title>
		<link>http://web.2point1.com/2009/01/31/eulogy/</link>
		<comments>http://web.2point1.com/2009/01/31/eulogy/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 14:54:53 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS2]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Lingo]]></category>

		<guid isPermaLink="false">http://web.2point1.com/2009/01/31/eulogy/</guid>
		<description><![CDATA[Or, &#8220;why I haven&#8217;t done any Flash work for a year&#8221;
I effectively gave up Flash when I came to Public and it&#8217;s now a whole year since I did any significant Flash work. In this short time AS3 has really come of age, there are tonnes of serious libraries, from fractals to physics, and PaperVision [...]]]></description>
			<content:encoded><![CDATA[<h4>Or, &#8220;why I haven&#8217;t done any Flash work for a year&#8221;</h4>
<p>I effectively gave up Flash when I came to <a href="http://www.publicreative.com/" target="_blank">Public</a> and it&#8217;s now a whole year since I did any <em>significant </em>Flash work. In this short time AS3 has really come of age, there are tonnes of serious libraries, from fractals to physics, and PaperVision 3D seems almost omnipresent. The prospect of going back to the ActionScript freelance circuit after a year on the wagon would be quite daunting.<span id="more-87"></span></p>
<p>The reasons I&#8217;ve done little Flash since I&#8217;ve been at Public are perfectly sound: I work with two brilliant Flash developers who make up 50% of our development team, and rather than everyone doing a bit of everything, we all specialize quite specifically. I cover all the back end work, and do a lot of server admin; so ActionScript in my personal world is now just a fond legacy of my freelance career.</p>
<p>ActionScript is still of great interest to me &#8211; <a href="http://jaspa.org.uk/wiki/JAS_language">JASPA is closely modelled on AS3</a>, and at Public Flash makes up the majority of our projects, so I obviously stay up to date on its progress. But I&#8217;ve spent so many hours writing ActionScript that it seems a shame I won&#8217;t be so directly involved in its future. I started using Flash in version 3 and so I&#8217;ve seen ActionScript develop from nothing in real time. I remember when Flash 5 came out and we could finally write <em>real</em> code. I made a concious decision there and then to ditch <a href="http://en.wikipedia.org/wiki/Lingo_(programming_language)" target="_blank">Lingo</a>, because it was starting to become obvious that Flash had a brighter future on the web. This turned out to be a very good decision.</p>
<p>As usual with my blog posts I feel I need to write some kind of conclusion (<em>recalls GCSE English lessons</em>), but I don&#8217;t have one; except I miss Flash, it&#8217;s awesome. The end.</p>
]]></content:encoded>
			<wfw:commentRss>http://web.2point1.com/2009/01/31/eulogy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JASPA says &#8220;Hello World&#8221;</title>
		<link>http://web.2point1.com/2008/10/26/jaspa-says-hello-world/</link>
		<comments>http://web.2point1.com/2008/10/26/jaspa-says-hello-world/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 17:07:14 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[JASPA]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://web.2point1.com/2008/10/26/jaspa-says-hello-world/</guid>
		<description><![CDATA[JASPA is a JavaScript cross-compiler written in PHP.
Write robust object-orientated applications in a strongly-typed language (modelled on AS3) and compile it into regular JavaScript to run in a web page, or any other environment that implements a JavaScript engine.
Download JASPA from SourceForge
https://sourceforge.net/project/showfiles.php?group_id=243463


The JASPA project is split into two main components:

The compiler
The cross-browser abstraction API


1. The [...]]]></description>
			<content:encoded><![CDATA[<h3>JASPA is a JavaScript cross-compiler written in PHP.</h3>
<p>Write robust object-orientated applications in a strongly-typed language (<a href="http://web.2point1.com/2008/10/29/jas-vs-actionscript/">modelled on AS3</a>) and compile it into regular JavaScript to run in a web page, or any other environment that implements a JavaScript engine.</p>
<p><strong>Download JASPA from SourceForge<a href="/wp-content/uploads/jaspa-cli-compiler-0.2.3.tar.gz"><br />
</a></strong><a href="/wp-content/uploads/jaspa-cli-compiler-0.2.3.tar.gz"></a><a href="/jaspa-change-log/">https://sourceforge.net/project/showfiles.php?group_id=243463<br />
</a></p>
<p><span id="more-65"></span></p>
<h3>The JASPA project is split into two main components:</h3>
<ol>
<li><a href="#compiler">The compiler</a></li>
<li><a href="#dom">The cross-browser abstraction API</a></li>
</ol>
<p><a title="compiler" name="compiler"></a></p>
<h4>1. The compiler</h4>
<p>The compiler is API-neutral; Its job is to compile object-orientated code written in the <a href="http://web.2point1.com/2008/10/29/jas-vs-actionscript/">JAS syntax</a>, and convert it to regular, clean JavaScript suitable for running in any ECMAScript-compliant host program, such as a web browser. The compiler comes in two flavours: A command line compiler, which is the most useful; and also a web-based compiler which is handy in development and testing, or when a command line is not available.</p>
<p>The compiler is largely complete, but there is still some work to do to support some outstanding language features.<br />
<a title="dom" name="dom"></a></p>
<h4> 2. The cross-browser abstraction API</h4>
<p>If you want to build web applications with JASPA, the compiler needs to know about all the objects and methods exposed by the browser. This is easily achieved by writing native class interfaces, much like intrinsic classes in ActionScript. However, browser scripting today poses the same huge problem that it did 10 years ago; <em>Vendors don&#8217;t all provide the same API</em>. Hence a comprehensive abstraction layer is required to provide a single, standardized interface that works across all modern browsers.</p>
<p>Although the JASPA compiler is largely complete and pretty stable, work on this API is still very much in progress.<br />
More about all of these topics will be organized into further blogs. In the mean time, please have a go with the compiler and let me know what you think of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://web.2point1.com/2008/10/26/jaspa-says-hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ActionScript Emptiness</title>
		<link>http://web.2point1.com/2008/08/02/actionscript-emptiness/</link>
		<comments>http://web.2point1.com/2008/08/02/actionscript-emptiness/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 16:09:05 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://web.2point1.com/2008/08/02/actionscript-emptiness/</guid>
		<description><![CDATA[I&#8217;m a great believer that if you&#8217;re going to be good at something you should understand it a the lowest level possible. Every ActionScript developer I talk to at the moment is migrating to AS3 and mostly we talk about all the high level differences it has with AS2; the API, the event mechanism and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I&#8217;m a great believer that if you&#8217;re going to be good at something you should understand it a the lowest level possible. </strong>Every ActionScript developer I talk to at the moment is migrating to AS3 and mostly we talk about all the high level differences it has with AS2; the API, the event mechanism and so forth. But let&#8217;s not forget the little things. It&#8217;s often complacency toward the smallest components that cause the most trouble. It seems like an odd situation to know how to flip a cube around in 3D space, but not really know the difference between <code>null</code> and <code>undefined</code>. This is a real situation though, and it can mean bugs deep in complex layers of code just waiting to ruin everything.<span id="more-55"></span></p>
<p>So in this spirit of pedanticalness I&#8217;ve been playing around with the various changes to the <code>null</code>, and <code>undefined</code> types in AS3 and how they relate to the new concept of untyped objects. Having been writing JavaScript and ActionScript for years these notions are taking some getting used to. That&#8217;s fine, but I have noticed some nuances that I&#8217;m not happy with.</p>
<p>I&#8217;m fine with the notion that a typed object cannot contain the value <code>undefined</code>. It makes sense that it should adopt a native value of its own. I do find it strange though that a <code>Number</code> defaults to <code>NaN</code>, whereas <code>int</code>, and <code>uint</code> default to <code>0</code>, but I think I&#8217;ll just about sleep at night.</p>
<p>I also find it odd that some typed objects may be set to <code>null</code>, while some cannot. (<code>var s:String = null;</code>) holds <code>null</code> and is still a <code>String</code>, and yet: (<code>var n:Number = null;</code>) raises an error. Although I don&#8217;t really get this, being aware of it is the important thing when it comes to avoiding bugs.</p>
<p>Here are some more weird things I discovered today:<br />
Setting a <code>Number</code> to <code>null</code> via a function call prevents the error you get when setting it directly.</p>
<ol class="code javascript">
<li class="odd"><span class="J_KEYWORD">function</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">getNull</span><span class="J_PUNCTUATOR">(</span><span class="J_PUNCTUATOR">)</span><span class="J_PUNCTUATOR">:</span><span class="J_PUNCTUATOR">*</span><span class="J_WHITESPACE"> </span><span class="J_PUNCTUATOR">{</span><span class="J_LINE_TERMINATOR"> </span></li>
<li class="even"><span class="J_WHITESPACE">    </span><span class="J_KEYWORD">return</span><span class="J_WHITESPACE"> </span><span class="J_LITERAL">null</span><span class="J_PUNCTUATOR">;</span><span class="J_LINE_TERMINATOR"> </span></li>
<li class="odd"><span class="J_PUNCTUATOR">}</span><span class="J_LINE_TERMINATOR"> </span></li>
<li class="even"><span class="J_IDENTIFIER">trace</span><span class="J_PUNCTUATOR">(</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">getNull</span><span class="J_PUNCTUATOR">(</span><span class="J_PUNCTUATOR">)</span><span class="J_WHITESPACE"> </span><span class="J_PUNCTUATOR">===</span><span class="J_WHITESPACE"> null</span><span class="J_PUNCTUATOR">)</span><span class="J_PUNCTUATOR">;</span><span class="J_WHITESPACE"> </span><span class="J_COMMENT">// prints &#8221;true&#8221;</span><span class="J_LINE_TERMINATOR"> </span></li>
<li class="odd"><span class="J_KEYWORD">var</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">x</span><span class="J_PUNCTUATOR">:</span><span class="J_IDENTIFIER">Number</span><span class="J_WHITESPACE"> </span><span class="J_PUNCTUATOR">=</span><span class="J_WHITESPACE"> </span><span class="J_LITERAL">null</span><span class="J_PUNCTUATOR">;</span><span class="J_WHITESPACE"> </span><span class="J_COMMENT">// raises error</span><span class="J_LINE_TERMINATOR"> </span></li>
<li class="even"><span class="J_KEYWORD">var</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">y</span><span class="J_PUNCTUATOR">:</span><span class="J_IDENTIFIER">Number</span><span class="J_WHITESPACE"> </span><span class="J_PUNCTUATOR">=</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">getNull</span><span class="J_PUNCTUATOR">(</span><span class="J_PUNCTUATOR">)</span><span class="J_PUNCTUATOR">;</span><span class="J_WHITESPACE"> </span><span class="J_COMMENT">// no error   </span></li>
</ol>
<p>Setting a Number to undefined via a void function call raises an error</p>
<ol class="code javascript">
<li class="odd"><span class="J_KEYWORD">function</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">getUndefined</span><span class="J_PUNCTUATOR">(</span><span class="J_PUNCTUATOR">)</span><span class="J_PUNCTUATOR">:</span><span class="J_KEYWORD">void</span><span class="J_PUNCTUATOR">{</span><span class="J_LINE_TERMINATOR"> </span></li>
<li class="even"><span class="J_WHITESPACE">    </span><span class="J_COMMENT">// no return value.</span><span class="J_LINE_TERMINATOR"> </span></li>
<li class="odd"><span class="J_PUNCTUATOR">}</span><span class="J_LINE_TERMINATOR"> </span></li>
<li class="even"><span class="J_IDENTIFIER">trace</span><span class="J_PUNCTUATOR">(</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">getUndefined</span><span class="J_PUNCTUATOR">(</span><span class="J_PUNCTUATOR">)</span><span class="J_WHITESPACE"> </span><span class="J_PUNCTUATOR">===</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">undefined</span><span class="J_WHITESPACE"> </span><span class="J_PUNCTUATOR">)</span><span class="J_PUNCTUATOR">;</span><span class="J_WHITESPACE"> </span><span class="J_COMMENT">// prints &#8221;true&#8221;</span><span class="J_LINE_TERMINATOR"> </span></li>
<li class="odd"><span class="J_KEYWORD">var</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">x</span><span class="J_PUNCTUATOR">:</span><span class="J_IDENTIFIER">Number</span><span class="J_WHITESPACE"> </span><span class="J_PUNCTUATOR">=</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">undefined</span><span class="J_PUNCTUATOR">;</span><span class="J_WHITESPACE"> </span><span class="J_COMMENT">// sets to NaN as expected</span><span class="J_LINE_TERMINATOR"> </span></li>
<li class="even"><span class="J_KEYWORD">var</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">n</span><span class="J_PUNCTUATOR">:</span><span class="J_IDENTIFIER">Number</span><span class="J_WHITESPACE"> </span><span class="J_PUNCTUATOR">=</span><span class="J_WHITESPACE"> </span><span class="J_IDENTIFIER">getUndefined</span><span class="J_PUNCTUATOR">(</span><span class="J_PUNCTUATOR">)</span><span class="J_PUNCTUATOR">;</span><span class="J_WHITESPACE"> </span><span class="J_COMMENT">// raises error, halts execution</span></li>
</ol>
<p>Hmm..</p>
]]></content:encoded>
			<wfw:commentRss>http://web.2point1.com/2008/08/02/actionscript-emptiness/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scale &amp; rotate around an arbitrary centre</title>
		<link>http://web.2point1.com/2008/04/13/scale-rotate-around-an-arbitrary-centre/</link>
		<comments>http://web.2point1.com/2008/04/13/scale-rotate-around-an-arbitrary-centre/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 19:22:57 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[matrix]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://web.2point1.com/2008/04/13/scale-rotate-around-an-arbitrary-centre/</guid>
		<description><![CDATA[The mini project I picked as my first dip into AS3 was a short example that I had been planning for this blog, so here it is in AS3, instead of AS2 as I had originally planned.
The South Park Chin balls Flash app required that the user drag and zoom a loaded photo. Anyone who&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>The mini project I picked as my first dip into AS3 was a short example that I had been planning for this blog, so here it is in AS3, instead of AS2 as I had originally planned.</p>
<p>The South Park <a href="http://web.2point1.com/2008/03/23/down-and-dirty/">Chin balls</a> Flash app required that the user drag and zoom a loaded photo. Anyone who&#8217;s ever done this will know that you can&#8217;t just scale the picture around it&#8217;s registration point when you zoom. <em>Why</em>? because the centre point changes as you pan the image around. So the requirement in a nutshell is &#8211; to be able to <strong>scale a <em>MovieClip</em> around an arbitrary centre</strong>.</p>
<p>Sure, you could take the <em>Russian doll</em> approach with multiple clips inside clips, but that just ain&#8217;t cool! I thought I&#8217;d share the way I did it as it&#8217;s pretty concise.<span id="more-25"></span></p>
<p>First of all here&#8217;s the principal in action. Scaling and rotation, both performed around an arbitrary centre point that you can alter by dragging that little marker around. Go on, have a go.</p>
<p>[ Update: due to a <a href="http://web.2point1.com/2009/03/21/lessons-learned-again/">nasty server crash</a> some of these files are missing.. sorry. <a href="/wp-content/uploads/2008/04/virtualcentresprite.html#scaleAround" title="scaleAround method" target="_blank">This source was rescued though</a> ]</p>
<p id="flashcontent" style="border: 1px solid #666666; padding: 0pt; display: block; width: 350px; height: 350px">Loading example SWF&#8230;</p>
<p><script type="text/javascript">  <!--     var so = new SWFObject("/wp-content/uploads/2008/04/virtualcentreexample.swf", "flashobj", "350", "350", "9", "#F0F0F0");  so.write("flashcontent");   so.addParam("wmode","opaque");  //-->   </script></p>
<p><a href="/wp-content/uploads/2008/04/virtualcentreexample.zip" title="VirtualCentreExample">Download the source files for this example</a></p>
<p>Most of the source files just serve to create the example interface. The only class we need to discuss is the one with the scale and rotating logic. The class <code><strong>VirtualCentreSprite</strong></code> is an extension of the <code>Sprite</code> class. In AS2 it would have to be an extension of the <code>MovieClip</code> class, but we don&#8217;t need a timeline. You could use this as a base class for sprites across your project to ensure they all have this capability.</p>
<p>It has two methods as follows:<br />
<code style="display: block; white-space: nowrap"><br />
void <strong>scaleAround</strong>( <strong>offsetX</strong>:Number, <strong>offsetY</strong>:Number, <strong>absScaleX</strong>:Number, <strong>absScaleY</strong>:Number )<br />
void <strong>rotateAround</strong>( <strong>offsetX</strong>:Number, <strong>offsetY</strong>:Number, <strong>toDegrees</strong>:Number )<br />
</code><br />
The scaling method is the simplest. It&#8217;s basically GCSE vector maths. We calculate the position that the clip should be at after scaling, do the scaling (which will move the clip according to the centre that Flash knows about) and then we simply reposition it to where it should be.<br />
<a href="/wp-content/uploads/2008/04/virtualcentresprite.html#scaleAround" title="scaleAround method" target="_blank">Click to see source of method <code>scaleAround</code></a></p>
<p>The rotating method is a bit more complex, because it uses a transformation matrix. But thanks to the <code>flash.geom</code> package this is short and sweet. Again the principal is that we let Flash rotate the sprite and then adjust the position.<br />
<a href="/wp-content/uploads/2008/04/virtualcentresprite.html#rotateAround" title="rotateAround method" target="_blank">Click to see source of method <code>rotateAround</code></a></p>
]]></content:encoded>
			<wfw:commentRss>http://web.2point1.com/2008/04/13/scale-rotate-around-an-arbitrary-centre/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>AS3 Migration &#8211; Day 1</title>
		<link>http://web.2point1.com/2008/04/13/as3-migration-day-1/</link>
		<comments>http://web.2point1.com/2008/04/13/as3-migration-day-1/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 17:26:57 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://web.2point1.com/2008/04/12/as3-migration-day-1/</guid>
		<description><![CDATA[Much later than planned I finally got around to checking out AS3.
I was quick to upgrade to AS2 when it came out in Flash MX 2004, and  never looked back, so why so late? Well, as usual, because I&#8217;m busy. Busy on a PHP project at that, so I haven&#8217;t really had the chance. [...]]]></description>
			<content:encoded><![CDATA[<p>Much later than planned I finally got around to checking out AS3.</p>
<p>I was quick to upgrade to AS2 when it came out in Flash MX 2004, and  never looked back, so why so late? Well, as usual, because I&#8217;m busy. Busy on a PHP project at that, so I haven&#8217;t really had the chance. Plus, if I do have to write some AS on the job it&#8217;s too big a risk to start learning something new. Pressures demand that I get on with it as I know how. That&#8217;s why <a href="http://web.2point1.com/2008/03/23/down-and-dirty/">this Facebook application</a> has it&#8217;s main Flash app (Chin Balls) written in AS2. Also, I view the upgrading of a programming language as a one-way process. I didn&#8217;t upgrade to PHP5 until I was confident I would never have to write PHP4 again. And with AS3 this is an even bigger deal.<span id="more-23"></span></p>
<p>I anticipated that AS3 was going to be stricter, less forgiving, and that I&#8217;d have to get used to a few things, but I have to confess to being quite surprised at how different it is. There&#8217;s so much material on AS3 available to you that there&#8217;s no point me banging on about things you can get better information on else where. However, as an AS2 developer here&#8217;s a quick list in no particular order of the things that either surprised or pleased me in my first couple of hours of AS3 writing:</p>
<ul>
<li>The MovieClip&#8217;s inheritance chain has 5 other classes between itself and the Object class. This abstracts out various types of functionality and means you don&#8217;t have to use a fully loaded MovieClip just to display a blob.</li>
<li>Small, but caught me out &#8211; Void must be lower case as a return type, e.g.  <code>function():void{ }</code> My bad.</li>
<li>Watch out; Ctrl-t <strong>only</strong> <strong>checks syntax</strong>.<br />
This is more profound than it sounds. I suspect the reason that AS2 compiles the script and checks all references and types is because that&#8217;s the best chance you&#8217;ve got of catching an error. AS3 actually has the ability to do this at run time, so don&#8217;t think &#8220;This script contains no errors&#8221; means you&#8217;re in the clear!</li>
<li>At last; percentage properties like <em>alpha</em> are now 0-1, instead of 0-100. Another design interface legacy bites the dust. &#8211; and say goodbye to underscores in property names too :)</li>
<li>A new <code>override</code> keyword must be used to redefine a parent class method of the same name</li>
<li>MovieClips do not have implicit onEnterFrame, onRelease,  or <em>any</em> such handlers invoked by default. You have to explicitly define all event handling via the thoroughly standardized Event mechanism.</li>
<li>Looking for onLoad? You won&#8217;t find it, see above;</li>
<li>Declaring child clips as member variables in classes was raising conflicts with members of the same name placed physically on the stage. It took me a while to find the publish setting &#8220;Automatically declare stage instances&#8221;. If you&#8217;re used to declaring all your physical members switch this off. If you&#8217;re normally lazy, switch it on!</li>
<li>No more prototype hacking. Not even if it&#8217;s 10pm and you really want to go home.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://web.2point1.com/2008/04/13/as3-migration-day-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 &#8211; The gap widens</title>
		<link>http://web.2point1.com/2008/04/12/as3-the-gap-widens/</link>
		<comments>http://web.2point1.com/2008/04/12/as3-the-gap-widens/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 16:41:31 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://web.2point1.com/2008/04/13/as3-the-gap-widens/</guid>
		<description><![CDATA[The designer/developer boundary has always been a little blurry when it comes to Flash. Flash has been celebrated for this since 1999, and  has established a pretty unique position. But with each release of Flash those who sit on the fence feel an increasing pressure to choose a camp and stay in it. Some do, [...]]]></description>
			<content:encoded><![CDATA[<p>The designer/developer boundary has always been a little blurry when it comes to Flash. Flash has been celebrated for this since <a href="http://en.wikipedia.org/wiki/Adobe_Flash#History" title="Flash 4 inroduced menu driven scripting" target="_blank">1999</a>, and  has established a pretty unique position. But with each release of Flash those who sit on the fence feel an increasing pressure to choose a camp and stay in it. Some do, some don&#8217;t and some just carry on doing things as they always did, but one thing&#8217;s for sure; that the drive toward Flash being a more robust, more powerful, more serious platform is not showing any signs of slowing down. AS3 is another leap forward. In fact a much bigger leap than AS2 was.<span id="more-22"></span></p>
<p>The casual and flexible nature of ActionScript has lent itself very well to the creative industries in particular over the years. In short, it gets the job done! And unfortunately that&#8217;s what this business is all about most of the time. But ActionScript has really grown up this time. Of course you can still publish Flash movies in AS2, and even AS1, but if you want to grow up too you&#8217;re going to have to get a bit more serious &#8211; again. This means more planning and less hacking. Generally you are going to spend longer doing pretty much everything.</p>
<p>I know plenty of creative developers who have been writing ActionScript for years and many of them eventually embraced AS2, even if a little reluctantly. AS2 was an important step in the maturing of the language, but a step that was in fact a bit of an illusion. The structure and strictness that it appears to impose is really rather superficial and the list of hacks and compiler workarounds is endless. Under the hood AS2 is pretty much the same deal as AS1. i.e. it&#8217;s JavaScript. JavaScript was purposefully designed for non-programmers. How often have you done this to create a button action:</p>
<pre class="code">myBtn.onRelease = function(){ /* do stuff */ }</pre>
<p>What you are doing is creating a function object and assigning it as a property of another object. You can do this because the prototype architecture of JavaScript allows you to &#8211; a concept foreign to pretty much all class-based languages.<br />
Well you can&#8217;t do it any more. &#8211; not in AS3.</p>
<p>This time around Adobe has based the language on the <em>draft</em> specification of <a href="http://en.wikipedia.org/wiki/ECMAScript#Fourth_edition" target="_blank">ECMAScript</a> Edition 4 (<a href="http://en.wikipedia.org/wiki/ECMAScript#Fourth_edition" target="_blank">ES4</a>). AS1 &amp; 2 (along with most implementations of JavaScript that you&#8217;ll encounter) are based on ES3 which is nearly ten years old now. So under the hood AS3 is genuinely a different beast and a more grown up one at that.</p>
<p>So with the ever-stricter, and more robust stature of ActionScript, how long can this designer/developer melting pot survive? And how narrow can the margin remain between the developer and the designer? I don&#8217;t mean to suggest that designers can&#8217;t code or that coders can&#8217;t design, but there are only so many hours in the day, and only so much you can fit into one person&#8217;s job description. Perhaps the distinction of merely two roles isn&#8217;t sufficient anymore. We don&#8217;t talk about Flash development in terms of <em>front </em>and <em>back</em> ends, but perhaps we should. As the gap widens perhaps we can identify multiple roles for specialists across multiple layers of development just as we do with HTML based web apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://web.2point1.com/2008/04/12/as3-the-gap-widens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
