daverbalz
10-10-2001, 01:13 AM
I'm making a sliding puzzle, and I want Flash to recognize when the puzzle is complete. The puzzle works but my code to recognize the completion of the puzzle doesn't. The way I wrote the code was for Flash to see if the MC were in the correct postion in relation to one another. Here is what I have, any suggestions will be appreciated:
if (_root[tile1].y=_root[tile2].y=_root[tile3].y=_root[tile4].y) {
if (_root[tile5].y=_root[tile6].y=_root[tile7].y=_root[tile8].y) {
if (_root[tile9].y=_root[tile10].y=_root[tile11].y=_root[tile12].y) {
if (_root[tile13].y=_root[tile14].y=_root[tile15].y) {
if (_root[ile1].y<_root[tile5].y) {
if (_root[tile5].y<_root[tile9].y) {
if (_root[tile9].y<_root[tile13].y) {
if (_root[tile1].x=_root[tile5].x=_root[tile9].x=_root[tile13].y) {
if (_root[tile2].x=_root[tile6].x=_root[tile10].x=_root[tile14].y) {
if (_root[tile3].x=_root[tile7].x=_root[tile11].x=_root[tile15].y) {
if (_root[tile4].x=_root[tile8].x=_root[tile12].x) {
if (_root[tile1].x<_root[tile2].x) {
if (_root[tile2].x<_root[tile3].x) {
if (_root[tile3].x<_root[tile4].x) {
gotoAndStop (2);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if (_root[tile1].y=_root[tile2].y=_root[tile3].y=_root[tile4].y) {
if (_root[tile5].y=_root[tile6].y=_root[tile7].y=_root[tile8].y) {
if (_root[tile9].y=_root[tile10].y=_root[tile11].y=_root[tile12].y) {
if (_root[tile13].y=_root[tile14].y=_root[tile15].y) {
if (_root[ile1].y<_root[tile5].y) {
if (_root[tile5].y<_root[tile9].y) {
if (_root[tile9].y<_root[tile13].y) {
if (_root[tile1].x=_root[tile5].x=_root[tile9].x=_root[tile13].y) {
if (_root[tile2].x=_root[tile6].x=_root[tile10].x=_root[tile14].y) {
if (_root[tile3].x=_root[tile7].x=_root[tile11].x=_root[tile15].y) {
if (_root[tile4].x=_root[tile8].x=_root[tile12].x) {
if (_root[tile1].x<_root[tile2].x) {
if (_root[tile2].x<_root[tile3].x) {
if (_root[tile3].x<_root[tile4].x) {
gotoAndStop (2);
}
}
}
}
}
}
}
}
}
}
}
}
}
}