A SWC is only a zipped up component. Once you put it in your movie, it becomes a compiled clip, or component. From my tests, you CAN extend a component, as long as the component you are extending is in your library. Additionally, it looks like any assets inside the component can also be used. I didn't try extending a class that the component itself extended (for example extending UIComponent, instead of Button)
The example I used was a simple component I created a while ago which I knew the classes would not be available for (eg: not the V2 components, which has class files in the classes folder) -- I created an empty movieclip, and attached a class which extended the component's class. I added a trace in the constructor (and called super()), and added some timeline code calling methods in the super class. It worked fine. If you would like an example I can send it to you. Just email me off list. On 4/6/06, Shaw, Matt (MTVN) <[EMAIL PROTECTED]> wrote: > > Not one comment? I know someone else has tried this also. > > Mike Chambers, what's the official word? > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Shaw, > Matt (MTVN) > Sent: Wednesday, April 05, 2006 10:48 AM > To: Flashcoders mailing list > Subject: [Flashcoders] Can You Extend a Swc Component? > > I'm trying to use a component's intrinsic class as a super class. > > I have a component installed. I unzipped the .swc files and "stole" the > intrinsic classes so I could get proper code checking in Eclipse. This > works fine. Then I attempted to extend one of the intrinsic classes. > Flash compiles with no complaints but an instance of my subclass doesn't > actually seem to inherit anything from the super class. If I delete the > intrinsic classes, Flash will compile, with no complaints, and then > inheritance works! It seems that the "compiled" aso intrinsic class > satisfies the compiler. If I then delete my aso cache, then the Flash > compiler complains it can't find the super class. > > I tried all sorts of weird things in-between each of these steps to make > the compiler happy but maybe I'm not supposed to be doing this in the > first place. And no, I'm not going to touch prototype. > > Thanks, > Matt > _______________________________________________ > 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 > -- ------------------------- Lanny McNie _______________________________________________ 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