Solved

key focus in AS3

Posted on 2010-11-26
8
619 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

752 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