Getting a handle on Flash with Actionscript 3 has not been an easy task to say the least. To accomplish the simplest of objectives is still pretty difficult, but I have learned quite a bit and am on my way to flash guruness again. So to aide any other poor soul out there who is trying to make the jump to AS3 here are a few helpful thoughts.
I recommend Flash CS3 Professional Advanced by Russell Chun. I bought a previous version of this book a couple years back to learn Flash and felt a little like a Flash newbie walking out of Barnes and Noble with it again, but with Actionscript 3 it's seriously like starting all over with coding in Flash. This book has been great. I also picked up the Actionscript 3 Cookbook and it's pretty good too, but to be noted the code in this book has been written from the standpoint that you're using Flex (not flash) to author swfs (who does that?). It's still been helpful but I was slightly disappointed it's targeted more towards Flex users.
Since being introduced to tweening a couple years back it's been a must have on every project. Unfortunately, the previous method of tweening (in AS2 I used LacoTweens) does not work in Actionscript 3 projects. Flash does have a built in tweener that can get ugly to use, but among my many google searches I stumbled across an Actionscript 3 tween engine. This site blog.greensock.com/tweenliteas3 has a Tweening engine that does everything the old lacoTweens would do, and the author wrote the engine with the objective of cutting the overall size of the exported swf file. It's worth checking out. blog.greensock.com/tweenliteas3.
The biggest concern I have had with moving to Actionscript 3 was being able to use flash to fill the whole browser (often called full browser flash). Since this is the basis of almost all my flash sites figuring this out was essential. You'd think it'd be a piece of cake but not so. It took me several hours and looking for help on the intertubes proved to be very little help. The problem lies in the change that's happened with the Stage in Actionscript 3. Gone are the good old days of using the Stage and the Stage properties to position movieclips (movie_mc._y=Stage.height-100). After a lot of tweaking and googling I've come up with an alternative and have uploaded a sample file that anyone who is interested can download and view the source code. I've made some notes in the code to help explain what's going on. It's not the prettiest but it's just an example. Click here to download the source files and click here to see the file in action.
Published by: marc in Tutorials