Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/10/2010, 12:00
maverick19
 
Fecha de Ingreso: julio-2008
Ubicación: Santa Fe
Mensajes: 66
Antigüedad: 15 años, 9 meses
Puntos: 0
Problema asignando variables de txt a flash

Hola estoy queriendo tomar de un archivo txt el valor de unas variables y asignarlas a variables ya definidas en mi flash...

1° FRAME
Código:
//PARAMETROS
fscommand ("fullscreen", "true");
fscommand ("allowscale", "true");
fscommand("trapallkeys","true"); //BLOQUEA ESC

//BLOQUEAR BOTON DERECHO
mi_menu = new ContextMenu();
mi_menu.hideBuiltInItems();
this.menu = mi_menu;

//VARIABLES
var cantidad_promociones;
var Promociones = new Array();
2° FRAME
Código:
archivo = new LoadVars();
archivo.onLoad = function(succes) {
	if (succes){
		cantidad_promociones = this.cantidad_promociones;
		trace(cantidad_promociones);
		estado_txt.text = "CONECTO!";
	}else
		estado_txt.text = "FALLO CONECCION";
};
archivo.load('cantidad.txt');
cantidad_promociones_txt.text = cantidad_promociones;
trace(cantidad_promociones);*/
stop();
Archivo txt
Código:
cantidad_promociones=1
El problema esta en que el trace de adentro del if... tiene el valor correcto pero el trace de afuera no lo tiene (undefined).

No logro hacer que le asigne a la variable el valor que lee del txt

Ya probe:
1 - Cambiar el nombre de las variables
2 - Usar _global