Board index » delphi » .AVI films after each other

.AVI films after each other

Hello

I'm just a beginner in Delphi. So please don't make it too complicated.
I'm working on my program that plays a movie when it executes. How can I
make that? And when that movie is finished there is another movie that must
start playing that. How can I play the second movie AFTER the first movie is
stopped playing.

Please mail the answers to multi...@SoftHome.net

 

Re:.AVI films after each other


Assuming you are using the MediaPlayer control, take a look at the
TMediaPlayer.Mode property.  It has a value of mpPlaying while the
movie is playing, and mpStopped when the movie is done.  You might
want to use a Timer control to check the Mode property so that you can
start up the next movie when the Mode changes to mpStopped.

dick

On Sat, 24 Jul 1999 08:31:55 +0200, "Bierman" <bier....@consunet.nl>
wrote:

Quote
>Hello

>I'm just a beginner in Delphi. So please don't make it too complicated.
>I'm working on my program that plays a movie when it executes. How can I
>make that? And when that movie is finished there is another movie that must
>start playing that. How can I play the second movie AFTER the first movie is
>stopped playing.

>Please mail the answers to multi...@SoftHome.net

Re:.AVI films after each other


Is there a way to play an AVI without TMediaPlayer ?

Quote
CRR <crrog...@mcn.net> wrote in message

news:3799c6ab.5827656@news.mcn.net...

Quote
> Assuming you are using the MediaPlayer control, take a look at the
> On Sat, 24 Jul 1999 08:31:55 +0200, "Bierman" <bier....@consunet.nl>
> wrote:
> >start playing that. How can I play the second movie AFTER the first movie
is
> >stopped playing.

> >Please mail the answers to multi...@SoftHome.net

Re:.AVI films after each other


Quote
Bierman wrote in message <7nbn3b$75...@news.worldonline.nl>...
>Hello

>I'm just a beginner in Delphi. So please don't make it too complicated.
>I'm working on my program that plays a movie when it executes. How can I
>make that? And when that movie is finished there is another movie that must
>start playing that. How can I play the second movie AFTER the first movie
is
>stopped playing.

How about

mediaplayer1.filename:=(.....); {file1}
mediaplayer1.open;
mediaplayer1.wait:=true;
mediaplayer1.play;
mediaplayer1.filename:=(.....); {file2}
mediaplayer1.open;
mediaplayer1.play;

with necessary error checking....  (all my work is blown to CD, so I never
include it except when referencing external sources.... makes it easier to
write - and smaller.... controlled enviroment!)....

A.

Quote
>Please mail the answers to multi...@SoftHome.net

Re:.AVI films after each other


That Code I already used sometime but while the AVI files are playing it
isn't possible then to click on buttons or that sort of things. Know how to
do that?

Mail me at multi...@SoftHome.net for answers

Quote
>How about

>mediaplayer1.filename:=(.....); {file1}
>mediaplayer1.open;
>mediaplayer1.wait:=true;
>mediaplayer1.play;
>mediaplayer1.filename:=(.....); {file2}
>mediaplayer1.open;
>mediaplayer1.play;

>with necessary error checking....  (all my work is blown to CD, so I never
>include it except when referencing external sources.... makes it easier to
>write - and smaller.... controlled enviroment!)....

>A.

Re:.AVI films after each other


Quote
"Bierman" <bier....@consunet.nl> wrote:
>Hello

>I'm just a beginner in Delphi. So please don't make it too complicated.
>I'm working on my program that plays a movie when it executes. How can I
>make that? And when that movie is finished there is another movie that must
>start playing that. How can I play the second movie AFTER the first movie is
>stopped playing.

>Please mail the answers to multi...@SoftHome.net

const fn1='c:\test2\aro.avi';        //just 2 avi's.
          fn2='c:\test2\search.avi';

procedure TForm1.Button1Click(Sender: TObject);
// init and start the procedure
begin
     with mediaplayer1 do
     begin
          display:=panel1;
          fileName:=fn1;
          open;
          displayrect:=panel1.clientrect;
          onNotify:=MediaPlayer1Notify;
          play;
          notify:=true;
     end;
end;

procedure TForm1.MediaPlayer1Notify(Sender: TObject);
begin
     with mediaplayer1 do
     begin
          if notifyvalue=nvSuccessful then
          begin
              messagebeep(0);
              notify:=false;
              close;
              if filename=fn2 then
                  filename:=fn1
              else
                 filename:=fn2;
              open;
              displayRect:=panel1.clientrect;
              play;
              notify:=true;
          end;
     end;
end;

Greetings,
Kees

Other Threads