# Remove Bitmap

**URL:** <https://forum.kirupa.com/t/remove-bitmap/331483>\
**Category:** flash\
**Created:** [August 10, 2013, 7:55am UTC](https://forum.kirupa.com/t/remove-bitmap/331483 "2013-08-10T07:55:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiwirob](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kiwirob/32/7153_2.png) [@kiwirob](https://forum.kirupa.com/u/kiwirob)\
**Post date:** [August 10, 2013, 7:55am UTC](https://forum.kirupa.com/t/remove-bitmap/331483/1 "2013-08-10T07:55:23Z")

</div>

Hi there

I’m new to AS3 so bare with me if my code is rough!

I’ve created the following code that takes a screen shot of my webcam and places it on the stage:

```php
function ScreenShot():void {
    addChild(snapShot(LoadedCam)); 
    function snapShot(mc:DisplayObject):Bitmap {
        var m:Matrix = new Matrix(Flip,0,0,1,240,400);        
        var TempPhoto:BitmapData = new BitmapData(480,800,true,0x00000000);
        TempPhoto.draw(LoadedCam,m);
        var bmp:Bitmap = new Bitmap(TempPhoto);
        return bmp;
    }
}

```

This works fine, however I am unable to remove this bitmap from the following button code:

```php
function RetakeButton(event:MouseEvent):void { 
    TempPhoto.dispose();
}

```

How do I remove the bitmap from the stage?

Thanks.
