Solved

key focus in AS3

Posted on 2010-11-26
8
622 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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
In addition to being a great web-based presentation tool, Prezi also makes it easy to save your presentation as a PDF to share with others as well. Learn how in this tutorial. Select the share icon from the top menu in your Prezi editor: Select "D…

617 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