# Function getting messed up when under a mask

**URL:** <https://forum.kirupa.com/t/function-getting-messed-up-when-under-a-mask/212668>\
**Category:** Uncategorized\
**Created:** [January 12, 2007, 10:44pm UTC](https://forum.kirupa.com/t/function-getting-messed-up-when-under-a-mask/212668 "2007-01-12T22:44:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalewb](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dalewb/32/3029_2.png) [@dalewb](https://forum.kirupa.com/u/dalewb)\
**Post date:** [January 12, 2007, 10:44pm UTC](https://forum.kirupa.com/t/function-getting-messed-up-when-under-a-mask/212668/1 "2007-01-12T22:44:38Z")

</div>

Hello,

I have created a neat little function that produces several buttons and inserts labels into each one from an array. It works great until I try to stick the sucker under a mask. When I do that, the labels disappear. I need this mask, but I also need the labels - can’t have buttons without labels, now, right?

Here’s the code I am using:

```auto

var mcPosY:Array = new Array();
for(var i = 0; i < 14; i++){
    mcPosY* = i * 16;
}

btnLabels = ["Name", "Type", "Race/Class", "Professions", "Talent", "Faction", "Keywords",
             "Allowed", "Cost", "Rules", "Flavor", "Attack", "Health", "Card Number",
             "Rarity", "Artist/Set Name"];

for(var i = 0; i < btnLabels.length; i++){
    var myBtn = attachMovie("sambHolder", "gertrude"+i, i);
    this.myBtn.sambBtn.dyTxt.text = btnLabels*;
    myBtn._y = mcPosY*;    
    myBtn.onRollOver = function(){
        this.gotoAndStop(2);
    }
    myBtn.onRollOut = function(){
        this.gotoAndStop(1);
    }
}

```

Here’s a screenshot of the buttons the code generates
