dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: htmlText wont display

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Location
    Sydney, Australia
    Posts
    271
    G'Day all,
    I'm loading dynamic text from a database but I'm adding html tags to it as I load it. The problem is that I can see the text in my text area if I write:
    text = _root.text;
    However I can't see it if I write:
    htmlText = _root.text;
    Does anyone have any idea what I'm doing wrong because it is very frustrating.

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    266
    Hi,

    it looks like you're not using it properly.

    Let's say you read the html text into a var called inputHTML and you want it to display in a TextField call myText, you would set the text field to render html in the properties panel, and would do something like this:

    Code:
    inputHTML = "This <a href=\"test.htm\">here</a> is a link.<br><br>But don't click it!";
    
    myText.htmlText = inputHTML;
    Hope this helps.

    Dan.

    Ammendment:

    The link in the code above uses a standard anchor href tag - I just couldn't get it to display properly.

  3. #3
    Senior Member
    Join Date
    Apr 2001
    Location
    Sydney, Australia
    Posts
    271
    Thanks that is exactly what I'm doing! I think I've narrowed my problem down to the ASP I'm using so I'll attack that instead.

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