Can't save and display Bitmaps

i’m using Flex 2, as3.
i have a webcam class, that shows a webcam stream and after snapping, creates a Bitmap from the webcam stream and adds the Bitmap to a display object. the user can snap again.
i’m trying to add a “prev” “next” option. i’m saving the snapped images (Bitmaps) in an Array, so i can display the Bitmaps after paging:

var data:BitmapData = _imgSnapped.bitmapData;
var bitmap:Bitmap = new Bitmap(data);
_snapArr[indx] = bitmap;

and displaying the Bitmaps like so:
var data:BitmapData = _lastSnapped.bitmapData;
var bitmap:Bitmap = new Bitmap(data);
_prevImgSnapped = bitmap;
_previewDisplay.addChild(_prevImgSnapped);

the problem is, the Bitmaps seem to empty. i know the Bitmap i save in the array is the same one (it has the same reference), but the variables of the bitmapData are gone!!! (for example, tracing the bitmapData.width leads to a EOFError).

how can i properly save my Bitmaps with all their bitmapData? :puzzled:

Read about lock()/unlock() methods of BitmapData class.
Bitmap may update the bitmapData inside itself it it’s unlocked and will not update if it’s locked. Anyhoo, I’d use BitmapData.clone() method to make sure I’m saving an unbound copy of BitmapData and nothing else that may destroy it isn’t referencing it.