Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

tracing of input textField focus

Community Beginner ,
Jan 28, 2013 Jan 28, 2013

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

TOPICS
ActionScript
582
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 28, 2013 Jan 28, 2013

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.

Translate
Community Expert ,
Jan 28, 2013 Jan 28, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 29, 2013 Jan 29, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 29, 2013 Jan 29, 2013
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines