"How to print the text messages from the cell phone"
Do you know any drivers for your operating systems to communicate with a printer ?
I don't ^^
The best way to achieve this, would be to send your text to a web server script/method that will call the printer and launch your print.
You can achieve this using Flash Lite easily of course. See documentation (send() method).