At any given moment:
  stage.focus = stage;

or

  stage.focus = yourInputField;

HTH

-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kerry
Thompson
Sent: zaterdag 29 mei 2010 20:06
To: Flash Coders List
Subject: Re: [Flashcoders] Regain stage focus

Karina Steffens wrote:

> You mean rains, right? :P

Darn! My e-mail program drops keystrokes. Don't know why--I'm using
the GMail Web interface. I just type too fast.


> So, there's no way to regain (or at least to rain...) focus without
clicking
> at all? Not even by using a mouseover event or a timer inside flash?

No, not as far as I know. You can set the focus on an input field, of
course, but that won't take effect until the user gives your .swf
focus. You understand the security issues, so I won't belabor them.

I've run into the same problem. I'm writing a math game where the
user's response time is important. If they have to click on the
browser window before typing the answer, that skews the results. We
got around it by having the user log in, so the browser window should
have focus when the problem is presented. If the user switches to
another program--say, during the intoduction--we have no way of
getting focus back until the user clicks on the browser. I'm working
with a couple of the best in the business--Mark Jonkman and Raman
Pfaf--and they both tell me the same.

> And more rain on my parade: After uploading the flash movie to the server,
> some of the links in the dropdown menu have stopped working - clicking on
> the doesn't do anything, while others seem to be ok. And it's arbitrary
per
> click... And this appears to be cross browser, while locally it's fine.
Any
> ideas what I should be looking for here?

Not much. I assume you've checked the usual culprits--the URL is
formed correctly, your .swf isn't busy in a loop, no security issues
involved, etc. I'd use the debug Flash player and FlashDevelop to
trace out what happens when the button is clicked.

Cordially,

Kerry Thompson
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com 
Versie: 9.0.819 / Virusdatabase: 271.1.1/2904 - datum van uitgifte: 05/29/10
20:25:00

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to