Author Topic: How to add a video view into jpct  (Read 2276 times)

Offline generalwang

  • byte
  • *
  • Posts: 5
    • View Profile
How to add a video view into jpct
« on: August 13, 2014, 04:22:28 am »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: How to add a video view into jpct
« Reply #1 on: August 13, 2014, 08:21:49 am »
Should the video run in the background or should it be used as a texture?

Offline generalwang

  • byte
  • *
  • Posts: 5
    • View Profile
Re: How to add a video view into jpct
« Reply #2 on: August 13, 2014, 09:03:38 am »
I want to use it as a texture. And what is the visual effects if video run in the background?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: How to add a video view into jpct
« Reply #3 on: August 13, 2014, 09:41:56 am »
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

Offline generalwang

  • byte
  • *
  • Posts: 5
    • View Profile
Re: How to add a video view into jpct
« Reply #4 on: August 13, 2014, 09:59:52 am »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: How to add a video view into jpct
« Reply #5 on: August 13, 2014, 10:15:14 am »
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.