Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support
sub PlaySoundWin7(SoundFile, NumRepeat)
If Action.IsComponentInstalled("NSPlay.NSPlayCtl.1") = False Then
MsgBox "Unable to find the media player component.", vbCritical, "Error"
Else
If Action.DoesComponentExist("MediaPlayer1") = false Then
AddComponent "NSPlay.NSPlayCtl.1", "MediaPlayer1"
End If
Component("MediaPlayer1").Object.FileName = SoundFile '(replace with your file)
Component("MediaPlayer1").Object.PlayCount = NumRepeat
Component("MediaPlayer1").Object.Play
End If
End Sub
Component("MediaPlayer1").Object.Stop
Sub PlaySound2(FileName, Channel, Repeat)
Action.LoadControl MediaPlayerObject(Channel)
MediaPlayerObject(Channel).FileName = FileName
If Repeat = True Then
MediaPlayerObject(Channel).PlayCount = 0
Else
MediaPlayerObject(Channel).PlayCount = 1
End If
MediaPlayerObject(Channel).Play
End Sub
Users browsing this forum: No registered users and 0 guests