Copy link to clipboard
Copied
Hello,
I was lookig for this topic but nowhere was clear explanation. Is there a way to trace for focus on text input by some really easy way and not over the listener?
Thanks
Wz
i'm not sure what you're trying to do but textfield's have onSetFocus() and onKillFocus() methods that allow you to detect what text, if any, is selected and the text property of the textfield.
Copy link to clipboard
Copied
i'm not sure what you're trying to do but textfield's have onSetFocus() and onKillFocus() methods that allow you to detect what text, if any, is selected and the text property of the textfield.
Copy link to clipboard
Copied
Yes it seems that onSetFocus() and onKillFocus() will be my answer. I want achieve that I have some of texts and under each texts is background which should highlight according which text is focused.
My first idea make it by something like :
if (tfText1._focus == 1)
{
MovieClip.gotoAndPlay("on");
}
But onSetFocus() and onKillFocus() is even better for my purphose to I dont need to have a lot of "if's" : )
Thanks
Copy link to clipboard
Copied
you can control the background of a textfield but you can't control the background of individual characters populating a textfield.
there are ways to work around that but none of them are convenient. for example, you can distribute each character to its own textfield, assign backgrounds to the various textfields and position the textfields so it appears to be text in one textfield.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now