How to add a video view into jpct

Started by generalwang, August 13, 2014, 04:22:28 AM

Previous topic - Next topic

generalwang

Hello everyone~~~
I want build a 3D scene, there is a movie screen in this scene. Users can control their characters moving in the scene, and they can watch a movie on the screen. I want to know how to a video view in jpct, and how to play the video in the view. Dose someone have a demo about this question?

EgonOlsen

Should the video run in the background or should it be used as a texture?

generalwang

I want to use it as a texture. And what is the visual effects if video run in the background?

EgonOlsen

There's no built-in support for this, but the means to do it are all there. You might want to look at this thread and/or ask raft directly about it: http://www.jpct.net/forum2/index.php/topic,3794.0.html

generalwang

Thanks so much. I have another question, is there are buttons and click events in jpct. I use textures realize buttons, but I only find the onTouch method, how can i realize the click event?

EgonOlsen

jPCT-AE is a 3d engine. It doesn't provide nor deals with any gui components or touch/click events. You can add an OnTouchListener and get various motion events for finger up/down/drag in the onTouch() implementation. But as said, this is out of the scope of the engine, you can use the standard Android ways to deal with these events.