Load a SWF into another SWF

F-IN-BOX for Delphi / Builder C++ / VCL
yallepaixao
Posts: 13
Joined: Sat Mar 03, 2007 7:35 pm

Load a SWF into another SWF

Postby yallepaixao » Wed Jul 25, 2007 11:40 pm

Hello,

IÒ‘m in trouble.

I have a swf that contain a photoplay of clip inside. At that rate, to open that swf in a way correct, setei in the Component Inspector of clip the ways where the photoplay and the SteelExternalPlayMute are. Only in accordance with the code down, when go , he takes the screen all

All of swf is into a DLL, above is the code that run on LoadExternalResource event.

If i try i run in IE itÒ‘s works fine, just in Delphi itÒ‘s crash.

Code: Select all

FlashPlayerControlLoadExternalResource(ASender: TObject;
begin
      DLL := LoadLibrary(Pchar(NomeDLL));
      ResourceStream := TResourceStream.Create(DLL, strURLTratada, 'LSH');
      FlashPlayerControl.LoadMovieFromStream(0, ResourceStream);
      ResourceStream.Free;
end;


Thanks

ZinePacker
Posts: 6
Joined: Fri Jun 15, 2007 9:19 am

LoadExternalResource

Postby ZinePacker » Thu Jul 26, 2007 1:20 am

procedure TForm1.LoadMovie;
begin
DLL := LoadLibrary(Pchar(NomeDLL));
ResourceStream := TResourceStream.Create(DLL, strURLTratada, 'LSH');
FlashPlayerControl.LoadMovieFromStream(0, ResourceStream);
ResourceStream.Free;
end;

procedure TForm1.FlashPlayerControl1LoadExternalResource(ASender: TObject;
const URL: String; Stream: TStream);
var
rs:TResourceStream;
begin
if URL='external.swf' then
begin
rs:=TResourceStream.Create(DLL, strURLTratada, 'ext');
rs.SaveToStream(Stream);
rs.free;
end;
end;


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 15 guests

cron