[swfmill] funny mtasc/swfmill/static classes problem

Rodolfo Lopez @ nebular streams rodo at nebular.tv
Fri Feb 27 23:24:56 PST 2009


Hi all!

This is not really a problem related to SwfMill but I post it here  
because it is quite funny and related to the swfmill 'cousins' and I  
hope it can be useful for people. Sorry for the people that may found  
it off-topic, although I think it may be interesting for some of you  
guys that work with these tools together.

I'm working in sort of an app-generator, that uses SWFMILL to compile  
resources, then MTASC to inject a 'stub' class with a "static main"  
function so I initialize the application.

All works OK.

The scenario is as follows: I generate two applications. I run one  
application, then at some point launch the other one, but unloading  
the first one before (unloadMovie). Well... what happens is quite  
funny: this second application loads correctly, but the stub executed  
is the stub from the first (unloaded) application. These stubs are  
also generated dynamically, so as the stubs are different, the second  
application fail, as it is a "megamix" of the first stub and the  
second application :)

I have solved it generating a random name for the class stub. Anybody  
has a clue on how can the stub class survive an unloadMovie? And not  
being replaced by the freshly loaded one?

Cheers,
Rodolfo.







More information about the swfmill mailing list