# \[Flex\] Creating Sprite in a UIComponent?

**URL:** https://forum.kirupa.com/t/flex-creating-sprite-in-a-uicomponent/216049
**Category:** flash
**Created:** [February 13, 2007, 10:05am UTC](https://forum.kirupa.com/t/flex-creating-sprite-in-a-uicomponent/216049 "2007-02-13T10:05:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ven](https://avatars.discourse-cdn.com/v4/letter/v/f9ae1b/32.png) [@ven](https://forum.kirupa.com/u/ven)
#### Post date: [February 13, 2007, 10:05am UTC](https://forum.kirupa.com/t/flex-creating-sprite-in-a-uicomponent/216049/1 "2007-02-13T10:05:16Z")

</div>

If i try:

myCanvas.addChild(new Sprite());

i get the error that its not a mx.core.IUIComponent.

Is there some kind of a container for Flex UIComponents which can handle normal DisplayObjects as Sprite and MovieClips?
