Create bitmap

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

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);