all groups > flash actionscript > january 2005 >
You're in the

flash actionscript

group:

Anyone know how to change focus?


Anyone know how to change focus? JoeMok
1/19/2005 9:35:04 PM
flash actionscript:
1.how to move the focus of cursor to _root.box13 when _root.box12 is full of
characters;
2.how to move the focus of cursor to _root.box22 when users press "down" arrow
in _root.box12;
without pressing tab.

p.s:where_root.box12,_root.box13,_root.box22 are TextFields
Re: Anyone know how to change focus? NSurveyor
1/19/2005 9:37:34 PM
Use the setFocus method:

Selection.setFocus(instanceName);


Re: Anyone know how to change focus? JoeMok
1/19/2005 9:59:31 PM
Re: Anyone know how to change focus? mandingo
1/19/2005 11:12:25 PM
It has been a while since I looked at this but try something along these lines:

box13.onSetFocus = function(oldFocus){
trace(oldFocus);
}

the onSetFocus method tracks the instance that had focus prior to the setFocus.

I hope that helps,
cheers

AddThis Social Bookmark Button