Input text fields - Initial values problem

Hi, I have a search box with an intial text value “Search here…” inside the input box. When the user clicks inside the box “Search here…” will disappear. This is the code I use (thanks to claudios previous post):

searchBox.border = true;
searchBox.borderColor = 0x737373;

fields = [searchBox];//your textfields instance names
captions = ["Search..."];//default text for each textfield
for (var i in fields) {
    this.fields*.j = this.i;
    this.fields*.text = captions*;
    this.fields*.onSetFocus = function() {
        if (this.text == captions[this.j]) {
            this.text = "";
    this.fields*.onKillFocus = function() {
        if (!this.length) {
            this.text = captions[this.j];

It works great except when I click in the box the initial text disappears like it should but when you click outside the box again without entering any text the “Search here…” appears and they quickly disappears. Any ideas why it disappears quickly after?