Código PHP:
String.prototype.reemplazar = function(termino1, termino2) {
var temp_array = this.split(termino1);
var new_cadena = "";
for (var k = 0; k<temp_array.length; k++) {
new_cadena += temp_array[k]+""+termino2;
}
new_cadena = new_cadena.substring(0, new_cadena.length-termino2.length);
return new_cadena;
};
this.onEnterFrame=function(){
cadena=MiAreaTexto.text
cadena2 = cadena.reemplazar(",", ".");
MiAreaTexto.text=cadena2;
}