Superscript/subscript character/text in AS3

Hi,

As shown in the demo I am trying to create a sample to make a character superscript/scbscript but don’t know what is required to create this functionality.

http://labs.adobe.com/technologies/textlayout/demos/

Can some provide any sample code for the same.

Thanks for any help.