combining across and down for crossword
Hi
Need bit of help with combining across and down for crossword. The across is 3 text boxes, first of which is movieclip, actvated when clicked. As type, curser jumps to next box. Works great.
onClipEvent (enterFrame) {
var a1 = this.let1_ins.text;
var a2 = _root.let2_ins.text;
aListener = new Object();
aListener.onKeyUp = function() {
//if box got letter in it (not empty)
if (a1 !== "") {
//jump to next box
Selection.setFocus("_root.let2_ins");
}
if (a2 !== "") {
Selection.setFocus("_root.let3_ins");
//else, stay in this box
} else {
Selection.setFocus("this.let1_ins");
}
};
Key.addListener(aListener);
}
The down one is similar, but with 4 boxes. Again, works great.
onClipEvent (enterFrame) {
var d1 = this.d1let1_ins.text;
var d2 = _root.d1let2_ins.text;
var d3 = _root.d1let3_ins.text;
var d4 = _root.d1let4_ins.text;
dListener = new Object();
dListener.onKeyUp = function() {
if (d1 !== "") {
Selection.setFocus("_root.d1let2_ins");
}
if (d2 !== "") {
Selection.setFocus("_root.d1let3_ins");
}
if (d3 !== "") {
Selection.setFocus("_root.d1let4_ins");
} else {
selection.setFocus("this.d1let1_ins");
}
};
Key.addListener(dListener);
}
I'm having problems combining them, with the first down letter in the middle of across (forming a T-shape). When typing across, the letters jump across the down mc. When typing down, the 3rd letter across fills in. Can anyone help please?
Many thanks :).