Page 1 of 1

Keyboard input to activate separately from pages.

Posted: 07 Jul 2014, 06:21
by tyle_cells
Hi,

I have two pages in my scene, in each scene contains a video.
For both videos in the two different pages I used:
"Enter" = play
"Space" = pause

I realize that if I'm on either of the pages and I press "enter" it activates both video to play.
I'm using different "DirectInput Key Node" for both videos.

Is it possible to have both videos (which is on different pages) to use the same ""Enter" = play & "Space" = pause" keyboard input but is activate base on pages, so therefore using "Space" or "Enter" on page 1 will only play and stop the video on page 1 and not on page 2 and vise visa.

Thanks

Cheers,
Tyle_cells

Re: Keyboard input to activate separately from pages.

Posted: 07 Jul 2014, 10:18
by schub
Of course its possible, you can either pass the key presses through events and enable them only while the right page is active or deactivate the DirectInputKey itself.

Depending on how you switch between pages you might need an expression to convert this info to '0' and '1'

Greets,
Schub

Re: Keyboard input to activate separately from pages.

Posted: 07 Jul 2014, 15:12
by Karol
The DirectInput/Windows Key nodes have the 'AutoDeactivate' property. If it is set to true, the node will be automatically disabled if the Hierarchy Container, containing this Key node, is blocked:
http://www.ventuz.com/support/help/late ... WindowsKey

Re: Keyboard input to activate separately from pages.

Posted: 08 Jul 2014, 05:17
by tyle_cells
Hi,

Thanks a lot for the help.
I think it's working.

Cheers,
Tyle_cells