A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Can't create HTML bold from dynamic loading text

  1. #1
    Member
    Join Date
    Jul 2002
    Posts
    35

    Can't create HTML bold from dynamic loading text (fixed)

    Hi,

    I created a movie loading it's content from a text file, I use some basic HTML tags in my text and most of them works fine exept the <b> tag. I have no problem with links and <br> tags but bolds just doesn't show at all (the text itself).

    Is ther ea workaround for this? I tried using the generic _sans font, I tried setting the html value via the property bar and via actionscript. I checked some fla in the database here but I don'T see what I'm missing.

    Thanks for helping!
    Last edited by QCX44; 01-31-2005 at 08:45 PM.

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Were you embedding the font used? If so, you need to also embed the bold outlines and/or italic outlines (if you intend to use italic) for those style tags to work along with the font's normal style.

  3. #3
    Member
    Join Date
    Jul 2002
    Posts
    35
    I don't see anywa option to embed bold and such things, is is something that must be scripted somehow?

    Thanks a lot for helping.

  4. #4
    Apollo's follower... dragonil's Avatar
    Join Date
    Jul 2002
    Location
    Athens, Greece
    Posts
    182
    To embed a font, just select the dynamic text and in properties panel go to character options. Embed all but I'm not sure if this still solves you problem. If yes, please let me know.
    dragonil


    "Practice is the mother of learning"
    "Knowledge is meant to be spread, not to be kept in secret..."
    Ancient Greeks...

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    First off device fonts can't be embedded, so don't use device fonts.
    Next you'd be better off attaching your .fla (along with your text file), zipped up and in a MX only format, not MX2004.

    You'd have a better chance of getting an answer if your .fla was in a MX only format, and zipped up.

    You would have to save a copy of your MX2004 .fla, (using Save as...) and changing the Document type to MX only in the Save as... window.

  6. #6
    Senior Member
    Join Date
    Jan 2005
    Posts
    110
    To solve the problem, you need to actually put in the text box a word in bold or in italic if you want to show bold or italic. The words you put in text will be changed if you load text from somewhere else. Beside you still need to embed the font.

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    But then you'd loose all normal text in the main textfield.
    You need to set up a second off-stage textfield (unseen) to embed the bold and/or italic outlines, so that all 3 styles would be available in the main textfield!

  8. #8
    Member
    Join Date
    Jul 2002
    Posts
    35
    Originally posted by oldnewbie
    But then you'd loose all normal text in the main textfield.
    You need to set up a second off-stage textfield (unseen) to embed the bold and/or italic outlines, so that all 3 styles would be available in the main textfield!
    That's exactly what happened!

    I managed to have the <b> tagged words showing using a different font (a bold font, but without using the bold option of the property bar) but there is no difference between my bold and normal text...

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Ok! In the on stage textfield, don't set the B or I tabs, embed the font, no device font, and no bold type font, just Verdana for example...

    Next, on some other layer, create a new textfield. Select the same Verdana font, but enable the Bold tab, and type "BOLD" in the textfield. If you intend to use the italic style, then disable the bold tab, type a space in the textfield, enable the Italic tab and type "ITALIC" in the same textfield. Now hit the Character tab, and select Embed All... You've just embedded the Verdana bold and italics outlines, and you're almost done...
    Drag the textfield off-stage anywhere so that it's unseen.

    Now and only now that you've embedded all of Verdana outlines, will the 3 styles be available and work in the on stage textfield.
    Use the proper html tags, and it should work as a charm!

    myText=Hello my normal, <b>bold</b> and <i>italic</i> Worlds!

  10. #10
    Member
    Join Date
    Jul 2002
    Posts
    35
    Oh yeah! It works now!

    Thanks a lot!

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