# Create bitmap

**URL:** https://forum.kirupa.com/t/create-bitmap/294095
**Category:** Uncategorized
**Created:** [August 8, 2009, 8:18am UTC](https://forum.kirupa.com/t/create-bitmap/294095 "2009-08-08T08:18:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tragic](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tragic](https://forum.kirupa.com/u/tragic)
#### Post date: [August 8, 2009, 8:18am UTC](https://forum.kirupa.com/t/create-bitmap/294095/1 "2009-08-08T08:18:52Z")

</div>

Can somone tell me what stupid mistake I am making with this code, I get 2 errors on the addChild(bmp):1180 and 1120. This is copied straight from essential actionscript 3

```auto

package FlashPackage{
    import flash.display.*;
    
    public class FlashTest extends Sprite{
        public function FlashTest()
        
        var img:BitmapData = new BitmapData(20,20,false,0xFF00FF00);
        var bmp:Bitmap = new Bitmap(img);
        addChild(bmp);
    }
}

```
