Mega Code Archive

 
Categories / Flex / Container
 

Add three Canvas containers to a Panel container, each Canvas having a different color

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">     <mx:Panel id="colorsPanel" width="250" height="250" layout="absolute">         <mx:Canvas id="redBox" x="70" y="70" width="50" height="50"             backgroundColor="#FF0000" />         <mx:Canvas id="greenBox" x="90" y="90" width="50" height="50"             backgroundColor="#00FF00" />         <mx:Canvas id="blueBox" x="100" y="60" width="50" height="50"             backgroundColor="#0000FF" />     </mx:Panel> </mx:Application>