Using NBSP (non-breakable space) in flash is non-obvious.
Some method using htmlText exist (use , which was not supported but now is), but if for some reason you don't want to use HTML, here is a workaround:
- use the special character "\u00A0" (UTF-8 code 00A0) in your actionscript code to put nbsp anywhere you want;
- voilà! Test your SWF and check.
- if some weird square appears in lieu of the expected nbsp, that probably because you font doesn't implement this UTF-8 code. Use a font editor (ex: Type Light) to create a new font including this glyph.
- In Type Light, look for Latin I set, then look for character #160.
- Double-click on it: now you can edit an empty character (space-like).
- Just move the green line (on the right of the red line) halfway to the left. It creates a smaller space character.
- Save the font. Right-click on the file, select "Install". When prompted "overwrite?", select "yes".
- Restart Flash and re-publish your SWF.