How CASA for AS2 is similar to AS3 · Apr 28, 06:30 PM
I’m finally migrating to AS3 and so far it’s been a breeze after working with the CASA Framework for AS2. AS3 seems to implore you to program in an Object Oriented (OO) manner. While AS2 already supports the use of classes, I never really used them much until CASA encouraged me to use classes along with OO programming techniques. (By no means does CASA force the programmer to go OO. In this sense, it’s actually more of a utility library than a framework compared to some of the other frameworks out there.) I discovered how much easier programming with Flash could be when I started subclassing CASA classes. I felt my OO Flash programming experience helped me jump into AS3.
So I’ll try to list some important features that made the drastic changes in AS3 seem not so drastic:
Instantiation of new movie clips
AS2
attachMovie(‘myMC’, ‘MyMovieclipSymbol’, getNextHighestDepth() );
CASA
MyMovieclipClass.create( this, ‘myMC’ );
AS3
var myMC = new MyMovieclipClass();
addChild(myMc);
Adding Event Listeners
AS2
myMC.onMouseMove = function() { … }
CASA
event_mc.addEventObserver(this, EventMovieClip.EVENT_MOUSE_MOVE, “myMouseMoveHandler”);
AS3
sprite.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
CASA framework for AS2 seems to be geared towards making the language into what it could have been (better). It should come as no surprise that AS3 is based on the concepts of this framework and to some extent eliminates the need for the framework. It should be interesting to see what CASA for AS3 looks like (if it ever gets released).
Links for Migrating to AS3
Tips for migrating your Flash applications to ActionScript 3.0
Great Reference List of Changes in AS2 and the AS3 equivalents
A List of Notes and Procedures from a Migrated Flash Application
— Pickle
Comment
AllFlashWebsite Template, CASA Release [AS2] PureMVC+SWFAddress Template: Integrating SWFAddress with PureMVC [AS3]

Thanks for the write-up about CASA. I thought you and your readers may like to know that CASA for AS3 has finally been released: CASA Lib: A Code Library for ActionScript 2.0 & 3.0
— Aaron Clinger · Dec 6, 02:55 AM · #
Thanks Aaron, CASA Lib for AS3 is looking pretty cool. I’m glad you guys waited to release it and ended coming up with something rather unique, not simply mimicking what other libraries/frameworks do. I haven’t actually used it yet, but looking through the documentation I like the garbage collection utilities. IRemovable, IRemovableEventDispatcher and RemovableEventDispatcher should make integrating garbage collection into existing and new projects much easier. Also, the org.casalib.util package contains many utility functions that I’m sure I’ll want to use right quick.
— Pickle · Dec 8, 10:26 AM · #