Sie sind nicht angemeldet.

1

Donnerstag, 19. April 2012, 01:09

Videoplayer pause with spacebar

I have been trying to get the sparebar to toggle pause/play, and have not been successful. see the code below.

Maybe this is not even possible but i doubt it ;)

i think my error is in line 8- set(plugin[video].togglepause());
i have tried other iteration with no luck.
can plugin[video].togglepause() only be run as a onclick command?

thanks for the help!



<events onkeydown="checkkey();" />

<action name="checkkey">
trace('keycode=', keycode);
if(keycode == 32, action(pausebar);
</action>
<action name="pausebar">
set(plugin[video].togglepause());
</action>

2

Donnerstag, 19. April 2012, 15:23

Hi,

there is just a missing ')' here to close the if():

if(keycode == 32, action(pausebar) );

best regards,
Klaus

3

Samstag, 21. April 2012, 00:33

i get no pause or effect when pressing the space bar with this code..


<events onkeydown="checkkey();" />

<action name="checkkey">
trace('keycode=', keycode);
if(keycode == 32, action(pausebar));
</action>

<action name="pausebar">
set(plugin[video].togglepause());
</action>

any other ideas anyone?


Thanks for your help Klaus!

4

Samstag, 21. April 2012, 02:44

I got it to work when I changed

set(plugin[video].togglepause());

by removing the " set( " and last " ) " to leave just

plugin[video].togglepause();

Jeff *confused*

5

Samstag, 21. April 2012, 02:58

That did it! Thanks Jeff!