I am making a Flash game (no really?).
I need to attach a wall movieclip according to an array.
The array code all works. I don't need to give you that.
The problem is with the depth.
My code is:
I know the problem is with the _root.getNextHighestDepth() part, because I changed the depth and tested, but I can't get it to work. I've tried setting all their depthsm to 1, but it doesn't work.
Can anybody help me?
Last edited by Raidation on Mon Jun 15, 2009 4:21 pm; edited 1 time in total
I need to attach a wall movieclip according to an array.
The array code all works. I don't need to give you that.
The problem is with the depth.
My code is:
| Code: |
|
for(i = 0; i <= 19; i ++) { for(q = 0; q <= 7; q ++) { if(l1[i][q] == 1) { _root.attachMovie("mc_wall","mc_wall",_root.getNextHighestDepth()); mc_wall._x = i*32; mc_wall._y = q*32; } } } |
I know the problem is with the _root.getNextHighestDepth() part, because I changed the depth and tested, but I can't get it to work. I've tried setting all their depthsm to 1, but it doesn't work.
Can anybody help me?
Last edited by Raidation on Mon Jun 15, 2009 4:21 pm; edited 1 time in total
