A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: 2D arrays

  1. #1
    Senior Member
    Join Date
    Nov 2001
    Posts
    254
    Hi,
    I was wondering if anyone has an little example of how to setup and use a 2d array.

    thanks,
    jimi

  2. #2
    the usual
    Join Date
    Jul 2000
    Posts
    1,482
    simple 2d array

    Code:
    myArray=["item1","item2","item3"]
    if you actually want to achieve something with the array , post your question and i'll give it a shot!

  3. #3
    Senior Member
    Join Date
    Nov 2001
    Posts
    254
    Im making a multiplayer chess game.

    My friend and I are having a competition to see who's comes out better..

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Posts
    254
    is there anyway to declare an array kind of like in C.

    int array[4][4]={{1,1,1,1},
    {1,1,1,1},
    (1,1,1,1},
    {1,1,1,1}};

    ????

    thanks,
    james

  5. #5
    the usual
    Join Date
    Jul 2000
    Posts
    1,482
    woah - you've got quite a take on your hands - if you get stuck, don't forget that theres a games forum too!

  6. #6
    the usual
    Join Date
    Jul 2000
    Posts
    1,482
    i'm not quite with you on that, it looks to me that you are trying to form a multidimensional array here

    Code:
    myArray = [
    [1,1,1,1],
    [1,1,1,1],
    [1,1,1,1],
    [1,1,1,1]
    ]
    am i wrong?

  7. #7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center