The task is the following.
For example, a flash movie contains the code:
Code: Select all
if(this._url=="WWW.AAA.COM")
{
gotoAndStop(3);
}else{
gotoAndStop(2);
}
If we load such movie using LoadMovieFromStream, gotoAndStop(2); is executed. But how to make the movie thinking that this._url is really "WWW.AAA.COM"?
The solution.
Use a global handler to provide content of the movie:
Code: Select all
FlashPlayerControl.SetGlobalOnLoadExternalResourceHandler(ContentProvider);
FlashPlayerControl1.Movie := 'http://WWW.AAA.COM';
...
procedure TMainForm.ContentProvider(const URL: WideString; Stream: TStream);
begin
if URL = 'http://WWW.AAA.COM' then
begin
// For example, copy data from TResourceStream to Stream
end;
end;
Thank you.