Thanks a lot, Cory, this helps, but only partially.

//code in main class extending Application
var triangle:FlexSprite = new FlexSprite( );
//draw triangle
rawChildren.addChild(triangle);

shows a triangle in SWF, but also shows an error:
(output)
[Fault] exception, information=ArgumentError: Error #2025: The
supplied DisplayObject must be a child of the caller.
(Flash debug player)
ArgumentError: Error #2025: The supplied DisplayObject must be a child
of the caller.
        at flash.display::DisplayObjectContainer/getChildIndex()
        at 
mx.managers::SystemManager/getChildIndex()[C:\dev\flex_201_ja\sdk\frameworks\mx\managers\SystemManager.as:1270]
        at 
mx.managers::SystemManager/mouseDownHandler()[C:\dev\flex_201_ja\sdk\frameworks\mx\managers\SystemManager.as:2478]


Any ideas?

On 2/14/08, Cory Petosky wrote:
> Flex apps override addChild to only allow things that implement
> IUIComponent. If you need to add a child that's just a plain display
> object, manipulate the rawChildren property instead.
>
--
Best regards,
GregoryN
================================
http://GOusable.com
Flash components development.
Usability services.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to