# As syntax

**URL:** <https://forum.kirupa.com/t/as-syntax/200955>\
**Category:** Uncategorized\
**Created:** [September 17, 2006, 2:30am UTC](https://forum.kirupa.com/t/as-syntax/200955 "2006-09-17T02:30:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pensamente](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pensamente/32/1208_2.png) [@pensamente](https://forum.kirupa.com/u/pensamente)\
**Post date:** [September 17, 2006, 2:30am UTC](https://forum.kirupa.com/t/as-syntax/200955/1 "2006-09-17T02:30:07Z")

</div>

hi,

i can’t find a way to write this right, can someone give me a clue

the thing is,  
have 16 mcs on stage (menuB1, menuB2, menuB3,…)  
each one have a:  
textField (instance name: menuTag)  
movieClip (instance name: menu\_btn)

after naming the menuTag (ex: menuB1.menuTag.text = “textSample”)  
and set the textField to autoSize to true  
need to ajust the “menu\_btn” \_width to be the same as “menuTag” \_width

just used a for cycle for the autoSize and it works fine but i can’t find a way to do the same for the \_width

the code goes like so:

[AS]menuB1.menuTag.text = “sampleText”;  
menuB2.menuTag.text = “sampleText”;  
menuB3.menuTag.text = “sampleText”;  
menuB4.menuTag.text = “sampleText”;  
menuB5.menuTag.text = “sampleText”;  
menuB6.menuTag.text = “sampleText”;  
menuB7.menuTag.text = “sampleText”;  
menuB8.menuTag.text = “sampleText”;  
menuB9.menuTag.text = “sampleText”;  
menuB10.menuTag.text = “sampleText”;  
menuB11.menuTag.text = “sampleText”;  
menuB12.menuTag.text = “sampleText”;  
menuB13.menuTag.text = “sampleText”;  
menuB14.menuTag.text = “sampleText”;  
menuB15.menuTag.text = “sampleText”;  
menuB16.menuTag.text = “sampleText”;  
//  
//  
for (i=1; i\<=16; i++) {  
tellTarget (“menuB”+i+".menuTag") {  
autoSize = true;  
}  
// this is the problematic AS :s  
tellTarget (“menuB”+i+".menu\_btn") {  
\_width = menuB\*.\_width;  
}  
}[/AS]

:-/

help?
