Topic: Multi-Dimensional Arrays in AS (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: westernesse |
posted 07-12-2004 13:34
hi all, code: point_set = new Array;
code: vertex = attachMovie("mcPoint", "n"+total, total);
code: onEnterFrame = function()
|
Paranoid (IV) Inmate From: France |
posted 07-12-2004 22:22
I've never coded an ActionScript myself, but I'm I thought the syntax for multi-dimensionnal arrays in AS was the same as in JS, C, C++, ... that is : code: node = point_set[ [], [] ] Are you sure, that the fact that you can access the last 5 items is not due to the fact that Flash allows the use of a "bastardized" syntax that actually only let you access the first item ( sub-array ) of the first dimension of your array ? |
Maniac (V) Inmate From: Boston, MA, USA |
posted 07-13-2004 04:19
I think your syntax is close but not quite there. |
Paranoid (IV) Inmate From: France |
posted 07-13-2004 08:31
Gosh! I should write code after a 4hours sleep and a full day of work. I obvsiouly thought node=point_set[ i ][ j ]; to access the elements of the array and sub arrays |
Paranoid (IV) Inmate From: westernesse |
posted 07-14-2004 11:31
yeah well i think i was writing it like that, i assumed that was how it worked just from c knowledge. but i think i was trying to create the array by like: code: Array1 = new ARRAY;
|
Paranoid (IV) Inmate From: westernesse |
posted 07-14-2004 11:48
yeah well i think i was writing it like that, i assumed that was how it worked just from c knowledge. but i think i was trying to create the array by like: code: Array1 = new ARRAY;
|