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>

  • 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!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!