SUMMARY:
I was baffled to find that when I edited the text of a TextField using ActionScript 3 (AS3), I was left with RANDOM GIBBERISH. Hours were lost snooping around in my epic project, trying to figure out how anything could cause this problem.

Turns out it’s a feature in CS5!?!
(help?)

AN EXAMPLE:
(note: my TextField has the properties: “Classic Text” engine, using “Dynamic Text” type)

– At first I saw that only vowels were displaying. OH THRILLING MYSTERY! But I suspect this was just a happy accident, and the feature Adobe programmers were promoting with their unrequested changes was actually designed to : just display nonsensical gibberish.
(I think I just got lucky, when I consistently just saw vowels.)

– Here is a simple sample file that demonstrates the problem:
stWord1 is a TextField created on stage, displaying the text “Word…”
But when I run this one line of action script:

    stWord1.text=”9dunqwuidqa hfdwuaind adun “;

The displayed text in this TextField changes to “ddddd”

download example here (5k)

SUGGESTIVE SIDE NOTE:
When I compile anything in the new stupid CS5.5, I see this message:
“Fonts should be embedded for any text that may be edited at runtime, other than text with the “Use Device Fonts” setting. Use the Text > Font Embedding command to embed fonts.”

However, when I embed the default font (Arial regular), I still experience the exact same problem. ie, the file compiles with no complaints.

So far, I have no idea how to fix this problem.

Help?
Anyone?

Print Friendly, PDF & Email

4 thoughts on “CS5.5 Flash PROBLEM: TextField editing (with AS3) leads to BAFFLING MYSTERIES OF DARK MAGIC!

  1. Some links that don’t seem to solve my specific problem, but dance around similar things? maybe? (recording these for reference, so when I return to work next week, i can resume wasting time at the exact same point!)

    http://www.capstrat.com/insights/blog/having-trouble-embedded-fonts-and-html-text-flash-cs5/

    http://stackoverflow.com/questions/2770055/flash-cs5-screwed-up-all-my-textfields-how-can-i-correct-this

    (I was googling with “CS5 AS3 TextField gibberish” and “CS5.5 textField broken” – if these are not the best ways to google this problem please let me know!)

  2. I believ it is because of embedded fonts.

    Char ‘d’ is displayed because it was present in original string – chars was embedded…

    you should use embedd font with all needed chars included.

    How it works in depth is mystery to mee. But i know there are people there on the internet who knows. They even understand difference between TTF and CFF (or how it is)…

  3. Hi Warren,

    One, I want to thank you for writing this post. Although you didn’t find a solution, your description lead me to figure it out.

    Here’s what’s up:

    In a nutshell, this occurs when the embedded font(s) you’re using doesn’t have all the character ranges included when you publish it.

    To fix:

    – Select your embedded font in CS5.5
    – Bring up the context menu and select “Properties…”
    – Under “Character ranges:”, make sure “All” is checked

    DARK MAGIC DEFEATED.

    Nick

Leave a reply