just because it’s new …
Leggendo un post di Joshua Davis, conosciuto anche come Praystation, mi son sentito di condividere quello che dice riguardo alla programmazione Actionscript e in particolare sul fatto che la nuova versione di un linguaggio non sia per forza meglio della vecchia, bisgona contestualizzare insomma e il discorso mi sembra calzare perfettamente anche in ambito web (.net, php, ruby ecc).
Soon the industry will get Flash CS3 with Actionscript 3.0, and while there are great advances in Actionscript 2.0 and in Actionscript 3.0, I still am a huge advocate for Actionscript 1.0 components. Even though they have some wonky residue pulled from the old smartclip days, I find the totally self contained AS1.0 component structure extremely elegant and useful even today.
#initclip randomCanvasClass = function () { // the constructor } randomCanvasClass.prototype = new MovieClip(); Object.registerClass(”randomCanvas”, randomCanvasClass); #endinitclip It does however, have its pros and cons.
Ok, so we need to conform to the deadly prototype. However, you may think that having the Object and Class self-contained within the component clip a good thing and/or a bad thing. I actually like the idea of not having to port over .as files as we need to do with AS2.0 Classes.
I have though, been porting all my AS1.0 components to an AS2.0 structure because creating super classes – like an environment that mixes random generation with other animation algorithms to create new super animations is a headache in AS1.0. It is possible… but you have to keep nesting components within components… a randomCanvas component, which nests a fade component, which nests an elasticity component, which nests a SIN/COS swarm animation component, certainly gets really messy and hard to manage.
AS2.0 solves all of this, a behavior can be self contained in a .as file as a class that a canvas clip can inherent. Metaphorically, these self contained .as classes act as legos. The kinds of legos that you snap on to the base board inherit the behavior of said lego.
But lets remember, just because it’s new, doesn’t mean you have to completely abandoned deprecated structures. Don’t get me wrong I have huge admiration for the engineers involved in evolving Flash and Actionscript… yet some of my greatest memories were in Flash 5. F5 was about being as creative as you could with a limited set toys (syntax) in a very small sandbox. As Flash and Actionscript evolved many things we’re added and changed in order to make a lot of different people, with different needs, happy.
So… with that being said, AS3.0 is here… but I’ll still write AS1.0 components.
Following this introduction I’ll document my AS1.0 components for visual reference — to be used in conjunction with the files we write and distribute in my workshop classes.
Related Posts
Fatal error: Call to undefined function the_terms2posts() in /var/www/vhosts/antoniomolinari.com/httpdocs/blog/wp-content/themes/scribbishwp/single.php on line 37



