# bitmapData clear pixels or set alpha

**URL:** https://forum.kirupa.com/t/bitmapdata-clear-pixels-or-set-alpha/253080
**Category:** flash
**Created:** [February 26, 2008, 11:47pm UTC](https://forum.kirupa.com/t/bitmapdata-clear-pixels-or-set-alpha/253080 "2008-02-26T23:47:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![laubsterboy](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@laubsterboy](https://forum.kirupa.com/u/laubsterboy)
#### Post date: [February 26, 2008, 11:47pm UTC](https://forum.kirupa.com/t/bitmapdata-clear-pixels-or-set-alpha/253080/1 "2008-02-26T23:47:14Z")

</div>

What I have setup right now is one movieClip that is being used to be drawn into a BitmapData object.

That bitmapData object is being drawn on the enterFrame and I am needing to clear it so it doesnt have the previous enterFrames information still stored in it, then once it is clear draw the current information.

Is there a simple way to clear or erase all the pixel information in the BitmapData object?

If there is a way to set the alpha of the pixels I would really like to know how that is done as well. However, I want to change the alpha level of the entire BitmapData object, not just a few pixels.

Any help would be much appreciated 🙂
