-
1. Re: tI
kglad Nov 28, 2012 6:29 AM (in response to Ron Colmen)1.
var tIndex:Number = 1;
for(var i:Number=0;i<5;i++){
_root.mc1["tf_"+i].tabIndex=tIndex++;
}
for(i=0;i<2;i++){
_root.mc2["tf_"+i].tabIndex=tIndex++;
}
for(i=0;i<10;i++){
_root["tf_"+i].tabIndex=tIndex++;
}
2. what's the keydown listener supposed to do?
-
2. Re: tI
Ron Colmen Nov 28, 2012 7:02 AM (in response to kglad)Thank you Kglad.
2. an onRelease();
-
3. Re: tI
kglad Nov 28, 2012 8:07 AM (in response to Ron Colmen)you want a keydown event to trigger a some object's onRelease?
if yes, do different keys trigger different object's onRelease?
-
-
5. Re: tI
kglad Nov 28, 2012 8:43 AM (in response to Ron Colmen)is your question about keydown answered?
-
6. Re: tI
Ron Colmen Nov 28, 2012 9:32 AM (in response to kglad)like this?
keyListenerNew = new Object();
keyListenerNew.onKeyDown=function(){
if(Key.isDown(Key.LEFT)){
_root.submit_btn.onRelease();
}
}
Key.addListener(keyListenerNew);
-
7. Re: tI
Ron Colmen Nov 28, 2012 9:59 AM (in response to Ron Colmen)I tried what you suggested. But still the tabINdex order is moving incorrectely.
i.e. if the cursor is in _root.mc1.tf1, 2nd tab moves to _root.mc2.tf2 ?
1st in _root.mcvar tIndex:Number = 1;
for(var i:Number=0;i<5;i++){
_root.mc1["tf_"+i].tabIndex=tIndex++;
}
for(i=0;i<2;i++){
_root.mc2["tf_"+i].tabIndex=tIndex++;
}
-
8. Re: tI
kglad Nov 28, 2012 10:17 AM (in response to Ron Colmen)6> yes
7> check the names of your textfields. if they match, that code will work.
-
9. Re: tI
Ron Colmen Nov 28, 2012 8:26 PM (in response to kglad)var tIndex:Number = 0;
var tf1:Array =[_root.tt.a, _root.tt.b, _root.tt.c];
for(i=0;i<tf1.length;i++){
//tf1[i].tabIndex.tvas = i;
tf1[i].tabIndex=tIndex++;
trace (tIndex)
}
var tf2:Array =[_root.ttt.b, _root.ttt.a, _root.ttt.c];
for(i=0;i<tf2.length;i++){
//tf1[i].tabIndex.tvas = i;
tf2[i].tabIndex=tIndex++;
trace (tIndex)
}
I'm still unable to tab only inside _root.tt or only inside _root.ttt?
It index all text fields 1 - 6 and it tabbs in both movieclips. I want to tab only inside one mc at a time?
//what I'm expecting is to be able to do this;
_root.tt.a.tabIndex = 1
_root.tt.b.tabIndex = 2
_root.tt.c.tabIndex = 3
_root.ttt.b.tabIndex = 1
_root.ttt.a.tabIndex = 2
_root.ttt.c.tabIndex = 3
-
10. Re: tI
kglad Nov 28, 2012 10:08 PM (in response to Ron Colmen)you expect tabbing to ignore all the textfields in tt or in ttt?
-
11. Re: tI
Ron Colmen Nov 28, 2012 10:12 PM (in response to kglad)When a user is on typing inside tt - ttt tabIndex should be ignored
(when on ttt, tt tabIndex should be ignored)
-
12. Re: tI
kglad Nov 29, 2012 6:59 AM (in response to Ron Colmen)use:
for (i=0; i<tf1.length; i++) {
tf1[i].onChanged = changeF;
}
for (i=0; i<tf2.length; i++) {
tf2[i].onChanged = changeF;
}
function changeF(tf:TextField):Void{
if(memberOf(tf1,tf)){
for (i=0; i<tf1.length; i++) {
tf1[i].tabIndex = i;
}
for (i=0; i<tf2.length; i++) {
tf2[i].tabIndex = null;
}
} else {
for (i=0; i<tf2.length; i++) {
tf2[i].tabIndex = i;
}
for (i=0; i<tf1.length; i++) {
tf1[i].tabIndex = null;
}
}
}
function memberOf(a,e):Boolean{
for(var i:Number=0;i<a.length;i++){
if(a[i]==e){
return true;
}
}
return false;
}
-
-



