expanding dynamic text box

Ask a Question related to Macromedia Flash Data Integration, Design and Development.

  1. #1

    Default expanding dynamic text box

    I have a scroll pane that is linked to a movie clip with a dynamic text field.
    The scroll pane expands automatically based on the length of the dynamic text
    field. I would also like to have the dynamic text field expand automatically to
    fit the dynamic content from an external .txt file if there is too much text to
    fit in the default text field length.

    Here is the code I am using to get the .txt files:

    myLoadVars = new LoadVars();
    myLoadVars.onLoad = function() {
    // the data is loaded in the myLoadVars object as a property of the object
    myText.htmlText = myLoadVars.myHTMLdata;
    }
    myLoadVars.load("MCAS-EMST/Body-1.txt");

    Thank you for your help

    Jeff3d Guest

  2. Similar Questions and Discussions

    1. Expanding shape or Text in Illustrator CS
      Anyone know how to expand text or a shape in Illustrator CS? I am creating a logo using the font "Capitals" (Mac font) but need the fill to be more...
    2. load external text to dynamic text field in levels
      Dear Sir I found the Tech Noe Index #16238 is useful in creating dynamically loaded text from external text file. However, the method mentioned...
    3. Dynamic text box within dynamic movie clip
      I'm having a similar problem. On mine I noticed that although the text doesn't show and the border doesn't show, the cursor changes appropriately...
    4. Dynamic text in smooth scrolling text field - help
      here's links to the files. http://www.anicespot.com/test/ http://www.anicespot.com/test/easing_textScroller-01.html...
    5. Fixed Width layout cells expanding with text ??
      Hi - got the same problem I went trhough the tutorial, but have some questions: When it talked about 'balloon cell', and wrote "I have a small...
  3. #2

    Default Re: expanding dynamic text box

    Look at [url]http://livedocs.macromedia.com/flash/8/main/00002734.html[/url]. Probably want to set it to true or "left"
    MotionMaker Guest

  4. #3

    Default Re: expanding dynamic text box

    Thank you, but I am trying to set up an existing dynamic text field that is
    displayed through a scroll pane.
    How do you apply

    myText.autoSize = True;

    to an existing dynamic text field so the loaded text raps and the text field
    automatically expands down to accomodate the loaded text and the scroll pane
    recognizes that the linked text field has expanded.
    The first frame action of the dynamic text field movie clip already has the
    following script to load the .txt file:

    myLoadVars = new LoadVars();
    myLoadVars.onLoad = function() {
    // the data is loaded in the myLoadVars object as a property of the object
    myText.htmlText = myLoadVars.myHTMLdata;
    }
    myLoadVars.load("MCAS-EMST/Body-1.txt");

    Thank you

    Jeff3d Guest

  5. #4

    Default Re: expanding dynamic text box

    Thus you set the width parameter for the TextField and turn on word wrap like
    this:


    var myHtml_txt:TextField = this.createTextField("myHtml_txt", 1, 0,0,100,0);
    myHtml_txt.autoSize = true;
    myHtml_txt.multiline = true;
    myHtml_txtwordWrap = true;
    myHtml_txt.border = true;
    myHtml_txt.html = true;
    myHtml_txt.htmlText = "First line of text first sentence. First line of text
    second sentence. ";
    myHtml_txt.htmlText += "Second line of text first sentence. ";
    myHtml_txt.htmlText += "Third line of text first sentence. ";

    MotionMaker Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139