|  | Selection.setFocus listener |  | |
| | | GerryIsHere |  |
| Posted: Mon Jul 07, 2008 12:55 pm Post subject: Selection.setFocus listener |  |
Hi there!
How do I write a listener which can trigger the opening of a MovieClip ( myMc.gotoAndStop(2) ) when Tab Selection occurs on a given TextField ?
Many thanks in advance for your help!
Regards, Gerry |
| |
| | | kglad |  |
| Posted: Mon Jul 07, 2008 7:42 pm Post subject: Re: Selection.setFocus listener |  |
| use the onSetFocus() method of textfields. |
| |
| | | GerryIsHere |  |
| Posted: Tue Jul 08, 2008 11:10 am Post subject: Re: Selection.setFocus listener |  |
Hi kglad !
I did it this way (see attached code). But got no result...
var listenerQFocus:Object = new Object(); listenerQFocus.onSetFocus = function(questionInputFld:TextField) { questionfocus = Selection.setFocus(questionInputFld); if (questionfocus == true) { ADVICEMC._visible = true; } else { ADVICEMC._visible = false; } }; Selection.addListener(listenerQFocus); |
| |
| | | kglad |  |
| Posted: Tue Jul 08, 2008 2:28 pm Post subject: Re: Selection.setFocus listener |  |
as you know, that's not going to work. with that code you're attempting to set the focus to questionInputFld.
use:
questionInputFld.onSetFocus=function(of){ ADVICEMC._visible = true; } |
| |
| | | GerryIsHere |  |
| Posted: Tue Jul 08, 2008 2:47 pm Post subject: Re: Selection.setFocus listener |  |
| Yes kglad, I understand but this isn't a listener... |
| |
| | | kglad |  |
| Posted: Tue Jul 08, 2008 3:47 pm Post subject: Re: Selection.setFocus listener |  |
| |
| | | GerryIsHere |  |
| Posted: Tue Jul 08, 2008 6:07 pm Post subject: Re: Selection.setFocus listener |  |
| |
| | | kglad |  |
| Posted: Tue Jul 08, 2008 6:17 pm Post subject: Re: Selection.setFocus listener |  |
| |
|
|