Selection.setFocus problem in Flash 8

Hey all!
I’m glad I found this forum cuz I’m having a problem with this.

I’ve made an input text box (var: password) and put this code inside a seperate MC:

onClipEvent (enterFrame){Selection.setFocus("_root.password");
Selection.setSelection(length(password), length(password));
}

The problem is that after 9 letters or numbers have been typed in the input text box the “|” stops at the same spot in the text box and when trying to type another letter this get’s on the wrong side of the “|” and the more I write the more this gets pushed further to the right. Like this:

testingth|gnihtsi

Here I tried to write “testingthisthing”. As you can see after 9 letters it starts pushing the next thing I write to the right instead of leaving it behind and moving the “|”.

I hope someone could solve this, I’m not a very experienced programmer so don’t insult me or anything if this is very easy to solve.:slight_smile:

Thanks,
Dan