A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: [F8] problems with "Tags" within dynamic text

  1. #1
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160

    [F8] problems with "Tags" within dynamic text

    My dynamic text is supposed to display contents inside CDATA in html format.
    So i have this small problem. wherever i have sentences(inside my CDATA) within <b></b> tags, these texts are ignored in my dynamic text box. But when i change all <b></b> by <u></u> I am not having problem(it shows them underlined)

    I traced the output window, but it shows everything perfect.
    Last edited by deepakflash; 12-20-2007 at 10:19 AM.

  2. #2
    Member
    Join Date
    Aug 2007
    Posts
    57
    What font are you using? if it's an uncommon one, maybe there's no bold font face for that particular font. For simplicity's sake, try it with arial to make sure that's not the problem. Other than that, it should work. Is the text being loaded from a file?

  3. #3
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    verdana

  4. #4
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    Quote Originally Posted by [HKR]Chief
    For simplicity's sake, try it with arial to make sure that's not the problem. Other than that, it should work. Is the text being loaded from a file?
    I had already tried with Four basic fonts and that includes Arial as well.
    Yes, I am using the data from xml(from inside CDATA).
    I am only able to use <u> tag inside my CDATA, rest of the tags fail to show up in my flash
    Last edited by deepakflash; 12-20-2007 at 11:05 AM.

  5. #5
    Member
    Join Date
    Aug 2007
    Posts
    57
    I found the fix:

    Issue
    HTML enabled text fields fail to display formatted text.


    Reason
    When embedding a font, Flash does not include the entire font family automatically. Only the plain font is embedded without the bold and italic variants. Because of this, HTML formatting that uses bold or italic formatting may not display.


    Solution
    If an HTML formatted text field uses a font that is not resident on the viewer's machine, then that font must be embedded in the SWF to properly display the text. If multiple styles of the font are used in the HTML formatting, then it's necessary to add a dynamic text field to "manage" the embedding of the entire font family. As long as the font is embedded in one text field, the rest of the movie can use it.

    To embed fonts for use in HTML formatted text fields


    1 Using the text tool, create a dynamic text field.

    Note:The dynamic text field may be placed off the visible stage to avoid having it appear in the movie. The text field and embedded fonts must load completely before the font styles can be used in the HTML formatted text field.

    2 In the dynamic text field, place at least one character for each font style used in the movie.
    3 In the Character panel, apply each style used in the movie to at least one character in the text field.
    4 Then embed the character outlines for the text field in the Text Options panel.
    Keep in mind that embedding font outlines will increase the size of the SWF for each style embedded. The actual amount will vary depending on the number of characters and the complexity of the font outline. It may be necessary to preload a portion of the movie to allow the embedded fonts to download. For information on preloading Flash movies see How to create movies that download before playing (TechNote 12588).

    I had to search, but I found the answer (found it here). Hope this gets you going.

  6. #6
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    thanks i am going through the link now

  7. #7
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    It worked... It worked
    so................. this is the solution for a million problems related to html tags. And a million guys are still without a solution
    Last edited by deepakflash; 12-20-2007 at 12:08 PM.

  8. #8
    Member
    Join Date
    Aug 2007
    Posts
    57
    Awesome! I'm glad it worked. I'll have to copy that text and add to my "flash/how to fix problems" folder so when I come across the same problem some day, I won't have to search for the fix.

  9. #9
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    yes, and the procedure is not too complicated.
    And for those who are eager to know, I will put it in two steps(in short)

    (1)type letters in whichever tags u wish to have inside your dynamic text.
    (2)then Embed the text.

    example : type the below sentence inside your dynamic text(incuding the font style)

    This is in Bold and this is in Italic.

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