Text box problem

Hello
I have a script which creates a column of text input boxes three in number. The purpose is to capture a users date of birth, the top box would hold the users birthday e.g. 15 the next box the month e.g. 09 and the bottom box would hold the year e.g. 2010.

I decided I would like the cursor to jump to the next text box after the user has entered their birthday and again after they have entered their birth month, so I have part of the script that does this using the [COLOR=#993300]stage[/COLOR].[COLOR=#000000]focus[/COLOR] command.

The Problem:
As the cursor moves to the next text box the text just inputted repositions the text. e.g input 15 changes to 51 and 09 changes to 90.

I dont know enough about action script to see why its doing this and therefor dont know how to solve it.

Help is most appretiated.

[COLOR=#993300]var[/COLOR] current_year:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] current_month:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] current_day:[COLOR=#993300]Number[/COLOR];

[COLOR=#993300]var[/COLOR] client_year:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] client_month:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] client_day:[COLOR=#993300]Number[/COLOR];

[COLOR=#993300]var[/COLOR] input_year:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] input_month:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] input_day:[COLOR=#993300]Number[/COLOR];

[COLOR=#993300]var[/COLOR] temp_year:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] temp_month:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] temp_day:[COLOR=#993300]Number[/COLOR];

[COLOR=#993300]var[/COLOR] result_year:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] result_month:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] result_day:[COLOR=#993300]Number[/COLOR];

[COLOR=#993300]var[/COLOR] [COLOR=#993300]date[/COLOR]:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] minutes:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] days:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] hours:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] months:[COLOR=#993300]Number[/COLOR];
[COLOR=#993300]var[/COLOR] years:[COLOR=#993300]Number[/COLOR];

[COLOR=#993300]var[/COLOR] my_date:[COLOR=#993300]Date[/COLOR] = [COLOR=#993300]new[/COLOR] [COLOR=#993300]Date[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#993300]var[/COLOR] my_dateText = my_date;

minutes = [COLOR=#993300]Number[/COLOR]COLOR=#000000[/COLOR];
hours = [COLOR=#993300]Number[/COLOR]COLOR=#000000[/COLOR];
days = [COLOR=#993300]Number[/COLOR]COLOR=#000000[/COLOR];
months = [COLOR=#993300]Number[/COLOR]COLOR=#000000[/COLOR];
years = [COLOR=#993300]Number[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#993300]date[/COLOR] = [COLOR=#993300]Number[/COLOR]COLOR=#000000[/COLOR];

[COLOR=#993300]var[/COLOR] adjusted_days:[COLOR=#993300]Number[/COLOR] = days + [COLOR=#000000]1[/COLOR];
[COLOR=#993300]var[/COLOR] adjusted_months:[COLOR=#993300]Number[/COLOR] = months + [COLOR=#000000]1[/COLOR];

[COLOR=#993300]var[/COLOR] current_date_output:[COLOR=#993300]TextField[/COLOR]= [COLOR=#993300]new[/COLOR] [COLOR=#993300]TextField[/COLOR]COLOR=#000000[/COLOR];
current_date_output.[COLOR=#993300]width[/COLOR] = [COLOR=#000000]400[/COLOR];

[COLOR=#993300]var[/COLOR] myFormat:[COLOR=#993300]TextFormat[/COLOR] = [COLOR=#993300]new[/COLOR] [COLOR=#993300]TextFormat[/COLOR]COLOR=#000000[/COLOR];
myFormat.[COLOR=#993300]size[/COLOR] = [COLOR=#000000]15[/COLOR];
myFormat.[COLOR=#993300]align[/COLOR] = TextFormatAlign.[COLOR=#993300]LEFT[/COLOR];

[COLOR=#993300]var[/COLOR] InputDayTextField:[COLOR=#993300]TextField[/COLOR] = [COLOR=#993300]new[/COLOR] [COLOR=#993300]TextField[/COLOR]COLOR=#000000[/COLOR];
InputDayTextField.[COLOR=#000000]defaultTextFormat[/COLOR] = myFormat;
InputDayTextField.[COLOR=#993300]type[/COLOR] = TextFieldType.[COLOR=#000000]INPUT[/COLOR];
InputDayTextField.[COLOR=#993300]border[/COLOR] = [COLOR=#993300]true[/COLOR];
InputDayTextField.[COLOR=#000000]x[/COLOR] = [COLOR=#000000]10[/COLOR];
InputDayTextField.[COLOR=#000000]y[/COLOR] = [COLOR=#000000]100[/COLOR];
InputDayTextField.[COLOR=#993300]height[/COLOR] = [COLOR=#000000]20[/COLOR];

[COLOR=#f000f0]//InputDayTextField.autoSize = TextFieldAutoSize.LEFT;[/COLOR]
InputDayTextField.[COLOR=#993300]multiline[/COLOR] = [COLOR=#993300]true[/COLOR];
InputDayTextField.[COLOR=#993300]wordWrap[/COLOR] = [COLOR=#993300]true[/COLOR];
addChildCOLOR=#000000[/COLOR];

[COLOR=#993300]var[/COLOR] InputMonthTextField:[COLOR=#993300]TextField[/COLOR] = [COLOR=#993300]new[/COLOR] [COLOR=#993300]TextField[/COLOR]COLOR=#000000[/COLOR];
InputMonthTextField.[COLOR=#000000]defaultTextFormat[/COLOR] = myFormat;

InputMonthTextField.[COLOR=#993300]type[/COLOR] = TextFieldType.[COLOR=#000000]INPUT[/COLOR];
InputMonthTextField.[COLOR=#993300]border[/COLOR] = [COLOR=#993300]true[/COLOR];
InputMonthTextField.[COLOR=#000000]x[/COLOR] = [COLOR=#000000]10[/COLOR];
InputMonthTextField.[COLOR=#000000]y[/COLOR] = [COLOR=#000000]120[/COLOR];
InputMonthTextField.[COLOR=#993300]height[/COLOR] = [COLOR=#000000]20[/COLOR];

[COLOR=#f000f0]//InputMonthTextField.autoSize = TextFieldAutoSize.LEFT;[/COLOR]
[COLOR=#f000f0]//InputMonthTextField.multiline = false;[/COLOR]
[COLOR=#f000f0]//InputMonthTextField.wordWrap = false;[/COLOR]
addChildCOLOR=#000000[/COLOR];

[COLOR=#993300]var[/COLOR] InputYearTextField:[COLOR=#993300]TextField[/COLOR] = [COLOR=#993300]new[/COLOR] [COLOR=#993300]TextField[/COLOR]COLOR=#000000[/COLOR];
InputYearTextField.[COLOR=#000000]defaultTextFormat[/COLOR] = myFormat;
InputYearTextField.[COLOR=#993300]type[/COLOR] = TextFieldType.[COLOR=#000000]INPUT[/COLOR];
InputYearTextField.[COLOR=#993300]border[/COLOR] = [COLOR=#993300]true[/COLOR];
InputYearTextField.[COLOR=#000000]x[/COLOR] = [COLOR=#000000]10[/COLOR];
InputYearTextField.[COLOR=#000000]y[/COLOR] = [COLOR=#000000]140[/COLOR];
InputYearTextField.[COLOR=#993300]height[/COLOR] = [COLOR=#000000]20[/COLOR];
[COLOR=#f000f0]//InputYearTextField.autoSize = TextFieldAutoSize.RIGHT;[/COLOR]
[COLOR=#f000f0]//InputYearTextField.multiline = false;[/COLOR]
[COLOR=#f000f0]//InputYearTextField.wordWrap = false;[/COLOR]
addChildCOLOR=#000000[/COLOR];

[COLOR=#993300]stage[/COLOR].[COLOR=#000000]focus[/COLOR] = InputDayTextField;

[COLOR=#993300]var[/COLOR] DayTextCount:[COLOR=#993300]Number[/COLOR];
DayTextCount = [COLOR=#000000]0[/COLOR];
[COLOR=#993300]var[/COLOR] MonthTextCount:[COLOR=#993300]Number[/COLOR];
MonthTextCount = [COLOR=#000000]0[/COLOR];

InputDayTextField.[COLOR=#000000]addEventListener[/COLOR]COLOR=#000000[/COLOR];
InputMonthTextField.[COLOR=#000000]addEventListener[/COLOR]COLOR=#000000[/COLOR];
InputYearTextField.[COLOR=#000000]addEventListener[/COLOR]COLOR=#000000[/COLOR];

[COLOR=#993300]function[/COLOR] DayTextInCOLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]
DayTextCount ++ ;
[COLOR=#993300]trace[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#993300]trace[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#993300]if[/COLOR] [COLOR=#000000]([/COLOR]DayTextCount >= [COLOR=#000000]2[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]

client_day = [COLOR=#993300]Number[/COLOR]COLOR=#000000[/COLOR];
input_day = [COLOR=#993300]Number[/COLOR] COLOR=#000000[/COLOR];

[COLOR=#993300]trace[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#993300]stage[/COLOR].[COLOR=#000000]focus[/COLOR] = InputMonthTextField;
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]

[COLOR=#993300]function[/COLOR] MonthTextInCOLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]
MonthTextCount ++ ;
[COLOR=#993300]trace[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#993300]trace[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#993300]if[/COLOR] [COLOR=#000000]([/COLOR]MonthTextCount >= [COLOR=#000000]2[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#993300]stage[/COLOR].[COLOR=#000000]focus[/COLOR] = InputYearTextField;
[COLOR=#993300]trace[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]

[COLOR=#993300]function[/COLOR] YearTextInCOLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]

[COLOR=#993300]trace[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]