Merge 2

Submitted by eLenka on 4 August, 2010 - 13:37
Merge 2 SWF files

Make new SWF file from existing. Sample of TFlashExternalMovie class work.

Source archive: marge2.zip (195 KB)

 

Sample works

Template file:
New file after insertion:
Some sample source: 
 var Movie: TFlashMovie;
     EM: TFlashExternalMovie;
begin
  Movie := TFlashMovie.Create(0, 0, 320, 240, 10, scPix);
  Movie.Compressed := true;
 
  EM := Movie.AddExternalMovie('demo_6.swf', eimSprite, true);
  Movie.PlaceObject(EM.Sprite, 1).ColorTransform.AddG := $9F;
  With Movie.PlaceObject(EM.Sprite, 2) do
    begin
      SetTranslate(50, 100);
      SetScale(0.5, 0.5);
      ColorTransform.addB := -100;
      Name := 'd2';
    end;
 
  Movie.FrameActions.SetTarget('d2');
  Movie.FrameActions.GotoAndPlay(EM.Sprite.FrameCount div 2);
 
  Movie.ShowFrame;
  Movie.MakeStream;
  Movie.SaveToFile('demo.swf');
  Movie.Free;