unit evo_intro;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, MPlayer, TransparentPanel, Buttons;

type
  TIntro = class(TForm)
    intro1: TMediaPlayer;
    procedure FormActivate(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
    procedure intro1Notify(Sender: TObject);
    procedure FormKeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Intro: TIntro;

var
  Panel: TTransparentpanel;

implementation

uses Picture1;

{$R *.dfm}

procedure TIntro.FormActivate(Sender: TObject);
begin
 Panel:=TTransparentPanel.Create(self);
 Panel.Parent := Self;
 Panel.Left := 72;
 Panel.Top := 40;
 Panel.Width:=640;
 Panel.Height:=480;

 intro1.FileName:='resources\video\intro.avi';
 intro1.Open;
 intro1.Display:=panel;
 intro1.DisplayRect:=Panel.ClientRect;
 intro1.play;
end;

procedure TIntro.SpeedButton1Click(Sender: TObject);
begin
 intro1.stop;
 intro.close;
 pic1.show;
end;

procedure TIntro.intro1Notify(Sender: TObject);
begin
 intro1.stop;
 intro.close;
 pic1.show;
end;

procedure TIntro.FormKeyPress(Sender: TObject; var Key: Char);
begin
 if Key = #27 then
  begin
   intro1.stop;
   intro.close;
   pic1.show;
  end;
end;

end.
