Cita:
|
Empezado por Caral
...el unico problema que le veo es que hace el trayecto solo una vez y me gustaria que se repitiera, no he podido hacerlo.
Saludos
|
En el procedimiento del Timer añade las tres líneas que te pongo en ROJO y listo; Si las comentas lo hace 1 vez, si las descomentas lo hace cíclico.
Código Delphi
[-]
var
total:Integer;
begin
_pezActual := _pezActual + 1;
total := Length(POSITION_PEZ1X);
if (_pezActual > total) then begin
TimerAnim.Enabled := False;
I1.Visible := False;
IV1.Visible := False;
IR1.Visible := False;
TimerAnim.Enabled := True;
_pezActual := 0;
Exit;
end
else begin
I1.Visible := True;
I1.Transparent := True;
I1.Left := POSITION_PEZ1X[_pezActual];
I1.Top := POSITION_PEZ1Y[_pezActual];
IV1.Visible := True;
IV1.Transparent := True;
IV1.Left := POSITION_PEZ2X[_pezActual];
IV1.Top := POSITION_PEZ2Y[_pezActual];
IR1.Visible := True;
IR1.Transparent := True;
IR1.Left := POSITION_PEZ3X[_pezActual];
IR1.Top := POSITION_PEZ3Y[_pezActual];
end;
end;