Hey everyone!
Does anybody who can help me with this problem? My brain’s been saturated already. :crying: I think I am starting to get crazy on this. waah!
Anyway, here’s the problem:
I have created 2 sets of arrays in one array and it works fine. Here’s the code:
for (n=0; n<=2; n++) {
_global["chapter"+n] = new Array();
this["chapTimes"+n] = new Array();
this["tempArray"+n] = new Array();
this["temp"+n] = new Array();
for (i=0; i<=(_global["tRequired"+n].length-1); i++) {
this["tempArray"+n]* = i;
this["tempArray"+n]* = _global["tRequired"+n]*;
_global["chapter"+n]* = parseInt(this["tempArray"+n]*);
this["tempArray"+n]* = this["tempArray"+n]*.lastIndexOf("(");
this["temp"+n]* = _global["tRequired"+n]*.substring(this["tempArray"+n]*);
this["chapTimes"+n]* = parseFloat(this["temp"+n]*.slice(1));
}
}
trace("chapter"+n+": "+_global["chapter"+n]);
Now… the output will yield:
chapter0: 1,2,3,4,5,…10
chapter1: 1,2,3,…10
And now, what if from these outputs(chapter0 and chapter1) i would randomly select only 5 items? What should I do? Can somebody help me figure it out?
:crazy: :diss: