Topic: mp3

Доброго времени суток!!!
использую этот скрипт...

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    MediaPlayer.PlayFile('mp3 файл');
end;

Выдаёт ошибку.... в чем подвох???

Post's attachments

Attachment icon Скриншот 22-06-2016 040011.png 12.23 kb, 328 downloads since 2016-06-21 

Re: mp3

Hello Роман

In a project I made about birds, I have two elements : picture of the bird and song of this bird.
When I click on the picture, I can hear it singing. (The song file is mp3 format).
So to achieve this, I use this script :

procedure Affichage_Image5_OnClick (Sender: string);  //Bouton Lecture du Player
var  s: string;
begin
     s := SQLExecute('SELECT chant_filename from oiseaux WHERE id=' + IntToStr(Affichage.Grille.dbItemID) );
     s := ExtractFileDir(Application.ExeName) + s;
     if FileExists(s) then MediaPlayer.PlayFile(s);
end;

It works fine.
Here, chant_filename is the field for the song (mp3) and oiseaux is name of the table.
This can perhaps help you.

JB

Re: mp3

Приветствую многоуважаемый  Жан.brezhonek!!!
Вы мне действительно помогли!!!
С Уважением и Благодарностью Роман!!!

Re: mp3

Hello Роман

Очень рад, что я мог бы вам помочь !

This is the first time I write in Russian (with the help of Google Translation).
I hope I did not write nonsense (if so, forgive me)

JB