LoadMovieFromStream
Syntax
procedure LoadMovieFromStream(layer: integer; AStream: TStream); virtual;
Description
The LoadMovieFromStream
method loads a Flash movie from a given stream into the specified layer.
This allows applications to load movies directly from memory or other supported sources without creating temporary files. For example, you can embed one or more Flash movies into the resource section of your application and load them at runtime.
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.LoadMovieFromStream(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->LoadMovieFromStream(0, ResourceStream);
delete ResourceStream;
}