Skip to main content
seejayjames2017
Participating Frequently
February 22, 2017
Question

Dynamic text bug?

  • February 22, 2017
  • 2 replies
  • 1330 views

Very odd behavior when changing dynamic text. Try this:

1. New AS3 file.

2. Create a dynamic text field on the Stage, give it instance name "text1", and write "Hello" in it. Leave plenty of space to the right for more text.

3. Put an Action on the Stage timeline, frame 1:

     text1.text = "Hello world";

Test movie: result is "Hellool"

Font embedding warning. Don't embed right now. Change font to "_sans" and run again: result = "Hello World", as expected. Change back to original font (that was never embedded): result = "Hello World". Try any other font: now they all work...

What is going on? Is Animate auto-embedding the fonts somehow? If you do embed the font at the first warning (and check the Character Glyphs you want, which I missed a few times haha), then everything works, and that makes sense---it didn't have the proper character sets to render the changed text, only the letters you used in the original text (maybe?). BUT that doesn't explain why after you run it once with _sans, all the other fonts will now work WITHOUT embedding.

Any thoughts on this? Was a rather nasty issue that's cost a good hour of fiddling...

    This topic has been closed for replies.

    2 replies

    Participant
    June 26, 2017

    I solved a problem of this type by switching the anti alias readability option to use device fonts.

    kglad
    Community Expert
    Community Expert
    February 22, 2017

    you need to embed your font.  otherwise, only the characters in the textfield (helowrd) are embedded.

    seejayjames2017
    Participating Frequently
    February 22, 2017

    I understand that, but that doesn't answer the question about switching to _sans and then back to any other font (that you have NOT yet embedded) will now work. Seems like a bug to me, because those other fonts will NOT work at first. Why would switching to _sans and back suddenly make it work? Makes no sense...

    kglad
    Community Expert
    Community Expert
    February 22, 2017

    your tf's anti-alias property probably changed when you changed the font from whatever to _sans and then when you returned to whatever it remained at use device fonts..