6 Replies Latest reply: Jul 19, 2012 4:29 PM by kglad RSS

    Automatically resize two text bars borders to each other


      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;


                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;