OnVideoEnd

Report any Hollywood bugs here
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

OnVideoEnd

Post by djrikki »

Cannot seem to get this to work, I implement it in the same way I would do with CloseWindow, but the function is never called.

Code: Select all

Function filemanager:CloseVideo()
        DebugPrint("Hey why isn't this function being called automatically when the video ends!")
	CloseVideo(1)
	videosize = 2
	tunevolume = 100
	CtrlCQuit(True)
	base:CloseDisplay(#VIDEOWINDOW)
	ShowPointer()
	Calendar:SwitchBack()
EndFunction

Function filemanager_CloseVideo() filemanager:CloseVideo() EndFunction

Global filemanager
filemanager = {}
; Just wrote this to be prove I am declaring object functions correctly...  ESCape key via OnKeyDown and Close gadget via filemanager_CloseVideo both
; work, but OnVideoEnd won't even call the function.

InstallEventHandler({OnVideoEnd = filemanager_CloseVideo, CloseWindow = filemanager_CloseVideo, OnKeyDown = Keyboard_Video, OnMouseMove = Toolbar_Video})
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: OnVideoEnd

Post by airsoftsoftwair »

The bug must be in your code, not in Hollywood. Are you using a WaitEvent() loop? The following works fine here:

Code: Select all

OpenVideo(1, ...)
InstallEventHandler({OnVideoEnd = Function(msg) DebugPrint("End") EndFunction})
PlayVideo(1)
Repeat
  WaitEvent
Forever
Post Reply