Solved

Change the File MediaPLayer is playing

Posted on 1998-10-08
1
149 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now