Ah. nice tip. I'll give that a try.
On 17/10/2008, at 3:58 PM, Gordon Smith wrote:
Although normal children of a Container must be a IUIComponent, you
can add a plain Sprite as a "raw child" of a Container:
var s:Sprite = new Sprite();
// draw into s.graphics
// set s.x, s.y, s.width, and s.height
myContainer.rawChildren.addChild(s);
A raw child doesn't get managed by the LayoutManager, so you must
position and size it yourself.
Gordon Smith
Adobe Flex SDK Team
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Tracy Spratt
Sent: Thursday, October 16, 2008 11:07 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Efficiency and objects in the display
list
I think that is correct. Quoting Alex, “Navigator children must be
Containers, Container children must be IUIComponents, and
UIComponent children can be anything.”
Tracy
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Amy
Sent: Wednesday, October 15, 2008 11:36 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Efficiency and objects in the display list
--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Container children must be UIComponents. You will need to add the
> sprites to a UIComponent first.
I think technically there's just an interface that has to be
implemented on whatever you add (IFlexDisplayObject? IUIComponent?).
If you extend Sprite or whatever and implement whichever one is
needed,
you could add it to a container.
-Amy