Ver Mensaje Individual
  #1  
Antiguo 24-08-2004
Avatar de hermes_32
hermes_32 hermes_32 is offline
Miembro
 
Registrado: jul 2003
Posts: 94
Reputación: 23
hermes_32 Va por buen camino
Creacion dinamica de un TAnimate

Hola amigos. Como estais?
Mirad, tengo un problema al crear un TAnimate dinamicamente, y el problema esta en que no se me ejecuta el evento OnStop al terminar la secuencia avi.

Tengo el código siguiente:

Código:
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Button1: TButton;
    Animate1: TAnimate;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
    procedure Terminaya(Sender : Tobject);
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var Animacion : TAnimate;
begin
  Animacion := TAnimate.create(self);

  with Animacion do begin
   parent := self;
   parentcolor := False;
   FileName := ruta del avi;
   StartFrame := 1;
   StopFrame := 8;
   CommonAVI := aviNone;
   Repetitions := 1;
   top := 10;
   left := 50;
   visible := True;
   Transparent := false;
   color := clWhite;
   onStop := Terminaya;
   active := True;
  end;
end;

procedure TForm1.Terminaya(Sender: Tobject);
begin
   showmessage('ya se ha terminado');
end;

end.
No se cual es el problema pero cuando termina el avi, no sale el mensaje que tiene que salir. Qué estoy haciendo mal?

Gracias por la atención.
Responder Con Cita