Thanks!!! Yes that was it - what I needed to do was: addingChild(child); contentPane.addChild(child); childAdded(child);
That fixed it, many thanks. Couple of reasons for why not to use a container, firstly the overhead of a container, the original AS2 control was just SWFLoader with just the addition of a loader object (forget TextInput I was just using that to test why children werent showing), it is now ending up as a container subclass with 2 full SWFLoader components by the time this goes into TileList or some such control its going to have a potential performance hit so anything I can do to keep the component lite is worthwhile. Since there are only two children, and they are internal and not exposed to the developer and they exist for the life of the component I just dont need all the overhead a container entails, and it only takes a few lines of code to get a "lite" version of container working (now that I have yout tip!). Second reason is I am using this to get up to speed with Flex2 architecture, building component libraries requires more knowledge than just subclassing so the more I pick up about how the internals work the better. Tks --- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Check out Container.as. There's a subtle difference in the way children > are added to contentPane. The Container's addingChild is called which > fixes up the nestLevel and _parent chain so invalidation can work. > > > > Is there a reason you can't subclass Container? > > > > ________________________________ > > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of reflexactions > Sent: Friday, June 15, 2007 8:48 PM > To: [email protected] > Subject: [flexcomponents] Re: Component Inside a Sprite > > > > Yeah I did that, as a kludge, I just gave it a large fixed size > (500x300) so I wouldnt miss it wherever it was hiding lol... > > but still its hiding ... >
