Skip to main content
atar11
Known Participant
October 25, 2011
Answered

Tab index at TLF text.

  • October 25, 2011
  • 1 reply
  • 1462 views

Hi there!!!

I created some classic text boxes and assign to each of them a tab index using the syntax: "fNameInput.tabIndex = 0; fNameInput.tabIndex = 1; fNameInput.tabIndex = 2;" etc.

afterwards, I decided to turn them into TLF boxes but after I did so, the tab index feature stopped to work.

What's wrong in my code and what should I do in order to turn on the tab index attribute?

Thanks in advance!!

atar.

This topic has been closed for replies.
Correct answer Kenneth Kawamoto

Try

(input1.getChildAt(1) as InteractiveObject).tabIndex = 0;

--

Kenneth Kawamoto

http://www.materiaprima.co.uk/

1 reply

Kenneth Kawamoto
Community Expert
Kenneth KawamotoCommunity ExpertCorrect answer
Community Expert
October 26, 2011

Try

(input1.getChildAt(1) as InteractiveObject).tabIndex = 0;

--

Kenneth Kawamoto

http://www.materiaprima.co.uk/

atar11
atar11Author
Known Participant
October 26, 2011

Thanks you very much about your helpful advise. I tried it and this works fine.

But can you explain me please how does this code work? why does my code didn't work only on classic text and how does your code work.

Thanks in advance!!

atar.

Kenneth Kawamoto
Community Expert
Community Expert
October 27, 2011

In short, this is a bug in TLFTextField that Adobe should fix. TLFTextField inherits InteractiveObject and therefore TabIndex should be implemented.

TLFTextField consists of two children, Shape and Sprite. The code above is targeting this Sprite direct - it's just a "workaround"

--

Kenneth Kawamoto

http://www.materiaprima.co.uk/