Solved

Change the File MediaPLayer is playing

Posted on 1998-10-08
1
153 Views
Last Modified: 2010-04-06
I have on my Form a OpenDialog and a MediaPlayer.
I want the media player to playa WAV file choosen from the opendialog. Once I have the filename i do,
  Mediaplayer.filename := OpenDialog.filename;
then MediaPLayer.play, but this doesnt work....
It doesnt play any file....
If I Put a filename in MediaPLayer.filename before I compile the progam it will play that file even when I change the Mediaplayer.filename...
What is going on here?
0
Comment
Question by:zammo
1 Comment
 
LVL 5

Accepted Solution

by:
inter earned 0 total points
ID: 1342230
Try closing and opening media player BEFORE assigning a file name. Such as

MediaPlayer1.Close;
MediaPlayer1.FileName := 'xxxxx';
MediaPlayer1.Open;
MediaPlayer1.Player;

igor
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, MySQL Query 4 143
How to call a form that is in a DLL  from an application? 13 73
Press three keys together and trigger a function 3 57
DBGrid or StringGrid ? 6 90
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question