I cannot get
OnNotify for KOLMediaPlayer to work.
Here is a basic example:
program KolTest;
uses
KOL, KOLMediaPlayer;
type
Ptest = ^Ttest;
Ttest = object(TObj)
Form: PControl;
Clip: PMediaPlayer;
procedure MouseDown(Sender: PControl; var Mouse: TMouseEventData);
procedure Notify(Sender: PMediaPlayer; NotifyValue: TMPNotifyValue);
end;
var
Test: PTest;
procedure Ttest.Notify(Sender: PMediaPlayer; NotifyValue: TMPNotifyValue);
begin
ShowMessage('Notify!');
end;
procedure Ttest.MouseDown(Sender: PControl; var Mouse: TMouseEventData);
begin
Clip.Free;
Clip := NewMediaPlayer('c:\WINDOWS\clock.avi',Form.Handle);
with Clip^ do
begin
Wait := False;
DisplayRect := Form.ClientRect;
OnNotify := Notify;
Play(0,-1);
end;
end;
begin
New(Test,Create);
Test.Form := NewForm(nil,'KOL Test').SetSize(320,240);
Test.Form.OnMouseDown := Test.MouseDown;
Run(Test.Form);
end.
I have also tried with PAS_VERSION defined too.
Can anyone confirm or make suggestions please.