OnFSCommand

Syntax

Delphi

TFlashPlayerControlFSCommand = procedure(ASender: TObject; const command: WideString; const args: WideString) of object;  
property OnFSCommand: TFlashPlayerControlFSCommand;

C++Builder

typedef void __fastcall (__closure *TFlashPlayerControlFSCommand)
  (System::TObject* ASender,
    const System::WideString command,
    const System::WideString args);

Description

This event is triggered when the Flash ActiveX event OnFSCommand is raised.

This occurs in the following cases:

  • When a GetURL action in the movie specifies a URL beginning with FSCommand:
  • When the fscommand function is explicitly called from ActionScript:
fscommand("show_msg", "Hello!");
fscommand("quit");

The text after the colon (:) is passed as the command parameter, and the optional argument is provided in the args parameter.

This event can be used to handle button clicks, frame actions, or other triggers from inside the Flash movie.

Note: Do not destroy the TFlashPlayerControl or TTransparentFlashPlayerControl instance inside this event handler.
If cleanup is required, use a timer with a short interval or post a message using the Windows API (PostMessage).