PutMovieFromStream
Syntax
procedure PutMovieFromStream(layer: integer; AStream: TStream); virtual;
Description
Loads a Flash movie from a stream into the specified layer.
Using the component, you can load any Flash movie directly from a stream object. Both LoadMovieFromStream and PutMovieFromStream allow loading without creating temporary files. This enables on-the-fly playback from resources or memory. For example, you can embed one or more Flash movies in the resource section of your application and load them directly from the executable.
Delphi Example
{$RESOURCE 'res\movie.res'}
...
type
TMainForm = class(TForm)
FlashPlayerControl1: TFlashPlayerControl;
...
end;
...
procedure TMainForm.FormCreate(Sender: TObject);
var
ResourceStream: TResourceStream;
begin
ResourceStream := TResourceStream.Create(0, 'EmbeddedMovie', 'FLASH');
FlashPlayerControl1.PutMovieFromStream(0, ResourceStream);
ResourceStream.Free;
end;
C++Builder Example
#pragma resource "res\\movie.res"
...
class TMainForm : public TForm
{
__published:
void __fastcall FormCreate(TObject *Sender);
...
};
...
void __fastcall TMainForm::FormCreate(TObject *Sender)
{
TResourceStream* ResourceStream = new TResourceStream(0, "EmbeddedMovie", "FLASH");
FlashPlayerControl1->PutMovieFromStream(0, ResourceStream);
delete ResourceStream;
}