Thanks for the speedy response. I tried the following: Object.registerClass("mapHolder", SWFMapHolder);
SWFMapHolder imports flash.geom.Point and compiles with no problem. However, how that I'm registering SWFMapHolder from my movie, I'm receiving the following error: **Error** ImageMapHolder.as: Line 32: The class or interface ' flash.geom.Point' could not be loaded. public function getPosition():Point { I've tried creating a new Flash document, creating an empty movie clip, and calling Object.registerClass("empty_mc", SWFMapHolder), and that works just fine. Why does my document have a hard time with import? Liam On 11/2/05, JesterXL <[EMAIL PROTECTED]> wrote: > > Object.registerClass supports AS2. > > ----- Original Message ----- > From: "Liam Morley" <[EMAIL PROTECTED]> > To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com> > Sent: Wednesday, November 02, 2005 11:54 AM > Subject: [Flashcoders] can I dynamically register an MC with an AS2.0class? > > > I'm working in FlashPro8. I have an empty movie clip called "mapHolder" > defined on the stage. Depending on some parameters when starting my swf, > i'm > either going to call loadMovie("FlashMap.swf", mapHolder) or loadMovie(" > imagemap.jpg", mapHolder). > > I have an interface called "IMapHolder", and two implementing AS2.0classes > called "SWFMapHolder" and "ImageMapHolder". Because I'm not sure what type > it will be, I'd like to associate the MC and the class dynamically. > Something like Object.registerClass() would be perfect, but I imagine that > doesn't support AS2.0. > > Do I need to create two separate MCs, each with its own linked AS2.0class? > Or is it possible to dynamically register an MC with AS2.0? Thanks all. > > Liam > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders