A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: I can’t figure this out for the life of me ………!

  1. #1
    Member
    Join Date
    Aug 2001
    Posts
    58

    I can’t figure this out for the life of me ………!

    This is my problem I have dynamically loaded text that I want to have options like “bold” which I would have to make my dynamic text field “render text field as HTML” I did this but the problem is when I added just a simple bold tag it shows up as text. Now I went to http://www.macromedia.com/support/fl...s/htmltext.htm (which OldNewbie kindly gave to me) but no such luck with that because their example has the text in an action. So I’m wondering if this can be done and if so how? Does anyone have a site they can recommend or possibly have a quick example of their own?

    Thanks in advance!

  2. #2
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    works for me:
    Code:
    _txt.html = true;
    _txt.htmlText = "<b>Apple</b> Apple"
    Are you embedding the fonts? can you post any code you're using?

  3. #3
    Member
    Join Date
    Aug 2001
    Posts
    58

    HA! It worked but.....

    I haven't tried your method yet but I did manage to get it to work. Too bad I only got it to work on a test file. I'm also using levels, which might be a problem with the text. Here is my test file, and for anyone else out there trying to find the answer but you can't find it and wasting tons of time here is a PERFECT RESOURSE FOR YOU!

    http://www.lynda.com/products/books/.../12FlashMX.pdf

    49 page pdf of pure flash goodness!
    Attached Files Attached Files

  4. #4
    Member
    Join Date
    Aug 2001
    Posts
    58

    P.S.

    yes I'm embedding the fonts

  5. #5
    Member
    Join Date
    Aug 2001
    Posts
    58

    One more quick add-on

    Why is it when you have the option "No Characters" checked you can see your HTML fine but when you click "All Characters" It puts your text back to default (this option is under "Characters...")

  6. #6
    Member
    Join Date
    Aug 2001
    Posts
    58

    hmmm...

    Hmmm...
    Also as it stands my code I'm using to call the txt is as of follows:

    loadVarsText = new loadVars();
    loadVarsText.load("/text/test.txt");
    //assign a function which fires when the data is loaded:
    loadVarsText.onLoad = function(success) {
    if (success) {
    trace("done loading");
    //Now that we know the data is loaded,
    //set the text content of the Text Field
    //with the instance name "scroller" equal to the
    //contents of the variable
    scroller.text = this.Text;
    } else {
    trace("not loaded");
    }
    };


    Vs. the code used in that PDF example:

    loadVariablesNum("text.txt", 0);

  7. #7
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    try using a variable other than text in your text file (i.e. myText);

    Code:
    scroller.htmlText = this.myText;

  8. #8
    Member
    Join Date
    Aug 2001
    Posts
    58

    PERFECT!

    How did you know that changing the .text to .htmltext would work? Thank you sooooooo much for the help!

    Cheers!

  9. #9
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789

    Re: PERFECT!

    Originally posted by WinterMute007
    Thank you sooooooo much for the help!
    No problem...

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