Ver Mensaje Individual
  #6 (permalink)  
Antiguo 07/09/2006, 22:15
Avatar de goc00
goc00
 
Fecha de Ingreso: enero-2002
Ubicación: 000's DiMensiOn
Mensajes: 979
Antigüedad: 22 años, 3 meses
Puntos: 3
Todo perfecto estimado, hice algunas modificaciones en el código (por ejemplo en los ciclos while, puesto que si un número termina en 0, AS1 lo interpreta como false y no permite entrar al bucle). El código modificado está full operativo para AS1.0, a ver si alguien le sirve. Muchas gracias nuevamente TMeister .

Código:
function makeNumberFormat(value, separator) {
	str = value.toString().split("");
	i=0;
	count=0;
	tmpArray=new Array();
	back="";
	str.reverse();
	j=0;
	while(j<=str.length) {
		if ((count%4) == 0) {
			tmpArray.push(separator);
		} else {
			tmpArray.push(str[j]);
			j++;
		}
		count++;
	}
	tmpArray.reverse();
	
	for(i=0;i<tmpArray.length;i++) {
		back += tmpArray[i];
	}
	return back.substr(0, back.length-1);
}
__________________
GOC00 CominG soOn v2.0
CyA! & GooD LuCK...