View Full Version : Enable TABing in texfieldS??
mindfriction
April 16th, 2003, 10:26 PM
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!!???
Jubba
April 16th, 2003, 10:34 PM
search the forums for tabIndex()
mindfriction
April 17th, 2003, 12:04 AM
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?
ahmed
April 17th, 2003, 12:05 AM
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 ;)
Jubba
April 17th, 2003, 12:28 AM
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...
ahmed
April 17th, 2003, 12:39 AM
oops.. ignore my post :sigh:
i'll leave it though, as it might be useful to other users :)
ahmed
April 17th, 2003, 12:42 AM
disable tabEnabled and use this code
onEnterFrame = function() {
if(Key.isDown(Key.TAB)) {
myVar +=" "
}
}
kind of buggy though :(
well not really buggy, but it highlights all the text (which i believe can be somehow fixed... )
mindfriction
April 17th, 2003, 01:54 AM
Thanks guys. Seems like a tab function is a good idea. Will give that a shot
Jubba
April 17th, 2003, 02:02 AM
good luck. let us know how ti works out.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.