hey,
i think you need to forget about using .wait (and threading) and have a look at
doing it asyncronously using the .onnotify event to tell when the current clip ends.
much simpler (and possible)..
something like: (quick hack) (the .mode property seems to have a bug in d6 too)
procedure TForm1.Button1Click(Sender: TObject);
//starts the sequence
begin
GetNext;
mp.Open;
mp.Play;
end;
procedure TForm1.mpNotify(Sender: TObject);
//when clip ends, get the next clip to show and plays it
begin
if mp.Mode=mpstopped then
begin
GetNext;
if mp.FileName='' then Exit;
mp.Open;
mp.Play;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
lb.Items.Add('c:\clip1.avi');
lb.Items.Add('c:\clip2.avi');
end;
procedure TForm1.GetNext;
//gets next filename from a listbox
var
aStr:string;
begin
if lb.Items.Count>0 then
begin
mp.FileName:=lb.Items[0];
lb.Items.Delete(0);
end
else
begin
mp.FileName:='';
end;
end;
hope that helps,
b
--- Chris Veale <[EMAIL PROTECTED]> wrote:
> Hi.
>
> Im playing around with the tmediaplayer and am wanting to play a video
> in a second window, but I want to update the initial form with a time
> remaining
>
> when I play the video though ir locks the form until the video stops (I
> believe cause I use the wait procedure of the tmediaplayer)
>
> but I need the wait as people can choose to play two videos and I want
> them to be able to, instead of skipping to the last one only.
>
> I looked at threads for this but this also locks the form.
>
> any thoughts how I can do this?
>
> Cheers
>
> Chris Veale
>
>
> ______________________________________________________
> The contents of this e-mail are privileged and/or confidential to the
> named recipient and are not to be used by any other person and/or
> organisation. If you have received this e-mail in error, please notify
> the sender and delete all material pertaining to this e-mail.
> ______________________________________________________
> _______________________________________________
> Delphi mailing list
> [EMAIL PROTECTED]
> http://ns3.123.co.nz/mailman/listinfo/delphi
__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi