I have 4 TImages on Form and at the same position with the same size 4
TAnimates. If I click on an image I want the Animate to be shown and an
AVI-file to be played. Afterwards the Animated should be made invislbe,
thus showing and the image, and a form should be opened.
That's the easy part.
I want to save the videos in the program-directory unter "Images", but I
can't assign the directory to the mediaplayers I use at runtime, only at
design mode. If I leave the property unassigned (only by code) it
work at all. This is the code I use for every image:
Mediaplayer4.Filename := GetCurrentDir+'\Images\sub.avi';
Mediaplayer4.Display := Animate4;
Animate4.visible := true;
Mediaplayer4.wait := true;
Animate4.visible := false;
....and then a form is shown.
Did I make any mistake or is this normal?
Using the following code I found out that your suggestion gets the exact
path of the video. But the player still doesn't play it, although the
property is properly set!
procedure TMenu1.Button1Click(Sender: TObject);
Mediaplayer1.Filename := ExtractFilePath(Application.ExeName) +
edit1.text := Mediaplayer1.Filename;
Any suggestions? Or could someone recommend me a component capable of
playing AVIs that sould work?
Please answer soon, I have to hand my application in!