A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: createTextField and XML linebreak problem

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    16

    createTextField and XML linebreak problem

    I have been unable to produce a line break in a dynamically created text field using createTextField, which loads data from XML.

    my AS2 script resembles the following:

    Code:
    myTxt = createTextField("txt_field",1,0,0,1000,1000);
    myTxt.type = TextFieldType.DYNAMIC;
    myTxt.wordWrap = myTxt.autoSize = myTxt.html = true;
    myTxt.htmlText = xml.firstChild.childNode[0]; //previously loaded xml
    I've tried various things within the XML to produce a line break such as:

    & # 10 ; and & # 13 ; both within an attribute and within a node
    <br> and <p> both within <![CDATA[....]]> and without
    variations on \n and \b.

    I'm still unable to produce a line break in flash from within the XML data.

    Please help!
    ***this may or may not be related but I have successfully created line breaks by appending "\n" to the xml loaded text (in my AS code), but ONLY when the dynamic text field is part of a movie clip, NOT when loaded via code with createTextField

  2. #2
    I know nothing.
    Join Date
    Feb 2008
    Posts
    315
    In your XML file <br>.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center