
24/05/2011, 12:07
|
 | | | Fecha de Ingreso: marzo-2011 Ubicación: Santiago de Cali, Colombia
Mensajes: 74
Antigüedad: 13 años, 11 meses Puntos: 16 | |
Respuesta: Problema con array se pueden poner las variables en un subarray:
var registro_esc:Array = new Array();
registro_esc[0] = [ variable1, variable2 ];
y acceder a los valores con subindices:
registro_esc[0][0]; // valor de variable1
registro_esc[0][1]; // valor de variable2
o se pueden poner como propiedades de un objeto:
registro_esc[0] = { valor1: variable1, valor2: variable2 };
y acceder a los valores con el nombre de la propiedad:
registro_esc[0].valor1; // valor de variable1
registro_esc[0].valor2; // valor de variable2
o
registro_esc[0]["valor1"]; // valor de variable1
registro_esc[0]["valor2"]; // valor de variable2 |