Converting GuiTheoraCtrl to a scene object.
by Tony A · in Torque Game Builder · 07/21/2008 (4:19 pm) · 5 replies
Hi all,
ok here is crazy idea. I need to be able to play a Theora video as a scene object and not as a GUI control. Do you see it possible to create a new Theora class that inherits t2dSceneObject. The reason I want to do this is because I want to be able to set the layer for the movie just like a scene object. I don't think that's possible for Gui controls or am I missing something?
Thanks!!
ok here is crazy idea. I need to be able to play a Theora video as a scene object and not as a GUI control. Do you see it possible to create a new Theora class that inherits t2dSceneObject. The reason I want to do this is because I want to be able to set the layer for the movie just like a scene object. I don't think that's possible for Gui controls or am I missing something?
Thanks!!
#2
07/21/2008 (5:02 pm)
You could just use t2dSceneObject.attachGui( myTheoraControl ) to place the movie in the scene..unless you wanted to do t2dSceneObject methods on it directly. If you're willing to dig deep into the code it should be possible to write a new class based on the theora control code. Also, gui containers are simsets iirc, so you should be able to script a push/pop workaround to resort the contents (as gui layers are just set by order in the file/top container)?
#3
I looked at other objects that inherit t2dSceneObject. The code is just too hard to decode. at least for me :)
07/21/2008 (5:09 pm)
Ok, so far I have been able to get the new t2dTheora class working. I was able to create a new t2dTheora object in script, set the layer and play a movie partially behind a static sprite. The position is hardcoded for now. There seems some incompatibility between coordinates used for Gui controls and those used for scene objects. I need to get the object position and feed it to dglDrawBitmapStretch(mTheoraTexture, rect); Any idea? I looked at other objects that inherit t2dSceneObject. The code is just too hard to decode. at least for me :)
#4
07/21/2008 (5:13 pm)
Drew, I am aware of "attachGui" but what I really need is to be able to place the movie in a layer together with other scene objects. So basically, I want to be able to display something in front of the movie. I wasn't able to figure out a way to do it without converting the GuiTheoraCtrl to be a child of scene object.
#5
10/04/2010 (10:24 pm)
How did you manage to get the movie to play behind other static sprites?
Associate James Ford
Sickhead Games