Are you loading them into new child ApplicationDomains, or into
ApplicationDomain.currentDomain?
 
I assume that something in main.swf contains both SuperClass and
BaseInterface?  (Have you looked into the "externs" options to leave out
redundant classes?)  The VM is supposed to ignore subsequent loads of
the same class - first definition in wins.
 
What are you using to do the loading?  Can you make a small repro?
 
-rg


________________________________

        From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of jerome_cordiez
        Sent: Wednesday, January 03, 2007 5:45 AM
        To: flexcoders@yahoogroups.com
        Subject: [flexcoders] Loading assets with inheritance issue
        
        

        Hi all,
        
        yet another issue I'm currently facing...
        
        I have a main swf file, loading multiple external swf, each
containing
        a "component" in the library wich is linked to a specific class
that
        inherits from one SuperClass that itself extends MovieClip.
        
        so we have :
        
        fileA.swf contains componentA that extends SuperClass and
implements
        BaseInterface
        fileB.swf contains componentB that extends SuperClass and
implements
        BaseInterface
        fileC.swf contains componentC that extends SuperClass and
implements
        BaseInterface
        etc...
        
        and main.swf, that at runtime loads all these "library" files,
and
        retrieve the classes definitions of all the components... which
works
        pretty well as long as I only load ONE library file.
        
        If I try to load all the files in a queue, after the first
loading, I
        run into a "Error #1074: Illegal write to read-only property
        BaseInterface on global at global$init()" error...
        If I modify the components so that they don't implement the
        BaseInterface anymore, I still get the same error, but caused by
        writing on SuperClass, which leads me to think that the problem
is
        coming from the fact that each file tries to overwrite the
common
        superclass's definition.... Am I correct assuming this?
        
        If so, is there a way I could prevent this from happening?
        Anyway, as always, any kind of help would be greatly
appreciated,
        thanks a lot! :)
        
        cheers,
        J.
        
        

         

Reply via email to