Hi all - having problems getting this script to work, and not sure why...

Any ideas?

Thanks

Mr P

=========================

import mx.controls.Button;
import mx.utils.Delegate;
import flash.display.BitmapData;
import flash.geom.Matrix;

cam = Camera.get();
output_vid.attachVideo(cam);
var snapshot:BitmapData = new BitmapData(output_vid._width, output_vid._height);

function takeSnapshot() {
snapshot.draw(output_vid,new Matrix());

this.createEmptyMovieClip("bitmap_mc",this.getNext HighestDepth());


bitmap_mc.attachBitmap(snapshot,1);

}
snap_btn.addEventListener("click", mx.utils.Delegate.create(this, takeSnapshot));