Game Development Community

Help]About the control of GuiTheoraCtrl.

by Winsoft · in Torque Game Engine · 12/30/2006 (9:16 am) · 2 replies

Hi, I placed a GuiTheoraCtrl in the gui.And it could play video normally.But how can I loop the play of video?And when the video playback come to an end,Is there any signature I could capture?Just something like the following:

function MyVideoCtrl::onEnd(%this)
{
}

#1
12/30/2006 (11:42 am)
I suggest reading guiTheoraCtrl.cc - you can see all script call backs, and even add your own if you like.
#2
01/03/2007 (8:22 am)
Thank Ben!
At present, I am not very familiar with code.I know there is a script function named getCurrentTime,which could provide the time elapses since the video begins to play.And I want such a script function,which could provide the total play time of the video file.In this way,I could determine when the video come to an end.
Could you provide some suggestions about how to make that function?Thanks!