Enable TABing in texfieldS?

Hi guys,

I have created a input textfield via createTextField(). I want to have it so that the user can actaully ‘tab’ when their typing in the textfield, but all pressing tab does, is select other elemts in the animation.

Any solution!!???

search the forums for tabIndex()

i did already look in the forums Jubba .
tabIndex is referreing to the tabbing selection between objects in the movie, what I am talking about is the tab within the very textfiled. Like when your in a text editor and you tab to indent to write code.

Do you know how I can do this?

myTextfield1.tabEnabled = true
myTextfield1.tabIndex = 1

myTextfield2.tabEnabled = true
myTextfield2.tabIndex = 2

myTextfield3.tabEnabled = true
myTextfield3.tabIndex = 3

myTextfield4.tabEnabled = true
myTextfield4.tabIndex = 4

this should do it… im not sure if you’ll need myTextfield4.tabEnabled = true… i think its set as true by default

****** edit

**TextField.tabEnabled

Availability

Flash Player 6.

Usage

TextField.tabEnabled

Description

Property; may be set on an instance of the MovieClip, Button, or TextField objects. It is undefined by default.

If the tabEnabled property is undefined or has a value of true, then the object is included in automatic tab ordering, and the object is included in custom tab ordering if the tabIndex property is also set to a value. If tabEnabled is false, then the object is not included in automatic tab ordering. For a movie clip, if tabEnabled is false, the movie clip’s children may still be included in automatic tab ordering, unless the tabChildren property is also set to false.

If tabEnabled is undefined or true, then the object is included in custom tab ordering if the tabIndex property is set. If tabEnabled is false, then the object is not included in custom tab ordering, even if the tabIndex property is set. If tabEnabled is set to false in a movie clip, the movie clip’s children can still be included in custom tab ordering.

**

i think youre fine without them :wink:

ok i understand what you mean, and no you can’t do that. well you could make a function that when the tab button is pressed your textfield adds 4 or 5 spaces to the dynamic textbox…

oops… ignore my post :sigh:
i’ll leave it though, as it might be useful to other users :slight_smile:

disable tabEnabled and use this code

onEnterFrame = function() {
	if(Key.isDown(Key.TAB)) {
		myVar +="    "
	}
}

kind of buggy though :frowning:
well not really buggy, but it highlights all the text (which i believe can be somehow fixed… )

Thanks guys. Seems like a tab function is a good idea. Will give that a shot

good luck. let us know how ti works out.