CreateFrameBitmap

Syntax

procedure CreateFrameBitmap(layer: integer; AStream: TStream); virtual;

Description

Creates a bitmap image of the current frame of the Flash movie.
This method can be used to capture single frames and export them as images, or to build a sequence of bitmaps (for example, JPEGs) that can later be combined into a video file such as AVI.

Delphi Example

procedure TMainForm.ButtonSaveAsBitmapClick(Sender: TObject);
var
  Bitmap: TBitmap;
  Picture: TPicture;
begin
  Picture := TPicture.Create;
  Bitmap := FlashPlayerControl1.CreateFrameBitmap;
  Picture.Bitmap := Bitmap;
 
  Picture.SaveToFile('Frame.bmp');
 
  Bitmap.Free;
  Picture.Free;
end;

C++Builder Example

void __fastcall TMainForm::ButtonSaveAsBitmapClick(TObject *Sender)
{
  TPicture* Picture = new TPicture;
  Graphics::TBitmap* Bitmap = FlashPlayerControl1->CreateFrameBitmap();
  Picture->Bitmap = Bitmap;
 
  Picture->SaveToFile("Frame.bmp");
 
  delete Bitmap;
  delete Picture;
}