Autowrapped text, centered?

I found this function which autowraps long texts, it works great but I would like to be able to center each row of text.

http://developer.anscamobile.com/code/auto-wrapped-text-updated#comment-52493

Is it possible to change something in this code? I've been trying several different solutions without manage to center each line like this:

 this is line one
     line two
this is line three

I figured it out:
Put this line of code after each local newDisplayLine

1
newDisplayLine.x = width/2 - newDisplayLine.width/2;
views:1527 update:2011/10/11 8:57:46
corona forums © 2003-2011