Groups | Blog | Home
all groups > flash actionscript > june 2004 >

flash actionscript : AS2 class & linkage identifier at runtime


jbeltran_mx
6/16/2004 8:43:40 PM
Hello,
I want to register an AS2 class to an object that doesn't have a linkage
identifier. Is there a way to set the linkage identifier at runtime? or how can
i register a class to an object that doesn't have linkage identifier?
or could i extend the movieclip class globaly? so every instance of the
movieclip have the extended new clas on it, with out the need to set this for
each object?

Thanks!
MechaFlasher
6/16/2004 9:58:01 PM
No way to set linkage at runtime.

The only way to link a class to an object then would be to use the old AS1
prototype way.

MovieClip.prototype.myFunction = function() etc...

There's no other way to extend the built-in classes using only AS2.

Check out Colin Mook's ActionScript book, explains all that prototyping stuff
really well - by far the best AS book ever written, only covers AS1 for now but
90% of it is still applicable with AS2.
AddThis Social Bookmark Button