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!?!
(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”
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.
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!)
(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!)
is a video I found, googling for “CS5.5 textField AS3 editing”)
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)…
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.
– 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.