Solved

key focus in AS3

Posted on 2010-11-26
8
604 Views
Last Modified: 2013-11-11
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.
0
Comment
Question by:blue-genie
  • 4
8 Comments
 
LVL 1

Expert Comment

by:Isu_the_Mule
ID: 34219963
some code, maybe?
0
 
LVL 39

Author Comment

by:blue-genie
ID: 34221508
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
 
LVL 3

Accepted Solution

by:
IceColdas earned 500 total points
ID: 34281671
hmm, strange. Doesn't happen to me. I attached a small test pack which works just fine in 3 different browsers. test.zip
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 39

Author Comment

by:blue-genie
ID: 34284923
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
 
LVL 39

Author Comment

by:blue-genie
ID: 34285271
sorry mods. coldasice responded after my request.

0
 
LVL 39

Author Closing Comment

by:blue-genie
ID: 34285301
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

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Learn the basics of inputting and editing your text components in Prezi. We will cover how to set styles, position, and group your text components. In your Prezi editor, click anywhere on the canvas to add text: A flashing cursor informs you that yo…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now