Saturday, October 16, 2010

PE2 Flash ActionScript 3

So far I have noticed a lot of similarities and differences between actionscript 2 and actionscript 3. One of the biggest changes I have seen so far is the method to create objects. When creating an empty movie clip in actionscript 2, for example, the method looks like this:

this.createEmptyMovieClip("example_mc", 10);

In action script 3 it looks like this:

var exampleMC:MovieClip = new MovieClip();

Here is an example: 


I started with a tutorial from Lynda.com on functions using actionscript 3. For the most part, functions are pretty much the same in regards to both versions of action script, but I did learn some new techniques on manipulating values.  The tutorial was about using functions to move and rotate a snow boarder in the scene. 



When rotating and moving the snow boarder in the tutorial, the syntax for movement (.y or .x) and rotation (.rotation) did not include the mandatory underscore that existed in actionscript 2. This is one of the changes I noticed, but overall there are many more changes ahead. I’m looking forward to finally learn this language as I have been behind ever since actionscript 3 came out a couple years ago. 

0 comments:

Post a Comment