hi ramones, did not work.
just to verify, that is what i have done:
step one:
created array in construct with properties:
width: 1
height: 3
depth: 2
step two:
loaded this string via ajax:
{
"c2array":true,
"size":[1,3,2],
"data":[
> Â Â Â Â Â [ [300],[25] ],
     [ [100],[50] ],
     [ [800],[10] ]
]}
as i understand now the size is similar to the array in construct, so
- "size":[width,height,depth] - correct?
step 3
use the function Load from JSON string with ajax.lastdata (or the string itself)
step4
set debug.text to array.at(0,0,0)
array.at(0,0,0) should be 300, right?
If i get this thing working i will write a tutorial about it -.-'
otherwise i have to fill my array with a splitted string... Padman2012-06-22 06:50:08
Unless i misunderstood (which is often) If you set your json to "size":[3,2,1] instead of "size":[1,3,2] it should work, it gets 300 from array.At(0,0,0), therefore array.At(2,1,0) = 10 I have provided a capx here.
http://www.sizzle-games.com/Ajaxtestarray.capx
Also if you set your file to
{
"c2array":true,
"size":[3,2,1],
"data":[
[ ["cat"],[25] ],
[
[100],[50] ],
[
[800],[10] ]
]}
array.At(0,0,0), will return cat