OnLoadExternalResourceEx

Syntax

Delphi

TFlashPlayerControlOnLoadExternalResourceEx = procedure(
  ASender: TObject;
  const URL: WideString;
  Stream: TStream;
  out bHandled: Boolean) of object;
 
OnLoadExternalResourceEx: TFlashPlayerControlOnLoadExternalResourceEx;

C++Builder

typedef bool *BooleanRef;
 
typedef void __fastcall (__closure *TFlashPlayerControlOnLoadExternalResourceEx)
   (System::TObject* ASender,
    const WideString URL,
    Classes::TStream* Stream,
    BooleanRef bHandled);

Description

The OnLoadExternalResourceEx event is triggered when a Flash movie loaded from a TStream attempts to load an external resource using a relative path (for example: "images/image.jpg").

Unlike OnLoadExternalResource, this event allows you to set bHandled to true and then write the resource content asynchronously to the provided Stream. This approach is useful for large resources or when resource delivery needs to be done in a background thread.

Note: For movies not loaded from a TStream, use SetGlobalOnLoadExternalResourceHandlerEx.

See also: Streaming.