Hi,

I hope this is the correct group to post this question to.
I need to programmatically (using javascript or something else) give
focus to a Flash movie. I figured this can be done by doing:

window.document.embeds[0].focus()

or

window.document.embeds[0].click()

But neither of these methods exist. Also, I tried creating my own
event like:

HTMLElement.prototype.focus = function () {
   var e = this.ownerDocument.createEvent("Events");
   e.initEvent("focus", false, true);
   this.dispatchEvent(e);
};

This doesn't work either. This code allows me to add an "onfocus"
handler to the EMBED tag but I can't actually do anything from within
the handler to redirect key strokes to the Flash movie.

Is there any other alternative that I'm not taking advantage of? Will
Mozilla ever support this capability in the future?

-Vlad

Reply via email to