var img_width = 100; var img_height = 100; var bdata = new MyImage(img_width, img_height); var bmp = new Bitmap(bdata); addChild(bmp);