For the last few months, I have been experimenting and playing a lot with different techniques and code frameworks just to improve my Flash/ActionScript skills overall.
Stuff like SWC compilation, creating code-snippets are not something new and people have already mastered these arts but as I feel very new in Flash world and as I feel there is a lot for me to learn, I thought I should share some the things I recently discovered.
I have been using (and still use) Flash Professional IDE as my main development IDE for project compilation for the last three years or so but recently I had a little chat with one of my seniors (Philip Bulley, the guy who got me going in Flash) about the different ways of compiling a SWF file. I had my arguments (typically because I was in my comfort zone using Flash IDE) but he convinced me as always to adopt to ActionScript-only projects so I can just use Flash IDE for assets creation.
Reasons like fast compilation, adding wrapper on top of classes whenever need be (since in Flash, if you have a movieclip structure in place and later on you feel there is a need to change/alter it, it is very difficult) and a pure Object-Oriented feel (instantiation of assets, removal when done) were good enough for me to give it a thought. I am looking forward to feature projects which will certainly be based on ActionScript-only approach using FlashDevelop.
FlashDevelop’s code snippets and code generation
Everyone knows about the usefulness of code snippets and if these snippets are quickly accessible, what else do you want. In my classes, most of the public functions (after implementing an Interface) are same and I use to write them and indent them and comment them again and again. Too be honest, after exploration of code snippets in FlashDevelop, I feel like I have been so stupid. Trust me, whichever your ActionScript Editor is, create and store your little gems, and use them as needed as all of the editors come with this feature of storing snippets.
Oh Robert Penner, I owe you for that one; you are the man :). AS3Signals is simply fantastic. With different tests showing the speed of this event mechanism and a presentation and a video tutorial showing how easy it is to use Signals, there is no reason ActionScript Developers should give it a try. Lot can be (and has been) said about as3signals, but I will keep it for you to explore. Oh and btw, an enhancement to as3signals is going on as well which, to be very honest, is going over my head. :)
I just didn’t know how handy could … rest really be before I got into this situation (i.e. formatString function). Check this little function I created out of curiousity. Little things matter a lot sometimes.
Casalib ActionScript Library
I downloaded CASALib quite a while ago and the utility functions (the ones I have used so far) are very handy in everyday projects. Everytime I google for some helper class, I find it under casalib library, right under my nose.
Look at Inactivity class of time package for instance, wouldn’t you want to decrease stage’s framerate when the user is idle for some time (i.e. the mouse is not moving at all), I would, on all projects actually. Essentially, it is a matter of adding timers and checking if the last mouse position is equal to the new position, but who would do that if someone has already done that and with additional functionality. So, kudos to Casalib for a great package of useful classes.
FlashPlayer 10 3D
I am done with it. I am done playing with FlashPlayer 10′s 3D capabilities. Oh! why did I develop two projects using it, I should’ve used Papervision3D.
Anyways, I will give any external 3D library a try on my next 3D-based project.
That’s it. There is obviously a lot that I need to learn and master and I will Insha Allah.