Gotta another action script puzzle im trying to figure out.
My program has two rows of text, stacked on top of each other.
they adjust to each other, to match when text is entered so it stays a nice square.
the problem is I cant seem to get the text bars on top to resize to the text bars on bottom.
Worth mentioning, it works the other way around, the bottom text resizes to the top text.
any help would be apperciated.
//here is my code
addEventListener(Event.ENTER_FRAME,strehrows, false, 0, true);
function strehrows(event:Event)
{
if (MovieClip(parent.parent).textSelect == textArray100["pair1"],false,0,true)
{
textArray100["pair1"].autoSize = TextFieldAutoSize.LEFT;
textArray100["pair13"].autoSize = TextFieldAutoSize.NONE;
textArray100["pair13"].width = textArray100["pair1"].width;
}else
if (MovieClip(parent.parent).textSelect == textArray100["pair13"],false,0,true)
{
textArray100["pair13"].autoSize = TextFieldAutoSize.RIGHT;
textArray100["pair1"].autoSize = TextFieldAutoSize.NONE;
textArray100["pair1"].width = textArray100["pair13"].width;
}
}
copy and paste the code you're using. i can't debug code that's related but not the same as the code you use.
also, use the trace() function to check the values that you're checking and copy and paste that output too.
for example,
addEventListener(Event.ENTER_FRAME,strehrows, false, 0, true);
function strehrows(event:Event)
{
trace(MovieClip(parent.parent).textSelect.name,textArray100["pair1"].n ame,textArray100["pair13"].name);
if (MovieClip(parent.parent).textSelect == textArray100["pair1"])
{
textArray100["pair1"].autoSize = TextFieldAutoSize.LEFT;
textArray100["pair13"].autoSize = TextFieldAutoSize.NONE;
textArray100["pair13"].width = textArray100["pair1"].width;
}else
if (MovieClip(parent.parent).textSelect == textArray100["pair13"],false,0,true)
{
textArray100["pair13"].autoSize = TextFieldAutoSize.RIGHT;
textArray100["pair1"].autoSize = TextFieldAutoSize.NONE;
textArray100["pair1"].width = textArray100["pair13"].width;
}
}
North America
Europe, Middle East and Africa
Asia Pacific