# Help with layers? i think

**URL:** <https://forum.kirupa.com/t/help-with-layers-i-think/319606>\
**Category:** Uncategorized\
**Created:** [February 26, 2011, 12:08am UTC](https://forum.kirupa.com/t/help-with-layers-i-think/319606 "2011-02-26T00:08:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![knome](https://avatars.discourse-cdn.com/v4/letter/k/85e7bf/32.png) [@knome](https://forum.kirupa.com/u/knome)\
**Post date:** [February 26, 2011, 12:08am UTC](https://forum.kirupa.com/t/help-with-layers-i-think/319606/1 "2011-02-26T00:08:07Z")

</div>

-this is supposed to make multiple buttons with text(not clickable yet)  
-it seems to coppy over, or remove the previous myButtons\* movieclip each time it goes through the loop.  
-there are 3 strings in buttonText.length  
-on the output i get 0,1,2  
-but on the screen I only see one gradient (its only a pink box, but one problem at a time)  
-the box appears where roughly the 3rd button should be.  
-full code attached  
-I am noob help! 🙂

var myButtons:Array = [buttonText.length];  
var g:Gradient = new Gradient();  
var t:GlowText = new GlowText();

for (var i:int=0;i\<buttonText.length;i++){  
trace(i);  
myButtons\* = new MovieClip();  
myButtons\*.x = menuXValue+(i_menuXSpacing);  
myButtons_.y = menuYValue+(i_menuYSpacing);  
myButtons_.addChild(g.returnGradient(fillType,colors,alphas,ratios,matrix));  
myButtons\*.addChild(t.returnGlowText(buttonText\*,myFormat1,myFormat2));  
addChild(myButtons\*);  
}
