Using class defined in external SWF

Hi guys I have two SWF files loader.swf and external.swf, external.swf is sitting on a remote server and I load it up from loader.swf using MovieClipLoader.

external.swf includes a class definition for SomeClass by including a .as file, which also sits on the remote server. External.swf defines a method that returns an instance of SomeClass.

Once I’ve loaded up external.swf via loader.swf I can call the function that returns an instance of SomeClass. The problem is that laoder.swf seems to require a local copy of the as fiel that defines the class, rather than being able to receive the information it needs from external.swf, I really need to keep this class definition on the remote server, and not have a copy of it locally. Is thre any way I can encapsulate this within external.swf? I’m free to cahnge whatever I like.

This is all in AS2 by the way. Many thansk for taking the tiem to read this and any help or pointers is much appreciated.

I’m 90% that when a flash movie is exported, the classes get hardcoded into the swf file and are inaccessable from other files on your server, unless, that is, you have them exported into the other SWFs as well

from experience class essentially are stuck on which ever level they are imported in,

hence you should have one swf, with all the code on one level

Thanks for the replies guys. What a nightmare, so I’m able to access function and variables defined in the external SWF, but not classes?

If anyone has any good suggestion on how to get round this and still be able to keep my definition of the class on the external server it would be much appreciated.

An update for anyone who ever has the same problem - I got round this by updating external.swf with some extra function to work on a local instance of SomeClass, rather than passing the instance of SomeClass from external.swf to loader.swf.

Thanks.