есть анимация: одна картинка катается по другой с помощью таймера. процедура повторяется циклически. нужно подключить wav файл, чтобы сразу же после окончания сообщения wav пошла анимация
как это сделать? желательно с примерами. Добавлено @ 21:23 мой код:
| Код |
unit poletvko2;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls;
type TForm2 = class(TForm) Image1: TImage; Image2: TImage; Timer1: TTimer; procedure Timer1Timer(Sender: TObject); procedure FormActivate(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Timer1Timer(Sender: TObject); begin if image2.left>650 then begin image2.left:=0; image2.top:=336; end else begin image2.left:=image2.Left+5; image2.top:=image2.top-2; end; end;
procedure TForm2.FormActivate(Sender: TObject); begin image2.left:=0; image2.top:=336; end;
end. |
| Код | object Form2: TForm2 Left = 199 Top = 189 Width = 808 Height = 538 AutoSize = True Caption = #1055#1086#1083#1105#1090' '#1088#1072#1082#1077#1090#1099' '#1085#1072#1076' '#1090#1077#1088#1088#1080#1090#1086#1088#1080#1077#1081' '#1042#1086#1089#1090#1086#1095#1085#1086'-'#1050#1072#1079#1072#1093#1089#1090#1072#1085#1089#1082#1086#1081' '#1086#1073#1083#1072#1089#1090#1080 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False OnActivate = FormActivate PixelsPerInch = 96 TextHeight = 13 object Image1: TImage Left = 0 Top = 0 Width = 800 Height = 504 AutoSize = True Center = True Picture.Data = {картинка} Stretch = True Transparent = True end object Timer1: TTimer Interval = 50 OnTimer = Timer1Timer Left = 16 Top = 296 end end | |