Select Page

Methods on Strings

I just discovered you can run methods directly on Strings. Not particularly exciting but interesting nonetheless.
Try this one:

trace('upper case'.toUpperCase());

It will trace out this:

UPPER CASE

I’m yet to discover a scenario where this would be useful but it is fun to know all the same!

Emdedding Fonts

Flash and Fonts. Who wold have thought it could get so bad?
I remembered to put some text in the textfield on the stage. I remembered to embed all the characters I needed. I remembered to set embed fonts to true. I remembered to test that the characters I wanted were displaying in the field on the stage. Yet when I imported it and tried to set the text dynamically, my Thai characters were not displaying.
Flash was substituting the font I wanted on the stage so although it looked like my font had support for these characters, it didn’t. It was only displaying boxes at runtime. Next time I’ll remember also to check the Character Map to see that the font I want supports the characters I want.