3 Replies Latest reply on Nov 20, 2008 4:07 PM by Ned Murphy

    dynamic text field autoSize

      So, I have created an xml-supported Array of news boxes (a movie containing dynamic text fields). One text field needs to be autoSize(d) so I put " myText_instance.autosize = true " into the movie's actions. But when I play the movie, the Array does not create a different sized news box (based on the amount of text in each) it just covers the other news boxes with remaining text. Basically, I need each news box to be reliant on the amount of text not the reverse. I think this may be a sequencing problem: the xml text is loaded after the Array has been created? Maybe its just a matter of putting the code in the right place on the timeline? This is probably simple structure and any suggestions are greatly appreciated!
        • 1. Re: dynamic text field autoSize
          Ned Murphy Adobe Community Professional & MVP
          If I understand what you are describing happens correctly...

          If wordWrap is set to true, then only the bottom side of the text field will be resized and the right side will remain fixed.

          I can't remember for sure if this affects it as well, but if you have the textfield manually stretched out (a square shows rather than a circle in the corner), it may also only autoSize downwards. If that's the case, double click on the square to turn it back to a circle.
          • 2. Re: dynamic text field autoSize
            supshur Level 1
            Hey Ned,
            Thanks for the response! I tried setting up wordWrap but it did not fix the problem. Maybe I'm not being clear on what is happening.

            The arrangement of my instances is this: news_array > mynews_bar > mytext_field

            The code to create the array, load the xml, and create a scroll bar lies in the timeline of news_array.

            My text field autoSize code is in the timeline of mytext_field.

            When tested, the array of news boxes seems to be created before the text is loaded, so the news boxes don't change size according to the amount text. Instead the text just overflows onto text in other news boxes. When I delete the autoSize code in mytext_field, the text is clipped by the size of the unchanging news box.

            Does this explain things better? thanks again for the help!
            • 3. Re: dynamic text field autoSize
              Ned Murphy Adobe Community Professional & MVP
              You probably need to preload your data before trying to use it in any case.

              I'm still not sure of the problem though.