key focus in AS3

i've just noticed something odd and I was wondering if someone knows why this is.

scenario, basic game - document class.
object 1 - has keypress to move it around
object 2 - start btn.

add both objects to stage.
click object 2 - remove it and listener... object 1's keypress doesn't kick in until you click the swf (in browser)

it sort of makes sense to me but I'm hoping someone has a more decisive explanation why this is.
LVL 39
blue-genieAsked:
Who is Participating?
 
IceColdasConnect With a Mentor Commented:
hmm, strange. Doesn't happen to me. I attached a small test pack which works just fine in 3 different browsers. test.zip
0
 
Isu_the_MuleCommented:
some code, maybe?
0
 
blue-genieAuthor Commented:
Isu it's not a code problem per say, more of a logic thing.

If i get a change today i'll put together a quick mock up.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
blue-genieAuthor Commented:
hmm icecoldas indeed your one doesn't seem to do it - haven't had a chance to analyse yet but before this autoprocess close kicks in - i'm going to accept your solution - thanks for making the effort.

it might have something to do with waiting for an added to stage event which I didn't do.
tx.
0
 
blue-genieAuthor Commented:
sorry mods. coldasice responded after my request.

0
 
blue-genieAuthor Commented:
coldasice, i've tried changing your code to "break" it to do what mine was doing, and I can't.
very odd indeed.
I'll do a compare when i get to the office tomorrow but thanks so far.
going to close this before i forget.
tx.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.