Flash Viewers interface

All controls of Flash Viewers (TFlashViewer, TFlashViewerTransparent, TFlashViewerInvisible, TFlashViewerWindow) contain general interface methods to manipulate SWF files playing.

IFlashViewer = interface
    ['{69BE2007-D279-47D8-80B6-5EF14AE9DBE6}']
    procedure LoadMovie(const AUrl: WideString);
    procedure LoadMovieFromStream(const AStream: TStream);
    function GetVariable(const name: WideString): WideString;
    procedure SetVariable(const name: WideString; const value: WideString);
    function CallFunction(const request: WideString): WideString;
    procedure SetReturnValue(const returnValue: WideString);
    procedure Play;
    procedure StopPlay;
    procedure Rewind;
    procedure Forward;
    procedure Back;
    { properties }
    function GetLoop: boolean;
    function GetIsPlaying: boolean;
    function GetCurrentFrame: integer;
    function GetTotalFrames: integer;
    procedure SetLoop(const Value: boolean);
    procedure SetCurrentFrame(const Value: integer);
  end;

Properties and methods

Member Description

LoadMovie

Loads the movie identified by urlr. The argument type is string.

LoadMovieFromStream

Loads the movie from stream. Load any flash movie on-the-fly from any supported source.

GetVariable

Returns the value of the Flash variable specified by name. Raises an exception error if the variable does not exist.
SetVariable Sets the value of the Flash variable specified by name to the value. Type of both arguments is string.
CallFunction This function takes XML to invoke a Flash function on the other side.
SetReturnValue Records that the object will expect the method call, and will react by returning the provided return value.
Play Starts playing the animation.
StopPlay Stops playing the movie.
Rewind

Go to the first frame.

Forward

Go to the next frame.

Back

Go to the previous frame.

GetLoop

Returns loop value ('true' or 'false').

GetIsPlaying Returns playing value ('true' or 'false').
GetCurrentFrame

Returns the value number of current frame.

GetTotalFrames Returns the total number of frames in the movie. This is not available until the movie has loaded.
SetLoop

Sets needed loop value ('true' or 'false').

SetCurrentFrame

Sets the value number of current frame.