[flexcoders] Re: Key Down event lost after add a child component

2008-02-16 Thread maunger
Like Dan said, you gotta get focus back!

you can do something like

stage.focus = this;

or 

stage.focus = Application.application.someobjectname;  // if you want to point 
to 
something specific that you've named.

--- In flexcoders@yahoogroups.com, "xmwang1982" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> I have an component base on Canvas. It allows adding new child 
> component via drag-drop. the problem is, every time after a new child 
> is added, its Key Down event is not triggerred anymore. The event will 
> be back after click on one of the children.
> 
> No code exists for the mouse events of children. So I think something 
> happen in background
> 
> Any idea? Thanks.
>





[flexcoders] Re: Key Down event lost after add a child component

2008-02-17 Thread xmwang1982
hi all, thank you guys so much... it works!

--- In flexcoders@yahoogroups.com, "maunger" <[EMAIL PROTECTED]> wrote:
>
> Like Dan said, you gotta get focus back!
> 
> you can do something like
> 
> stage.focus = this;
> 
> or 
> 
> stage.focus = Application.application.someobjectname;  // if you
want to point to 
> something specific that you've named.
> 
> --- In flexcoders@yahoogroups.com, "xmwang1982"  wrote:
> >
> > Hi,
> > 
> > I have an component base on Canvas. It allows adding new child 
> > component via drag-drop. the problem is, every time after a new child 
> > is added, its Key Down event is not triggerred anymore. The event
will 
> > be back after click on one of the children.
> > 
> > No code exists for the mouse events of children. So I think something 
> > happen in background
> > 
> > Any idea? Thanks.
> >
>