# Help refreshing library MovieClip Array based on input text

**URL:** <https://forum.kirupa.com/t/help-refreshing-library-movieclip-array-based-on-input-text/256692>\
**Category:** flash\
**Created:** [April 6, 2008, 2:22am UTC](https://forum.kirupa.com/t/help-refreshing-library-movieclip-array-based-on-input-text/256692 "2008-04-06T02:22:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![enginer9](https://avatars.discourse-cdn.com/v4/letter/e/5f9b8f/32.png) [@enginer9](https://forum.kirupa.com/u/enginer9)\
**Post date:** [April 6, 2008, 2:22am UTC](https://forum.kirupa.com/t/help-refreshing-library-movieclip-array-based-on-input-text/256692/1 "2008-04-06T02:22:13Z")

</div>

Hi!

I’ve built this fancy airport board application where you can write your sentance in the input field and by that change the board.  
You can see [here](http://www.adhesive-studio.com/dev/AirportBoard_Sentances.html) an example of what I have at the moment.

here’s the code I have:

```auto
//putting some starting text in the text field
input_txt.text = "Oceanic Flight 815";

//initializing variables
var holder_mc:Holder = new Holder();
var letter_mc:Letter = new Letter();
var sentance:String = new String(input_txt.text);
var arrayLetters:Array = sentance.split("");

//button CLICK listener and relative action
ok_btn.addEventListener(MouseEvent.CLICK, ok_btn_CLICK);
function ok_btn_CLICK(e:MouseEvent):void{
    BuildSentance();
}

//The action that builds the sentances based on the input text
function BuildSentance():void{
    
    for (var i:uint=0; i<arrayLetters.length; i++) {
        
        //removeChild(holder_mc); ???? --> Need to remove holder_mc when already exists in order to reload the new sentance.
        //Or somehow reload/refresh the sentance
        
        //Need to somehow apply a timer that sets an interval of 1 second between the lettering fallout.
        
        
        //Calls Holder from Library and adds it to the Stage (this will be the container for the sentance)
        var holder_mc:Holder = new Holder();
        this.addChild(holder_mc);
        holder_mc.x = 10;
        
        //breaking input text into letters
        sentance = input_txt.text;
        arrayLetters = sentance.split("");
        
        //Calls Letter from Library and adds it to holder_mc
        var letter_mc:Letter = new Letter();
        holder_mc.addChild(letter_mc);
        letter_mc.x = 17*i;
        letter_mc.y = (10);
        
        //Adds letters to letter_mc's
        letter_mc.numbers1.letra_txt.text = arrayLetters*;
        letter_mc.numbers2.letra_txt.text = arrayLetters*;
        letter_mc.numbers3.letra_txt.text = arrayLetters*;
    }
}
BuildSentance();

```

I’m having 2 problems:

1. on applying some sort of timer that throws the sentance letters one of a time to the board;
2. on updating the board, by removing the older sentance and throwing in the new one.

Can anybody help me on this?  
Thanks in advance.
