Flash character embedding – adding additional ranges

Flash uses an XML file to define all the possible character ranges for embedded fonts and uses them to create the "Character Embedding..." list for dynamic TextFields in the IDE.

If you have ever tried to use a non-breaking space in a Flash textfield, you will of come across a pesky little issue - the non-breaking space character is not included in any of the unicode ranges used by Flash for character embedding.

So, using   or   in an HTML textfield will not work, even if you've selected all the usual embed ranges for the TextField.

But fear not! You can add it to the list Flash uses by manaully editing UnicodeTable.xml

PC    - [root drive]:\Documents and Settings\[username]\Local Settings\Application Data\Adobe\[flash version]\en\Configuration\FontEmbedding\UnicodeTable.xml
Mac    - /Users/[username]/Library/Application Support/Adobe/[flash version]/en/Configuration/FontEmbedding/UnicodeTable.xml

Add the following to the end of the file and the item will appear in the list of available ranges in the IDE.

<glyphRange name="Non Breaking Space" id="27" >
<range min="0x00A0" max ="0x00A0" />
</glyphRange>

If you then select and embed that character in Flash (after re-starting the app)  you’ll be able to use &nbsp; or &#160; to give you non-breaking spaces in HTML TextFields.

Hurrah.

If you now have the need to cycle through lots of text fields in Flash and add the non-breaking space embed to them, then why not use this little helper command - download then install the .mxp file (sources also included)

The installed command will appear in the Commands menu and will cycle through all the TextFields in the library/on the stage and add the nbsp embed range if it's not present.