5 Replies Latest reply on Jan 4, 2007 5:00 AM by LB Back

    refreshing textField

      I have a dynamic textField with custom made scrollbar into which the text from XML is loaded. I also have a dynamicly created menu. After you click on menu, a new content is loaded into a textField. The scrollBar is visible if the content_mc (where the textfield is) is higher then the mask. The problem is that sometimes looks like the content is not fully loaded into a textField and sometimes I get a blank textField, but the scrollbar is visible, which means that a content is loaded, but I don't know where is it, sometimes the content doesn't start at the begining and I can't even get there.I get the blank textField after a few clicks so I assume it has to be something with a refreshing a textField. Any ideas? THX for your help
        • 1. refreshing textField
          arunbe Level 1
          Have you enabled the ignoreWhite (true) for XML ?
          And also, make the entire text field content as single empty string and assign the original. like,
          youTextFeild.text ="";
          youTextFeild.text = yourText;
          And what scroller component you are using now ??
          Is it a flash inbuilt component ?
          • 2. Re: refreshing textField
            LB Back Level 1
            The blank field could be caused by the previous text being longer and the textField and scrollbar not being reset. Try this:
            yourTextField.scroll = 0; before loading new text.
            • 3. Re: refreshing textField
              rohai Level 1
              Hi, THX both of you guys

              arunbe, I do have enabled the IgnoreWhite and I'm not using a flash inbuilt scroll component. I modified the scroll bar from kirupa.com and it's working fine (i'm using it also with the menu).

              I tried both suggestions and here's the result. It still doesn't show the whole content (is there a limit of characters in Flash text fields???). If I move scroll bar to the bottom and then click other button in menu, it looks like the scrollbar is including the previous scrolled content and starts with the new loaded content from there so I can't see new loaded content from start. If I don't scroll then the new loaded content starts from the top. THX fro your help so far.
              • 4. Re: refreshing textField
                arunbe Level 1
                if possible , give us link for your source !
                • 5. Re: refreshing textField
                  LB Back Level 1
                  Put yourTextField.scroll = 0; in the buttons before you load new text, make sure the path to your textFiled is correct.