dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: HTML Text in MX2004

  1. #1

    HTML Text in MX2004

    I'm not using 2004 yet, but am wondering whether the support for HTML has been updated or is just as bad as before. Specifically, if I have the string below:

    "This....is..<b>really</b>.......great"

    (Assuming that each period represents a space character, rather than a period.)

    Will MX2004 condense the multiple spaces, or does it just format "really" as bold, leaving all of the multiple spaces intact?

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Hi,

    It works just the same as MX did, you can choose whether to condense the white space using the condenseWhite property of the textfield. the default value is false (leave the whitespace alone) but setting it to true will remove the extra space.

    eg.

    code:

    myText.condenseWhite = true;
    myText.html = true;
    myText.htmlText = "This is <b>really</b> great";


  3. #3
    Oh yeah. I guess that just shows that my AS is a little rusty. =)

    That saves me a lot of hassle trying to manually replace all of that.

    Thanks!

  4. #4
    Wait a second!

    MX doesn't seem to support condenseWhite for the textfield object. The property isn't highlighted in the script window and it doesn't appear in the actionscript dictionary for this version.

    Are you sure it's not just something for MX2004?

    The notes in the MX2004 (from macromedia.com) say that condenseWhite is available as of the Flash Player 6, but I sure can't get it to work. Any ideas?

  5. #5
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    condenseWhite was undocumented for MX, but it is supported,
    Attached Files Attached Files

  6. #6
    OK, OK. This is my bad. Just realized that I had buried my text field one level too deep and wasn't accessing to correct object. Now it seems to be working.

    Thanks for the help!

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