You'll probably have a container class which manages loading, etc. It loads swfs. In the swf a class implements your Interface.The class get initialized inside the loaded clip, so you don't have to know anything about it.
interface ricardo.Loadable { public function doSomething(Void):Void } Your Container or ViewManager or whatever calls doSomething(); Another approach could maybe a Factory, but, hm no not really in this case. It's a bad idea to initialize view widgets by someone else from the outside. It really depends on what's going on in these loaded clips. class ricardo.ClassFactory { public static function getClass(name:String, args:Object):Object { return new Function(eval(name))(args ? args : []); } } Regards, Michael On 11/8/06, Ricardo Sánchez <[EMAIL PROTECTED]> wrote:
I'm sorry, I'll explain mysel. If I make an interface that I want their movies to implement... How do I load an external movie? To load it instanciating the class I'll have to compile it... am I wrong? Can you show some code? I'm pretty lost. Thanks all. On 11/8/06, Michael Nisi <[EMAIL PROTECTED]> wrote: > > Hi Ricardo, why do you think using Interface or Interfaces will force > you to compile the collaborators code. I don't get the point. They can > compile your Interfaces into their swfs and you can compile them into > yours. That's what interfaces are for. No? > > Regards > Michael > > On 11/8/06, Ricardo Sánchez <[EMAIL PROTECTED]> wrote: > > By registration code you mean register to a class? As in > Object.registerClass() > > ? > > > > On 11/8/06, Janis Radins <[EMAIL PROTECTED]> wrote: > > > > > > just force them to execute some registration code on first frame of > theyr > > > movie and pass instance which will accept all those calls according to > > > predefined communication interface > > > > > > 2006/11/8, Ricardo Sánchez <[EMAIL PROTECTED]>: > > > > > > > > Hi! > > > > > > > > Where I work we are about to begin a pretty big project > collaborating > > > with > > > > some other agencies. > > > > > > > > The thing is we are going to develop the main movie with the menus > and > > > > other > > > > stuff where every other movie any agency develops is going to be > loaded. > > > > > > > > I was thinking about writing an interface class and give it to our > > > > collaborators so their main class would have to implement some > specific > > > > methods (like start, finish, resize...) > > > > > > > > But then I thought that doing it this way will probably force us to > > > > compile > > > > their fla ourselves, and that's something we want to avoid. Every > movie > > > > has > > > > to be independent and compile on itself, and then the swf should fit > in > > > > our > > > > proyect. > > > > > > > > Does this make any sense? Can anyone help? > > > > > > > > Thanks. > > > > _______________________________________________ > > > > Flashcoders@chattyfig.figleaf.com > > > > To change your subscription options or search the archive: > > > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > > > > > Brought to you by Fig Leaf Software > > > > Premier Authorized Adobe Consulting and Training > > > > http://www.figleaf.com > > > > http://training.figleaf.com > > > > > > > _______________________________________________ > > > Flashcoders@chattyfig.figleaf.com > > > To change your subscription options or search the archive: > > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > > > Brought to you by Fig Leaf Software > > > Premier Authorized Adobe Consulting and Training > > > http://www.figleaf.com > > > http://training.figleaf.com > > > > > _______________________________________________ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com > > http://training.figleaf.com > > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com