在大富翁上找了一下,大致是这样,先设notify:=true;再在OnNotify里加入下面(Mp1.NotifyValue = nvSuccessful) and (Mp1.Mode =mpStopped) 来判断,但我的还不行,不知是不是写错了,大家帮忙看一下,或者提供一种其它的方法,先行谢谢:
经跟踪:Mp1.Mode正常播放完时还是mpPlaying,只有执行Mp1.Stop时,Mp1.Mode才会得到mpStopped;以下是我的代码://Mp1=MediaPlay1  ,  PubIds: 已播放次数  , PriPlayTimes:总播放次数  PubIds,PriPlayTimes均为公共整型
procedure TForm1.Btn_PlayClick(Sender: TObject);
begin
  Mp1.notify:=true;
  Mp1.FileName:=(.....);
  Mp1.open;
  Mp1.Play;
  PubIds:=1;
  PriPlayTimes:=5;
end;
//------------------------------
procedure TForm1.Mp1Notify(Sender: TObject);
begin
 if (Mp1.NotifyValue = nvSuccessful) and (Mp1.Mode =mpStopped) then
  begin 
    if (PubIds<PriPlayTimes) then
    begin
      Mp1.open;
      Mp1.Play;
      inc(PubIds);
    end;
  end;  
end;