Error: "type mismatch mediaplayer object"
Frame Properties code:
- Code: Select all
Action.CreateTimedEvent 5, "PlayVideo GetPath(5) & ""buzzard.avi"", 340, 0, 300, 200, False", False
Procedure:
- Code: Select all
Sub PlayVideo(FileName, Left, Top, Width, Height, Repeat)
'Full screen video: PlayVideo "c:\filename.avi", 0, 0, 640, 480, False
'If the video is located in your "Frames" folder, use the "GetPath(5)" command:
'To stop a video: StopVideo
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