Ok, got a problem that’s driving me up the wall.
I have 3 objects: tab, tabShadow, (both movieClips) and menuText (a dynamic text field), all of which are themselves contained in a movieClip. What I’m trying to do is have tab & tabShadow resize based on how big the dynamic text field (menuText) is, and then align everything. The ultimate idea is to create a dynamic menu based on XML.
The problem though is that a) the textfield won’t resize even if the amount of text fed it is too big, and b) because of (a), the movieClips won’t resize based on the textfield. I also can’t figure out a good way to align them (just making the ._x / ._y values equal puts the textfield way outside the other movieClips).
Here’s the actionscript code, and I’ve attached a copy of the .fla (done is CS4, but saved in CS3 mode) just in case it’s a matter of the centerpoint being off or something. This is all in the container movieClip.
onClipEvent (load) {
// snip code for colorizing / adding a filter
this.menuText.text = "testing testing";
this.menuText.autoSize = "center";
this.tab._height = this.menuText._width + 81.2; // adding the 81 to take into account the sides of the tab mc so the text doesn't go into them
this.tab2._height = this.tab._height;
}