While experimenting with the information in this post:
I kept getting an error while trying to strictly type the line:
var format = new TextField.StyleSheet();
is the var format here a TextFormat object, or a StyleSheet ? I tried importing the TextField.StyleSheet class per the help files, but that didn’t seem to help.