I’m creating an isometric grid, 18*35 elements.
First I define the grid in an array of rows and columns (different numbers for different tiles).
Then I create a display.newgroup and iterate through the array creating the tiles and popping them into the group.
The tiles have a addEventListener(“touch”, onTouch) for each one.
Using the x,y coordinates doesn’t work for detecting which tile number I’ve touched (or if it is, it’s beyond my mathematical ability) because the grid is isometric.
However when a tile is touched, I need to know either which bitmap it’s displaying OR what its position in the group is (therefore I can check the original array). Or can I add a variable to the display group with that info in it.
[import]uid: 120570 topic_id: 22966 reply_id: 322966[/import]