# Label\_txt disapearing after color change

**URL:** <https://forum.kirupa.com/t/label-txt-disapearing-after-color-change/260944>\
**Category:** flash\
**Created:** [May 21, 2008, 10:42am UTC](https://forum.kirupa.com/t/label-txt-disapearing-after-color-change/260944 "2008-05-21T10:42:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![theoneneo](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@theoneneo](https://forum.kirupa.com/u/theoneneo)\
**Post date:** [May 21, 2008, 10:42am UTC](https://forum.kirupa.com/t/label-txt-disapearing-after-color-change/260944/1 "2008-05-21T10:42:26Z")

</div>

Hello,

I am making an drop down menu that changes color when you click on an certain button (that is the frame) and that is done (with the code below) the only problem is that it overrides the label\_txt (an text box over the button) and I can’t create an new label.

I have this code:

```auto
    if (moviebkg_mc._currentframe == 1) {
        for (l=0;l<menuButtons.length;l++){
            var mainMenuColor:Color = new Color("menuButton"+l)
            mainMenuColor.setRGB(0x009999);}}
    if (moviebkg_mc._currentframe == 2) {
        for (l=0;l<menuButtons.length;l++){
            var mainMenuColor:Color = new Color("menuButton"+l)
            mainMenuColor.setRGB(0x006699);}}
    if (moviebkg_mc._currentframe == 3) {
        for (l=0;l<menuButtons.length;l++){
            this["menuButton"+l].label_txt.text = menuButtons[l];
            var mainMenuColor:Color = new Color("menuButton"+l)
            mainMenuColor.setRGB(0xCC3300);}}

```

anybody knows how to keep the current text and/or create an new text at the text box?

With kind regards,

theoneneo

---

<div class="post-metadata">

**Author:** ![theoneneo](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@theoneneo](https://forum.kirupa.com/u/theoneneo)\
**Post date:** [May 22, 2008, 7:40am UTC](https://forum.kirupa.com/t/label-txt-disapearing-after-color-change/260944/2 "2008-05-22T07:40:48Z")

</div>

Alright, I fixed it, I was calling the movieclip wrongly, so I created them in an empty movie clip and added the menu buttons to that one, so I could call it.

Greetz,  
theoneneo
