Extending dynamically loaded classes in AS2
There was a question from Iiley on the OSFlash Mailing List today, asking whether it is possible to extend classes that are dynamically loaded into Flash applications as per my SWF as DLL tutorial on OSFlash. It is, indeed, possible: Mark your library classes as "dynamic intrinsic" and then use the good old AS1-style prototype object to extend the class once it has been loaded by your main application.
In other words:
And, in your main application:
(I've only shown the changes from the SWF as DLL example in the previous post.)You can download the new example files here (~25K).