I do not know how to fire events in the whole browser. But you can activate individual elements on your page.
<body>
<script>
leftArrowKey = 37
upArrowKey = 38
rightArrowKey = 39
downArrowKey = 40
e = jQuery.Event("keydown");
e.which = leftArrowKey;
$("myInput").trigger(e);
</script>
<object allowScriptAccess="always" id="myInput" ... >
...
</object>
</body>
To send this event to a flash animation, add allowScriptAccess = "always" to the Object tag that you are using.
source
share