Question
array structure
I'm stillnew to array.
So i'm trying to create a dynamic structure like this:
this_array = new Array();
some_values = new Array();
some_values = param.split ( " , " )
for ( i = 0 ; i < param.length ; i ++ ){
this[ "values_" + i ] = param[ i ] ;
return_values = this[ "values_" + i ]
}
this_array_structure = [ some_object , return_values ]
this_array.push( this_array_structure )
trace ( this_array ) // returns: computer_A , usb
the problem is that the "return_values" consists more than one variable, in this case it has 5 : " dvi , firewire , audio , video , usb "
Somehow it only returns the last variable which is usb.
I'm trying to make it so that it would return something like this:
[ computer_A , dvi , firewire , audio , video , usb ]
The reason why I want to make it dynamic because each item has a different number of properties. In this case computer_A has 5, computer_B may only have 4 and so forth.
Any help would be greatly appreciated.
So i'm trying to create a dynamic structure like this:
this_array = new Array();
some_values = new Array();
some_values = param.split ( " , " )
for ( i = 0 ; i < param.length ; i ++ ){
this[ "values_" + i ] = param[ i ] ;
return_values = this[ "values_" + i ]
}
this_array_structure = [ some_object , return_values ]
this_array.push( this_array_structure )
trace ( this_array ) // returns: computer_A , usb
the problem is that the "return_values" consists more than one variable, in this case it has 5 : " dvi , firewire , audio , video , usb "
Somehow it only returns the last variable which is usb.
I'm trying to make it so that it would return something like this:
[ computer_A , dvi , firewire , audio , video , usb ]
The reason why I want to make it dynamic because each item has a different number of properties. In this case computer_A has 5, computer_B may only have 4 and so forth.
Any help would be greatly appreciated.