function str_replace(str, from, to):String { var parts = str.split( from ); var result = parts.join( to ); return result; } str = '1,4'; new_str = str_replace( str, ',', '.'); trace( new_str );