I want to save Flare3d scene as a png file using actionscript
this what I have tried , i am able to save file but image is not transparent(it is showing black background) which i want to remove
var bmpd:BitmapData = new BitmapData(scene.viewPort.width, scene.viewPort.height,true,0x00000000 );
scene.context.clear();
scene.render();
scene.context.drawToBitmapData( bmpd );
var ba:ByteArray = PNGEncoder.encode(bmpd);
var file:FileReference = new FileReference();
file.addEventListener(Event.COMPLETE, saveSuccessful1);
file.save(ba, "image3d.png");
is there any better way to this to get transparent image
thanks