# Canvas

**URL:** <https://forum.kirupa.com/t/canvas/312714>\
**Category:** Uncategorized\
**Created:** [August 11, 2010, 8:02am UTC](https://forum.kirupa.com/t/canvas/312714 "2010-08-11T08:02:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhin88](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@abhin88](https://forum.kirupa.com/u/abhin88)\
**Post date:** [August 11, 2010, 8:02am UTC](https://forum.kirupa.com/t/canvas/312714/1 "2010-08-11T08:02:47Z")

</div>

How to create a canvas in AS3 for CS4 ? wat is the header file to be included ? Is this code right?

canvas:Canvas = new Canvas();  
canvas.setStyle(“backgroundColor”, 0xff0000);  
addChild(canvas);

but this is not working. Suggestions ?
