A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Line breaks in imported HTML

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Posts
    6

    Line breaks in imported HTML

    Hello,

    I use URLLoader and URLRequest to import an html file inside a dynamic text field in Flash CS3.
    I noticed that when there are some line breaks in the html code, there would be a line break in the Flash text field.
    This is not normal, only a <br /> or a </P> should trigger a line break.
    Is there any way to get rid of this?

    Thanks

    David

    (sorry I first posted this question in the wrong forum)

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    first, test it live - in my experience, flash'll accept the line breaks when using Test Movie, but when housed in an html document the line breaks won't appear. failing that you can always remove them manually
    PHP Code:
    sometextfield.htmlText somestring.replace(/\n+/gm,""); 

  3. #3
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    textfield.condenseWhite=true;
    - The right of the People to create Flash movies shall not be infringed. -

  4. #4
    Junior Member
    Join Date
    Jul 2008
    Posts
    6
    Hurray Cancer!Thanks for the answer!! It works well :]

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