Scrollbar messing up focusOut in textfield

Hello everyone.

I have a simple textfield with the text “Enter Name”. On focusIn it removes the text and on focusOut it adds the text again(that is if you did not change it).

The problem occurs when I add a scrollbar from the scrollbar class. Then suddenly my focusOut stops working. I don’t know what’s causing this.

If I just comment this line:
//this.addChild(sb);

Then it works so I know that it has something to do with the scrollbar.

I post my code here, but also attach the fla file in a zip for download here:

http://www.actionscript.org/forums/attachment.php3?attachmentid=34049&d=1268839495

I appreciate the help I can get Thank you.

/Dudde


[COLOR=#993300]import[/COLOR] fl.[COLOR=#000000]controls[/COLOR].[COLOR=#000000]ScrollBar[/COLOR];
[COLOR=#993300]import[/COLOR] fl.[COLOR=#000000]events[/COLOR].[COLOR=#000000]ScrollEvent[/COLOR];
[COLOR=#993300]import[/COLOR] fl.[COLOR=#000000]controls[/COLOR].[COLOR=#000000]ScrollBarDirection[/COLOR];
[COLOR=#993300]var[/COLOR] nameSet:[COLOR=#993300]Boolean[/COLOR];

[COLOR=#993300]var[/COLOR] listname_txt:[COLOR=#993300]TextField[/COLOR] = [COLOR=#993300]new[/COLOR] [COLOR=#993300]TextField[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
listname_txt.[COLOR=#993300]border[/COLOR] = [COLOR=#993300]true[/COLOR];
listname_txt.[COLOR=#993300]borderColor[/COLOR] = 0x000000;
listname_txt.[COLOR=#993300]background[/COLOR] = [COLOR=#993300]true[/COLOR];
listname_txt.[COLOR=#993300]backgroundColor[/COLOR] = 0xFFFFFF;
listname_txt.[COLOR=#993300]type[/COLOR] = TextFieldType.[COLOR=#000000]INPUT[/COLOR];
listname_txt.[COLOR=#000000]x[/COLOR] = [COLOR=#000000]5[/COLOR];
listname_txt.[COLOR=#000000]y[/COLOR] = [COLOR=#000000]5[/COLOR];
listname_txt.[COLOR=#993300]width[/COLOR] = [COLOR=#000000]250[/COLOR];
listname_txt.[COLOR=#993300]height[/COLOR] = [COLOR=#000000]19[/COLOR];
listname_txt.[COLOR=#993300]text[/COLOR] = [COLOR=#0000ff]"Enter Name"[/COLOR];
addChild[COLOR=#000000]([/COLOR]listname_txt[COLOR=#000000])[/COLOR];

listname_txt.[COLOR=#000000]addEventListener[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]"focusIn"[/COLOR], listname[COLOR=#000000])[/COLOR];
[COLOR=#993300]function[/COLOR] listname[COLOR=#000000]([/COLOR]event:Event[COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#993300]if[/COLOR][COLOR=#000000]([/COLOR]nameSet==[COLOR=#993300]false[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
        listname_txt.[COLOR=#993300]replaceText[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]0[/COLOR],listname_txt.[COLOR=#993300]length[/COLOR],[COLOR=#0000ff]""[/COLOR][COLOR=#000000])[/COLOR];
    [COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]

listname_txt.[COLOR=#000000]addEventListener[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]"focusOut"[/COLOR], listname2[COLOR=#000000])[/COLOR];
[COLOR=#993300]function[/COLOR] listname2[COLOR=#000000]([/COLOR]event:Event[COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#993300]if[/COLOR][COLOR=#000000]([/COLOR]listname_txt.[COLOR=#000000]length[/COLOR]>[COLOR=#000000]0[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
        nameSet=[COLOR=#993300]true[/COLOR];
        
    [COLOR=#000000]}[/COLOR][COLOR=#993300]else[/COLOR] [COLOR=#000000]{[/COLOR]
        listname_txt.[COLOR=#000000]appendText[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]"Enter Name"[/COLOR][COLOR=#000000])[/COLOR]; 
        nameSet=[COLOR=#993300]false[/COLOR];
     [COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]