# PNGEncoder Problem

**URL:** <https://forum.kirupa.com/t/pngencoder-problem/273492>\
**Category:** flash\
**Created:** [October 16, 2008, 2:48am UTC](https://forum.kirupa.com/t/pngencoder-problem/273492 "2008-10-16T02:48:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jazzman121](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jazzman121/32/127_2.png) [@jazzman121](https://forum.kirupa.com/u/jazzman121)\
**Post date:** [October 16, 2008, 2:48am UTC](https://forum.kirupa.com/t/pngencoder-problem/273492/1 "2008-10-16T02:48:16Z")

</div>

hey! im having a weird issue

when i use PNGEncoder from adobe  
I get this error

here is my code

```auto

var bmd : BitmapData = new BitmapData( maskMC.width, maskMC.height, true, 0x00000000 );

bmd.draw( ContainerMC, new Matrix(), null, null, null, true );
			
var byteArray : ByteArray = new PNGEncoder.encode(bmd);

```

Im getting this error

1048: Method cannot be used as a constructor.

Any idea why?  
Thanks
