Hi for those of you who are creating forms in flash I recommend you download stringUtils.as library from
http://www.markme.com/
But you will need to change the rtrim() to below to fix a small bug
String.prototype.rtrim = function()
{
var size = this.length;
for(var i = size; i > 0; i--)
{
if(this.charCodeAt(i-1) > 32)
{
return this.substring(0, i);
}
}
return "";
}