Hi there all,
Using prototype.js I render a flash movie within a DIV dynamically and then I try to attach some events in order to maintain focus on main window cuz is responsible of event handling some keyboard events -ie.
- Event.observe(document,'keyup',function (e) {
-
// code here
-
});.
The problem is that when somebody clicks a button within the flash movie, the document and/or window event handlers for keypress or keyup do not work at all. To workaround that problem I did the following:
- Event.observe($('flashmovieid'),'focus',function () {
-
$('flashmovieid').blur();
-
});
With other browsers but Safari, this work fine, it seems that returns control to the document event handler and I can return to capture document key events... In Safari looks like it cancels somehow the document event bubbling. I manage to get mouse events to work and I tried to make the movie loose focus to capture again document key events but no luck at all...
Any help will be highly appreciated