Re: key pressed?
"Laurent Cocea" <[email protected]> Sun, 19 Oct 2003 10:33:44 -0700 (PDT)
| Newsgroups | gmane.comp.web.ming.general |
|---|---|
| Message-ID | <20031019103344.24533.h007.c009.wm@mail.canada.com.criticalpath.net> |
You mean that, although the window containing the ming applet has the focus (i.e., is active, as indicated by the titlebar color), the applet itself doesn't? -Laurent On Sun, 19 Oct 2003 08:38:19 -0700 (PDT), gaz b wrote: > > I think that is quite standard behaviour. > It is just the way that windows handles which > application has focus at any one time. > People sometimes use a "Start" button or similar to > force the user to click on the movie and give it > focus. > gazb > > --- Laurent Cocea <[email protected]> wrote: > > Hi all- > > > > I am using ming-dev and I added a key listener to > > may main timeline > > actionscript (see code below). Surprisingly, I need > > to click once in the > > browser window running the applet for the thing to > > work, even if the > > window is already active. Same thing if I click on > > another window, and > > then I get back to my ming applet window -- I need > > to click once inside > > the window to get the key lister working again. I > > would have expected > > this step to be unnecessary. Am I missing something? > > > > Any help will be greatly appreciated. > > > > -Laurent > > > > > > listenForKey = new Object(); > > listenForKey.onKeyDown = function() { > > if (key.getCode() == 33) { > > _root.myKey = 'PAGEUP'; > > } > > }; > > listenForKey.onKeyUp = function() { > > _root.myKey = ''; > > }; > > Key.addListener(listenForKey);";