Hi all,
I was wondering if anyone would be able to help create a Object grid prototype.
What it should do:
This prototype will create a grid of specified Objects and allow addtions to the grid to create a custom complex grid system.
To create a simple grid is not entirely difficult (with just duplicating an object)
But after this has completed, there should be an variable object containing all the data in that grid.
then calling the function again with the same grid name you would be adding to the grid, not creating a new one.
Does this make any sense?
Visual Example:
call something like
Code:
// new Grid(Name, Cells, Cols, Rows, Clip)
myGrid = new Grid('grid1', 5, 2, 3, function () {
// Dynamically create a movieclip with stuff in it to act as the grid cell
});
That would create this:
http://www.zaxisnet.com/misc/2x3_1.gif
Then you wanted to add to the same grid
Code:
// add(Cells, Cols, Rows, StartingCol, StartingRow, Clip)
myGrid.add(2, 1, 2, FirstUnusedCol, FirstUnusedRow, function () {
// Dynamially create movieclip or reference the function
});
Then it should end up like this:
http://www.zaxisnet.com/misc/2x3_2.gif
Would anyone be able to help me create this....I've been trying for a while now, with no success.
Greatly appreciated.
Cheers.