Is there a way to play a video with scripting and then when the video is finished to do call another script?
I have looked around and tried but I don't have found where to put a code to do this.
Hope you can help!

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support
Sub PlayVideo(FileName, Left, Top, Width, Height, Repeat)
Action.LoadControl MediaPlayerObject(1)
MediaPlayerObject(1).Move Left*ScreenObject.TwipsPerPixelX, Top*ScreenObject.TwipsPerPixelX, Width*ScreenObject.TwipsPerPixelY, Height*ScreenObject.TwipsPerPixelY
MediaPlayerObject(1).FileName = FileName
If Repeat = True Then
MediaPlayerObject(1).PlayCount = 0
Else
MediaPlayerObject(1).PlayCount = 1
End If
MediaPlayerObject(1).Visible = True
MediaPlayerObject(1).Play
End Sub
Sub StopVideo()
MediaPlayerObject(1).Visible = False
MediaPlayerObject(1).Stop
MediaPlayerObject(1).FileName = ""
Action.UnloadControl MediaPlayerObject(1)
End Sub
PlayVideo GetPath(2) + "filename.avi", 0, 0, 640, 480, False
StopVideo
PlayVideo GetPath(2) + "Balloon.avi", 0, 0, 640, 480, False
Action.CreateTimedEvent 2,"StopVideo"
Action.CreateTimedEvent 2, "Action.Message ""Video finished"""
Return to Adventure Maker Technical Support and Bug Reports
Users browsing this forum: No registered users and 0 guests