Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support
PlayVideoWin7 GetPath(2) & "HickchickGames_Intro.mp4", 1,9
'The following plays the video for 20 seconds. Stops the video. Quits the game.
Action.CreateTimedEvent 20, "StopVideoWin7(9):Action.Quit", False
Sub PlayVideoWin7(VideoFile, NumRepeat, ChannelNumber)
If ChannelNumber < 9 Then
'With VBScript it is currently not possible to interact with the 8 first video channels.
MsgBox "The specified video channel is invalid.", vbCritical, "Error"
Exit Sub
End If
If Action.IsComponentInstalled("NSPlay.NSPlayCtl.1") = False Then
MsgBox "Unable to find the media player component.", vbCritical, "Error"
Else
If Action.DoesComponentExist("MediaPlayer" + CStr(ChannelNumber)) = false Then
AddComponent "NSPlay.NSPlayCtl.1", "MediaPlayer" + CStr(ChannelNumber)
End If
Component("MediaPlayer" + CStr(ChannelNumber)).Object.FileName = VideoFile
Component("MediaPlayer" + CStr(ChannelNumber)).Object.PlayCount = NumRepeat
Component("MediaPlayer" + CStr(ChannelNumber)).Object.Play
End If
End Sub
Sub StopVideoWin7(ChannelNumber)
If ChannelNumber < 9 Then
'With VBScript it is currently not possible to interact with the 8 first video channels.
MsgBox "The specified audio channel is invalid.", vbCritical, "Error"
Exit Sub
End If
If Action.DoesComponentExist("MediaPlayer" + CStr(ChannelNumber)) = true Then
Component("MediaPlayer" + CStr(ChannelNumber)).Object.Stop
End If
End Sub
Return to Adventure Maker Technical Support and Bug Reports
Users browsing this forum: No registered users and 0 guests