Adding Sprite (primitive) To a Canvas

To add a sprite (or any other primitive) to a Flex canvas you have to wrap it in a UIComponent.


<mx:canvas id="myCanvas" x="312" y="0" width="640" height="480">
<mx:uicomponent id="spriteWrapper" initialize="spriteWrapper.addChild(myPrettySprite)">
</mx:uicomponent>
</mx:canvas>

Comments

Popular Posts