unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ComCtrls;

type
  TForm2 = class(TForm)
    Animate1: TAnimate;
    Animate2: TAnimate;
    BitBtn1: TBitBtn;
    procedure FormShow(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.BitBtn1Click(Sender: TObject);
begin
   Animate1.Active := false;
  	Animate2.Active := false;
end;

procedure TForm2.FormShow(Sender: TObject);
var
	fn : String;

begin
   fn := 'filecopy.avi';

	if FileExists(fn) then
   begin
		Animate1.FileName := fn;
   	Animate1.Active   := true;
   end;

   fn := 'search.avi';
	if FileExists(fn) then
   begin
		Animate2.FileName := fn;
   	Animate2.Active   := true;
   end;
end;

end.
