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?