# Bitmapdata transparent pixels

**URL:** https://forum.kirupa.com/t/bitmapdata-transparent-pixels/298616
**Category:** flash
**Created:** [October 21, 2009, 11:01pm UTC](https://forum.kirupa.com/t/bitmapdata-transparent-pixels/298616 "2009-10-21T23:01:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![danielsvane](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@danielsvane](https://forum.kirupa.com/u/danielsvane)
#### Post date: [October 21, 2009, 11:01pm UTC](https://forum.kirupa.com/t/bitmapdata-transparent-pixels/298616/1 "2009-10-21T23:01:32Z")

</div>

Hey Kirupians

Im playing with some bitmapdata in flash, and Im really trying to wrap my head around it, but apparently my head is not big enough.

I have this code, that I would assume drew a 200x200 white rectangle, and then drew a 20x20 transparent cube inside. Instead it draws a black cube, inside the white cube.

```auto

var bmd:BitmapData = new BitmapData(200, 200, true, 0xFFFFFFFF);
var bitmap:Bitmap = new Bitmap(bmd);
addChild(bitmap);

for(var k:int=0; k<20; k++){
    for(var l:int=0; l<20; l++){
        bmd.setPixel(k, l, 0x00000000);
    }
}

```

What am I doing wrong?
