Frame 1
stop();
Frame 2
stop();
fscommand ("allowscale", false);
_yscale = 99.98;
_xscale = 99.98;
passA = [12345, 70760, 38030, 58163, 51799, 46316, 29548, 22870, 22088, 12916, 63546, 52790, 73369, 16916, 85978, 14610, 92523, 91264, 23144, 79799, 56582, 94731, 85592, 46994, 24475, 42689, 19211];
level = 1;
if (_root._url != "http://oos.moxiecode.com/examples/reflex/reflexion_1.swf") {
}
Frame 3
l_1 = [[0, 0, 0, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 2, 1, 0, 0, 0, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 0, 6, 0, 4, 4, 0, 6, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 0, 0, 0, 1, 3, 1, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 0, 0, 0]];
l_1_start = "down";
l_1_name = "Tutorial Level";
l_2 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 1, 5, 0, 4, 1, 5, 0, 4, 1], [1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1], [1, 4, 0, 5, 6, 0, 6, 4, 0, 5, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0]];
l_2_start = "down";
l_2_name = "Piece of Cake";
l_3 = [[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 6, 0, 1, 1, 6, 0, 6, 1, 1], [1, 2, 5, 4, 5, 4, 5, 4, 5, 4, 3, 1], [1, 1, 6, 0, 6, 1, 1, 0, 6, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]];
l_3_start = "right";
l_3_name = "Bottleneck";
l_4 = [[1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 4, 6, 4, 0, 6, 1], [1, 6, 0, 4, 6, 4, 0, 1], [1, 4, 0, 8, 8, 0, 4, 1], [1, 0, 4, 6, 4, 0, 6, 1], [1, 6, 0, 4, 6, 4, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1]];
l_4_start = "right";
l_4_name = "Symmetry";
l_5 = [[1, 1, 1, 1, 1, 0, 0, 0, 0], [1, 2, 4, 6, 1, 0, 0, 0, 0], [1, 4, 6, 7, 1, 1, 0, 0, 0], [1, 6, 7, 6, 4, 1, 1, 0, 0], [1, 1, 1, 4, 8, 4, 1, 1, 1], [0, 0, 1, 1, 4, 6, 7, 6, 1], [0, 0, 0, 1, 1, 7, 6, 4, 1], [0, 0, 0, 0, 1, 6, 4, 3, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1]];
l_5_start = "right";
l_5_change = "time";
l_5_name = "Synchronicity";
l_6 = [[0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 4, 5, 4, 6, 5, 4, 5, 1, 1, 1], [1, 2, 9, 10, 4, 6, 5, 6, 6, 5, 6, 0, 3, 1], [1, 1, 1, 1, 5, 5, 5, 6, 4, 4, 4, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0]];
l_6_start = "right";
l_6_name = "Frost";
l_7 = [[0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 5, 0, 0, 0, 4, 1, 0, 0], [1, 1, 1, 0, 1, 6, 1, 0, 1, 1, 1], [1, 2, 0, 8, 6, 8, 6, 8, 0, 3, 1], [1, 1, 1, 0, 1, 6, 1, 0, 1, 1, 1], [0, 0, 1, 4, 0, 4, 0, 5, 1, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0]];
l_7_start = "right";
l_7_change = "impact";
l_7_name = "Causality";
l_8 = [[1, 1, 1, 0, 0, 0, 0, 0], [1, 2, 1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 5, 0, 0, 7, 1], [1, 0, 6, 0, 0, 0, 5, 1], [1, 4, 0, 11, 11, 6, 0, 1], [1, 0, 6, 0, 0, 0, 4, 1], [1, 7, 0, 0, 5, 0, 5, 1], [1, 1, 1, 0, 1, 1, 0, 1], [0, 0, 1, 1, 1, 1, 3, 1], [0, 0, 0, 0, 0, 1, 1, 1]];
l_8_start = "down";
l_8_name = "Up'n Down";
l_9 = [[0, 0, 0, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 1, 5, 5, 4, 1, 1, 1], [1, 1, 1, 1, 5, 12, 5, 1, 6, 1], [1, 2, 1, 1, 4, 0, 0, 0, 8, 1], [1, 7, 0, 0, 0, 5, 0, 1, 6, 1], [1, 3, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 0, 0, 0, 0]];
l_9_start = "down";
l_9_name = "Push!";
l_10 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 6, 4, 6, 5, 1, 1, 5, 6, 4, 1], [1, 6, 1, 6, 1, 13, 1, 0, 0, 0, 0, 1], [1, 4, 6, 5, 6, 4, 14, 6, 13, 6, 5, 1], [1, 6, 1, 6, 1, 13, 1, 0, 0, 0, 0, 1], [1, 3, 6, 4, 6, 5, 1, 1, 4, 6, 5, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
l_10_start = "right";
l_10_name = "Open Sesame!";
l_11 = [[0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 1, 16, 16, 16, 16, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 3, 17, 6, 5, 5, 15, 4, 1, 4, 6, 1], [1, 1, 1, 5, 5, 15, 5, 4, 15, 4, 4, 1], [1, 2, 0, 5, 5, 1, 5, 15, 4, 4, 4, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
l_11_start = "right";
l_11_name = "Lights On!";
l_12 = [[0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 18, 18, 1, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 5, 18, 18, 4, 0, 1, 0, 0], [1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1], [1, 2, 0, 0, 5, 5, 4, 4, 0, 0, 3, 1], [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [0, 0, 1, 6, 17, 5, 4, 17, 6, 1, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0]];
l_12_start = "right";
l_12_num = [[1, 5, 2], [1, 6, 8]];
l_12_equal = [[4, 5, 2], [4, 6, 8]];
l_12_name = "Twenty Eight";
l_13 = [[0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 6, 6, 6, 6, 6, 1, 0, 0], [0, 0, 1, 5, 0, 4, 0, 4, 1, 0, 0], [0, 0, 1, 5, 19, 11, 0, 4, 1, 0, 0], [1, 1, 1, 5, 0, 0, 19, 4, 1, 1, 1], [1, 2, 0, 5, 5, 5, 4, 4, 0, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
l_13_start = "right";
l_13_name = "Claustrophobia";
l_14 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 1, 5, 0, 5, 4, 5, 4, 5, 0, 0, 1], [1, 0, 0, 0, 0, 12, 0, 12, 0, 12, 0, 0, 1], [1, 4, 0, 12, 0, 8, 8, 8, 8, 8, 0, 6, 1], [1, 0, 0, 0, 0, 0, 12, 0, 12, 0, 0, 0, 1], [1, 3, 1, 4, 0, 4, 5, 4, 5, 4, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
l_14_start = "down";
l_14_name = "Pushover";
l_15 = [[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 0, 1, 6, 5, 3, 6, 1], [1, 1, 1, 4, 5, 5, 1, 1, 1, 6, 6, 6, 5, 1], [1, 2, 0, 5, 20, 4, 0, 21, 0, 0, 0, 0, 4, 1], [1, 1, 1, 4, 5, 5, 1, 1, 1, 5, 0, 6, 5, 1], [0, 0, 1, 1, 1, 1, 1, 0, 1, 4, 5, 6, 6, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]];
l_15_start = "right";
l_15_name = "Spikey";
l_16 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 4, 0, 0, 6, 0, 0, 5, 6, 1], [1, 0, 5, 0, 0, 19, 0, 0, 4, 0, 1], [1, 5, 6, 19, 0, 6, 0, 0, 6, 4, 1], [1, 4, 4, 0, 0, 0, 0, 19, 5, 5, 1], [1, 3, 5, 0, 0, 0, 0, 0, 4, 6, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1], [0, 0, 0, 1, 22, 1, 22, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0]];
l_16_start = "right";
l_16_guns = true;
l_16_name = "Cannon Fodder";
l_17 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 2, 4, 4, 5, 4, 6, 5, 5, 4, 1, 0], [1, 1, 4, 6, 4, 4, 5, 5, 23, 5, 1, 0], [0, 1, 5, 4, 4, 6, 5, 4, 5, 5, 1, 0], [0, 1, 4, 4, 5, 4, 6, 5, 5, 4, 1, 0], [0, 1, 4, 23, 4, 4, 5, 5, 6, 5, 1, 1], [0, 1, 5, 4, 4, 6, 5, 4, 5, 5, 3, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
l_17_start = "right";
l_17_change = "freeze";
l_17_name = "Reversion";
l_18 = [[0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 5, 5, 5, 5, 8, 7, 4, 4, 4, 4, 1, 0, 0, 0], [1, 1, 1, 1, 6, 5, 5, 6, 8, 6, 4, 4, 6, 4, 1, 1, 1, 1], [1, 2, 9, 10, 5, 6, 5, 6, 8, 7, 6, 4, 6, 4, 0, 0, 3, 1], [1, 1, 1, 1, 6, 5, 5, 6, 8, 6, 4, 4, 6, 4, 1, 1, 1, 1], [0, 0, 0, 1, 5, 5, 5, 5, 8, 7, 4, 4, 4, 4, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0]];
l_18_start = "right";
l_18_name = "Chiller";
l_19 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 2, 4, 5, 4, 5, 4, 23, 4, 5, 6, 1, 6, 5, 1, 0], [1, 1, 5, 4, 5, 6, 5, 1, 5, 6, 1, 4, 5, 4, 1, 0], [0, 1, 6, 5, 1, 5, 4, 6, 4, 5, 23, 5, 4, 6, 1, 0], [0, 1, 5, 4, 5, 6, 5, 1, 5, 4, 1, 4, 5, 4, 1, 1], [0, 1, 4, 5, 4, 5, 4, 23, 6, 5, 6, 1, 6, 5, 3, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
l_19_start = "right";
l_19_name = "Devious";
l_20 = [[0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 4, 4, 4, 24, 0, 5, 5, 5, 0, 6, 1], [0, 0, 1, 0, 4, 1, 0, 0, 1, 5, 0, 1, 1, 1], [0, 0, 1, 6, 5, 5, 6, 6, 5, 5, 6, 1, 0, 0], [1, 1, 1, 0, 5, 1, 0, 0, 1, 4, 0, 1, 0, 0], [1, 3, 0, 5, 5, 5, 0, 24, 4, 4, 4, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 6, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0]];
l_20_start = "down";
l_20_change = "spikey";
l_20_name = "Double Spikey";
l_21 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 0, 4, 0, 0, 1, 5, 0, 5, 4, 1], [1, 1, 1, 0, 0, 25, 5, 0, 25, 5, 0, 1], [1, 0, 0, 0, 4, 5, 6, 25, 4, 6, 5, 1], [1, 0, 0, 0, 5, 4, 4, 5, 0, 0, 0, 1], [1, 5, 6, 4, 25, 6, 5, 4, 0, 0, 0, 1], [1, 0, 5, 25, 0, 5, 25, 0, 0, 1, 1, 1], [1, 4, 5, 0, 5, 1, 0, 0, 4, 0, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
l_21_start = "right";
l_21_name = "Oh No! More Gems!";
l_22 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 6, 4, 6, 4, 6, 4, 6, 4, 1], [1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1], [1, 5, 6, 4, 6, 5, 6, 4, 6, 5, 1], [1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1], [1, 4, 6, 4, 6, 4, 6, 5, 6, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 26, 26, 26, 26, 26, 26, 26, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]];
l_22_start = "right";
l_22_change = "tries";
l_22_name = "Just Seven";
l_23 = [[0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 5, 2, 1, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 5, 4, 6, 5, 0, 4, 0, 0, 4, 0, 1], [1, 6, 0, 1, 0, 6, 7, 6, 6, 0, 4, 1], [1, 5, 6, 5, 0, 7, 0, 5, 1, 6, 0, 1], [1, 6, 5, 4, 0, 6, 6, 6, 4, 6, 4, 1], [1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 3, 5, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0]];
l_23_start = "left";
l_23_change = "diamond";
l_23_name = "Temptation";
l_24 = [[0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0], [0, 0, 1, 6, 1, 0, 1, 3, 1, 0, 0], [1, 1, 1, 7, 1, 1, 1, 5, 1, 1, 1], [1, 1, 0, 0, 4, 6, 5, 0, 0, 1, 1], [1, 6, 5, 23, 0, 4, 0, 23, 4, 6, 1], [1, 8, 6, 4, 6, 2, 6, 5, 6, 7, 1], [1, 7, 8, 0, 5, 8, 4, 0, 7, 8, 1], [1, 1, 1, 7, 0, 0, 0, 8, 1, 1, 1], [0, 0, 1, 1, 0, 6, 0, 1, 1, 0, 0], [0, 0, 0, 1, 6, 1, 6, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0]];
l_24_start = "up";
l_24_name = "Mirror Mania";
l_25 = [[0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 18, 18, 18, 18, 1, 0, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 0, 0, 5, 4, 0, 0, 1, 0, 0], [1, 1, 1, 0, 5, 5, 4, 4, 0, 1, 1, 1], [1, 0, 0, 5, 18, 18, 18, 18, 4, 0, 0, 1], [1, 5, 5, 5, 0, 8, 7, 0, 4, 4, 4, 1], [1, 2, 5, 0, 5, 0, 0, 4, 0, 4, 3, 1], [1, 1, 1, 1, 1, 17, 17, 1, 1, 1, 1, 1], [0, 0, 0, 1, 6, 8, 7, 6, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0]];
l_25_start = "right";
l_25_num = [[1, 4, 2], [1, 5, 9], [1, 6, 0], [1, 7, 4]];
l_25_equal = [[5, 4, 2], [5, 5, 9], [5, 6, 0], [5, 7, 4]];
l_25_name = "MMCMIV";
l_26 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 5, 6, 5, 5, 5, 5, 6, 5, 1], [1, 5, 5, 5, 5, 6, 5, 6, 5, 6, 1], [1, 6, 5, 5, 5, 5, 5, 5, 5, 5, 1], [1, 6, 5, 5, 1, 1, 1, 1, 5, 5, 1], [1, 3, 5, 6, 1, 2, 9, 10, 5, 6, 1], [1, 6, 5, 5, 1, 1, 1, 1, 5, 5, 1], [1, 6, 5, 5, 5, 5, 5, 6, 5, 5, 1], [1, 5, 5, 6, 5, 5, 6, 5, 6, 5, 1], [1, 1, 5, 5, 5, 6, 5, 5, 5, 5, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
l_26_start = "right";
l_26_name = "Glacier";
l_27 = [[0, 0, 0, 1, 1, 1, 1, 0, 0, 0], [0, 0, 1, 1, 2, 6, 1, 0, 0, 0], [1, 1, 1, 5, 6, 5, 1, 1, 1, 1], [1, 5, 5, 6, 5, 5, 6, 5, 6, 1], [1, 5, 6, 5, 5, 6, 5, 6, 5, 1], [1, 6, 5, 6, 5, 5, 6, 5, 5, 1], [1, 1, 1, 1, 5, 6, 5, 1, 1, 1], [0, 0, 0, 1, 5, 3, 1, 1, 0, 0], [0, 0, 0, 1, 1, 1, 1, 0, 0, 0]];
l_27_start = "down";
l_27_change = "vanish";
l_27_name = "Vanishing Trick";
Frame 5
function run() {
if (gdie) {
if ((dieTime + 1000) < getTimer()) {
restartLevel();
} else {
return(undefined);
}
}
if (this.level_show && ((showtime + 1500) < getTimer())) {
removeMovieClip(level_show);
} else if (getTimer() < (showtime + 1500)) {
return(undefined);
}
if (this.level_comp && ((comptime + 1000) < getTimer())) {
removeMovieClip(level_comp);
level++;
makeMap(level);
} else if (getTimer() < (comptime + 1000)) {
return(undefined);
}
if ((change == "time") && (getTimer() >= (lastTime + 3000))) {
var y = 0;
while (y < mapH) {
var x = 0;
while (x < mapW) {
var type = cMap[y][x];
if (type == 7) {
cMap[y][x] = 8;
this.con[(("t" + y) + "_") + x].gotoAndStop(9);
}
if (type == 8) {
cMap[y][x] = 7;
this.con[(("t" + y) + "_") + x].gotoAndStop(8);
}
x++;
}
y++;
}
lastTime = getTimer();
}
if (mDown) {
var moy = _root.con._ymouse;
var mox = _root.con._xmouse;
var ry = Math.floor(moy / tileS);
var rx = Math.floor(mox / tileS);
var tileType = cMap[ry][rx];
if (tileType == 4) {
cMap[ry][rx] = 5;
this.con[(("t" + ry) + "_") + rx].gotoAndStop(6);
if (change == "tries") {
minusTries();
}
if ((level == 1) && (diamond < diamondsNeeded)) {
this.attachMovie("tut", "tut", 2);
this.tut.gotoAndStop(3);
this.tut._y = 280;
this.tut._x = 330;
}
}
if (tileType == 5) {
cMap[ry][rx] = 4;
this.con[(("t" + ry) + "_") + rx].gotoAndStop(5);
if (change == "tries") {
minusTries();
}
}
if ((tileType == 2) && (started)) {
restartlevel();
mDown = false;
return(undefined);
}
if ((tileType == 2) && (!started)) {
this.con.attachMovie("ball", "ball", 1000);
bally = (ry * tileS) + (tileS / 2);
ballx = (rx * tileS) + (tileS / 2);
this.con.ball._y = bally;
this.con.ball._x = ballx;
if (startDir == "down") {
my = 1;
}
if (startDir == "up") {
my = -1;
}
if (startDir == "left") {
mx = -1;
}
if (startDir == "right") {
mx = 1;
}
started = true;
this.con[(("t" + ry) + "_") + rx].a.gotoAndStop("still");
if (level == 1) {
this.attachMovie("tut", "tut", 2);
this.tut.gotoAndStop(2);
this.tut._y = 200;
this.tut._x = 320;
}
}
mDown = false;
}
if (!started) {
if (level == 1) {
this.attachMovie("tut", "tut", 2);
this.tut.gotoAndStop(1);
this.tut._y = 90;
this.tut._x = 300;
}
return(undefined);
}
bally = bally + (my * speed);
ballx = ballx + (mx * speed);
ontiley = Math.floor(bally / tileS);
ontilex = Math.floor(ballx / tileS);
offsety = (bally / tileS) - ontiley;
offsetx = (ballx / tileS) - ontilex;
if ((offsety == 0.5) && (offsetx == 0.5)) {
var tileType = cMap[ontiley][ontilex];
if ((tiletype == 4) || (tiletype == 7)) {
playSound("mirror");
var f = false;
if ((change == "impact") && (tiletype == 7)) {
changeImpact();
}
if ((change == "freeze") && (tiletype == 4)) {
changeFreeze(ontiley, ontilex);
}
if ((my == 1) && (!f)) {
my = 0;
mx = 1;
f = true;
}
if ((my == -1) && (!f)) {
my = 0;
mx = -1;
f = true;
}
if ((mx == 1) && (!f)) {
my = 1;
mx = 0;
f = true;
}
if ((mx == -1) && (!f)) {
my = -1;
mx = 0;
f = true;
}
if ((change == "vanish") && (tiletype == 4)) {
cMap[ontiley][ontilex] = 0;
this.con[(("t" + ontiley) + "_") + ontilex].gotoAndStop(1);
}
}
if ((tiletype == 5) || (tiletype == 8)) {
playSound("mirror");
var f = false;
if ((change == "impact") && (tiletype == 8)) {
changeImpact();
}
if ((change == "freeze") && (tiletype == 5)) {
changeFreeze(ontiley, ontilex);
}
if ((my == 1) && (!f)) {
my = 0;
mx = -1;
f = true;
}
if ((my == -1) && (!f)) {
my = 0;
mx = 1;
f = true;
}
if ((mx == 1) && (!f)) {
my = -1;
mx = 0;
f = true;
}
if ((mx == -1) && (!f)) {
my = 1;
mx = 0;
f = true;
}
if ((change == "vanish") && (tiletype == 5)) {
cMap[ontiley][ontilex] = 0;
this.con[(("t" + ontiley) + "_") + ontilex].gotoAndStop(1);
}
}
if (tiletype == 6) {
cMap[ontiley][ontilex] = 0;
this.con[(("t" + ontiley) + "_") + ontilex].gotoAndStop(1);
playSound("diamond");
diamond++;
checkDiamonds();
if (change == "diamond") {
changeImpact();
}
}
if (((tiletype == 9) || (tiletype == 10)) && (!freeze)) {
freezeAll();
freeze = true;
}
if (tiletype == 12) {
changeImpact();
}
if (tiletype == 13) {
changeBlock();
}
if (tiletype == 15) {
changeLight(ontilex);
}
if ((tiletype == 18) && (!numSolved)) {
changeNum(ontiley, ontilex);
}
if (tiletype == 20) {
controlSpikey(my, mx);
}
if ((tiletype == 21) || (tiletype == 24)) {
restartLevel();
}
if (tiletype == 23) {
changeFrozen();
}
if (tiletype == 25) {
randomGem();
}
if ((change == "spikey") && ((lastSpikeyMove + 800) < getTimer())) {
moveAllSpikeys(ontiley, ontilex);
lastSpikeyMove = getTimer();
}
if ((tiletype == 3) && (diamond == diamondsNeeded)) {
this.attachMovie("level_show", "level_comp", 2);
this.level_comp._x = 300;
this.level_comp._y = 175;
this.level_comp.gotoAndStop(2);
comptime = getTimer();
}
if (guns) {
checkGuns(ontiley, ontilex);
}
}
var tiletype = cMap[ontiley][ontilex];
if (((((tiletype == 1) || (tiletype == 11)) || (tiletype == 200)) || (tiletype == 17)) || (tiletype == 19)) {
var f = false;
if ((my == 1) && (!f)) {
bally = bally - (my * speed);
my = -1;
f = true;
playSound("wall");
if (tiletype == 11) {
this.con[(("t" + ontiley) + "_") + ontilex].a.gotoAndPlay("down");
this.con[(("t" + ontiley) + "_") + ontilex].a.y = ontiley;
this.con[(("t" + ontiley) + "_") + ontilex].a.x = ontilex;
}
}
if ((my == -1) && (!f)) {
bally = bally - (my * speed);
my = 1;
f = true;
playSound("wall");
if (tiletype == 11) {
this.con[(("t" + ontiley) + "_") + ontilex].a.gotoAndPlay("up");
this.con[(("t" + ontiley) + "_") + ontilex].a.y = ontiley;
this.con[(("t" + ontiley) + "_") + ontilex].a.x = ontilex;
}
}
if ((mx == 1) && (!f)) {
ballx = ballx - (mx * speed);
mx = -1;
f = true;
playSound("wall");
if (tiletype == 19) {
this.con[(("t" + ontiley) + "_") + ontilex].a.gotoAndPlay("right");
this.con[(("t" + ontiley) + "_") + ontilex].a.y = ontiley;
this.con[(("t" + ontiley) + "_") + ontilex].a.x = ontilex;
}
}
if ((mx == -1) && (!f)) {
ballx = ballx - (mx * speed);
mx = 1;
f = true;
playSound("wall");
if (tiletype == 19) {
this.con[(("t" + ontiley) + "_") + ontilex].a.gotoAndPlay("left");
this.con[(("t" + ontiley) + "_") + ontilex].a.y = ontiley;
this.con[(("t" + ontiley) + "_") + ontilex].a.x = ontilex;
}
}
}
this.con.ball._y = bally;
this.con.ball._x = ballx;
}
function checkDiamonds() {
if (diamond < diamondsNeeded) {
return(undefined);
}
if (diamond >= diamondsNeeded) {
var y = mapH;
while (y >= 0) {
var x = mapW;
while (x >= 0) {
var type = cMap[y][x];
if (type == 3) {
this.con[(("t" + y) + "_") + x].a.gotoAndPlay("anim");
if (level == 1) {
this.attachMovie("tut", "tut", 2);
this.tut.gotoAndStop(4);
this.tut._y = 310;
this.tut._x = 330;
}
break;
}
x--;
}
y--;
}
}
}
function minusTries() {
var left = false;
var found = false;
var y = mapH;
while (y >= 0) {
var x = mapW;
while (x >= 0) {
var type = cMap[y][x];
if ((type == 26) && (found)) {
left = true;
break;
}
if ((type == 26) && (!found)) {
this.con[(("t" + y) + "_") + x].gotoAndStop(1);
cMap[y][x] = 0;
found = true;
}
x--;
}
y--;
}
if (!left) {
freezeAll();
}
}
function randomGem() {
var temparray = [];
var cc = 0;
var y = 0;
while (y < mapH) {
var x = 0;
while (x < mapW) {
var type = cMap[y][x];
if (type == 0) {
temparray[cc] = [x, y];
cc++;
}
x++;
}
y++;
}
var num = random(temparray.length);
var gx = temparray[num][0];
var gy = temparray[num][1];
cMap[gy][gx] = 6;
this.con[(("t" + gy) + "_") + gx].gotoAndStop(7);
diamondsNeeded++;
}
function moveAllSpikeys(ony, onx) {
var y = 0;
while (y < mapH) {
var x = 0;
for ( ; x < mapW ; x++) {
var type = cMap[y][x];
if (type == 24) {
if (onx < x) {
if (cMap[y][x - 1] == 0) {
this.con[(("t" + y) + "_") + x].a.y = y;
this.con[(("t" + y) + "_") + x].a.x = x;
cMap[y][x - 1] = 300;
this.con[(("t" + y) + "_") + x].a.gotoAndPlay("left");
continue;
}
} else if (x < onx) {
if (cMap[y][x + 1] == 0) {
this.con[(("t" + y) + "_") + x].a.y = y;
this.con[(("t" + y) + "_") + x].a.x = x;
cMap[y][x + 1] = 300;
this.con[(("t" + y) + "_") + x].a.gotoAndPlay("right");
continue;
}
} else if (ony < y) {
if (cMap[y - 1][x] == 0) {
this.con[(("t" + y) + "_") + x].a.y = y;
this.con[(("t" + y) + "_") + x].a.x = x;
cMap[y - 1][x] = 300;
this.con[(("t" + y) + "_") + x].a.gotoAndPlay("up");
continue;
}
} else if (y < ony) {
if (cMap[y + 1][x] == 0) {
this.con[(("t" + y) + "_") + x].a.y = y;
this.con[(("t" + y) + "_") + x].a.x = x;
cMap[y + 1][x] = 300;
this.con[(("t" + y) + "_") + x].a.gotoAndPlay("down");
}
}
if (ony < y) {
if (cMap[y - 1][x] == 0) {
this.con[(("t" + y) + "_") + x].a.y = y;
this.con[(("t" + y) + "_") + x].a.x = x;
cMap[y - 1][x] = 300;
this.con[(("t" + y) + "_") + x].a.gotoAndPlay("up");
continue;
}
} else if (y < ony) {
if (cMap[y + 1][x] == 0) {
this.con[(("t" + y) + "_") + x].a.y = y;
this.con[(("t" + y) + "_") + x].a.x = x;
cMap[y + 1][x] = 300;
this.con[(("t" + y) + "_") + x].a.gotoAndPlay("down");
}
}
}
}
y++;
}
}
function changeFrozen() {
var y = 0;
while (y < mapH) {
var x = 0;
while (x < mapW) {
var type = cMap[y][x];
if (type == 4) {
this.con[(("t" + y) + "_") + x].gotoAndStop(8);
cMap[y][x] = 7;
}
if (type == 5) {
this.con[(("t" + y) + "_") + x].gotoAndStop(9);
cMap[y][x] = 8;
}
if (type == 7) {
this.con[(("t" + y) + "_") + x].gotoAndStop(5);
cMap[y][x] = 4;
}
if (type == 8) {
this.con[(("t" + y) + "_") + x].gotoAndStop(6);
cMap[y][x] = 5;
}
x++;
}
y++;
}
}
function changeFreeze(y, x) {
var type = cMap[y][x];
if (type == 4) {
this.con[(("t" + y) + "_") + x].gotoAndStop(8);
cMap[y][x] = 7;
}
if (type == 5) {
this.con[(("t" + y) + "_") + x].gotoAndStop(9);
cMap[y][x] = 8;
}
}
function checkGuns(ony, onx) {
var found = false;
var y = 0;
while (y < mapH) {
var type = cMap[y][onx];
if (type == 22) {
found = true;
}
y++;
}
if (!found) {
return(undefined);
}
var die = true;
var y = ony;
while (y < mapH) {
var type = cMap[y][onx];
if ((type != 0) && (type != 22)) {
die = false;
break;
}
if (type == 22) {
this.con[(("t" + y) + "_") + onx].a.gotoAndStop(2);
die = true;
break;
}
y++;
}
if (die) {
started = false;
gdie = true;
dieTime = getTimer();
}
}
function restartLevel() {
call("maps");
removeMovieClip(this.con.ball);
makeMap(level);
}
function controlSpikey(my, mx) {
var dir;
if (my < 0) {
dir = "up";
} else if (0 < my) {
dir = "down";
} else if (mx < 0) {
dir = "left";
} else if (0 < mx) {
dir = "right";
}
var y = 0;
while (y < mapH) {
var x = 0;
while (x < mapW) {
var type = cMap[y][x];
if (type == 21) {
this.con[(("t" + y) + "_") + x].a.y = y;
this.con[(("t" + y) + "_") + x].a.x = x;
this.con[(("t" + y) + "_") + x].a.gotoAndPlay(dir);
break;
}
x++;
}
y++;
}
}
function changeNum(y, x) {
var n = ((("t" + y) + "_") + x);
var frame = this.con[n].a._currentframe;
if (frame == 10) {
this.con[n].a.gotoAndStop(1);
} else {
this.con[n].a.gotoAndStop(Number(frame + 1));
}
checkNums();
}
function checkNums() {
var correct = true;
var i = 0;
while (i < equal.length) {
var n = ((("t" + equal[i][0]) + "_") + equal[i][1]);
var num1 = (this.con[n].a._currentframe - 1);
var num2 = equal[i][2];
if (num1 != num2) {
correct = false;
}
i++;
}
if (correct) {
numSolved = true;
openDoors();
if (level == 25) {
changeFrozen();
}
}
}
function changeLight(x) {
if ((lastChange + 500) < getTimer()) {
var y = 0;
while (y < mapH) {
var type = cMap[y][x];
if (type == 16) {
if (this.con[(("t" + y) + "_") + x].a._currentframe == 1) {
this.con[(("t" + y) + "_") + x].a.gotoAndStop(2);
} else if (this.con[(("t" + y) + "_") + x].a._currentframe == 2) {
this.con[(("t" + y) + "_") + x].a.gotoAndStop(1);
}
lastChange = getTimer();
}
y++;
}
checkAllLights();
}
}
function openDoors() {
var y = 0;
while (y < mapH) {
var x = 0;
while (x < mapW) {
var type = cMap[y][x];
if (type == 17) {
cMap[y][x] = 300;
this.con[(("t" + y) + "_") + x].gotoAndStop(1);
}
x++;
}
y++;
}
}
function closeDoors() {
var y = 0;
while (y < mapH) {
var x = 0;
while (x < mapW) {
var type = cMap[y][x];
if (type == 300) {
cMap[y][x] = 17;
this.con[(("t" + y) + "_") + x].gotoAndStop(18);
}
x++;
}
y++;
}
}
function checkAllLights() {
var open = true;
var y = 0;
while (y < mapH) {
var x = 0;
while (x < mapW) {
var type = cMap[y][x];
if (type == 16) {
if (this.con[(("t" + y) + "_") + x].a._currentframe == 1) {
open = false;
break;
}
}
x++;
}
y++;
}
if (open) {
openDoors();
} else {
closeDoors();
}
}
function freezeAll() {
var y = 0;
while (y < mapH) {
var x = 0;
while (x < mapW) {
var type = cMap[y][x];
if (type == 4) {
cMap[y][x] = 7;
this.con[(("t" + y) + "_") + x].gotoAndStop(8);
}
if (type == 5) {
cMap[y][x] = 8;
this.con[(("t" + y) + "_") + x].gotoAndStop(9);
}
x++;
}
y++;
}
}
function changeImpact() {
var y = 0;
while (y < mapH) {
var x = 0;
while (x < mapW) {
var type = cMap[y][x];
if (type == 7) {
cMap[y][x] = 8;
this.con[(("t" + y) + "_") + x].gotoAndStop(9);
}
if (type == 8) {
cMap[y][x] = 7;
this.con[(("t" + y) + "_") + x].gotoAndStop(8);
}
x++;
}
y++;
}
}
function changeBlock() {
var y = 0;
while (y < mapH) {
var x = 0;
while (x < mapW) {
var type = cMap[y][x];
if (type == 14) {
cMap[y][x] = 200;
this.con[(("t" + y) + "_") + x].a.gotoAndStop("show");
}
if (type == 200) {
cMap[y][x] = 14;
this.con[(("t" + y) + "_") + x].a.gotoAndStop("hide");
}
x++;
}
y++;
}
}
function playSound(id) {
if (!soundon) {
return(undefined);
}
if ((stime + 100) < getTimer()) {
var s = new Sound(this);
s.attachSound(id);
s.start();
stime = getTimer();
}
}
function makeMap(level) {
if (level == 28) {
gotoAndStop (7);
return(undefined);
}
mx = (my = 0);
guns = false;
gdie = false;
started = false;
freeze = false;
cMap = eval ("l_" + level);
startDir = eval (("l_" + level) + "_start");
change = eval (("l_" + level) + "_change");
num = eval (("l_" + level) + "_num");
equal = eval (("l_" + level) + "_equal");
guns = eval (("l_" + level) + "_guns");
numSolved = false;
mapH = cMap.length;
mapW = cMap[0].length;
diamond = 0;
diamondsNeeded = 0;
this.attachMovie("empty", "con", 1);
var d = 0;
outlevel = "Level " + level;
outCode = "Code: " + passA[level - 1].toString();
var y = 0;
while (y < mapH) {
var x = 0;
while (x < mapW) {
var n = ((("t" + y) + "_") + x);
this.con.attachMovie("tile", n, ++d);
this.con[n]._y = y * tileS;
this.con[n]._x = x * tileS;
this.con[n].gotoAndStop(Number(cMap[y][x] + 1));
if (cMap[y][x] == 6) {
diamondsNeeded++;
}
x++;
}
y++;
}
lastTime = getTimer();
var i = 0;
while (i < num.length) {
var n = ((("t" + num[i][0]) + "_") + num[i][1]);
this.con[n].a.gotoAndStop(Number(num[i][2] + 1));
i++;
}
var w = this.con._width;
var h = this.con._height;
this.con._x = (600 - w) / 2;
this.con._y = (400 - h) / 2;
this.attachMovie("level_show", "level_show", 2);
this.level_show._x = 300;
this.level_show._y = 175;
this.level_show.level = outLevel;
this.level_show.name = ("'" + eval (("l_" + level) + "_name")) + "'";
showtime = getTimer();
}
_quality = "LOW";
outLevel = "Level " + level;
stop();
tileS = 32;
speed = 4;
_root.soundon = true;
makeMap(level);
Instance of Symbol 131 MovieClip [empty] in Frame 5
onClipEvent (enterFrame) {
_parent.run();
}
onClipEvent (mouseDown) {
_parent.mDown = true;
}
onClipEvent (mouseUp) {
_parent.mDown = false;
}
Frame 6
stop();
getURL ("http://oos.moxiecode.com/examples/reflex/", "_top");
Frame 7
removeMovieClip(this.con);
stop();
Instance of Symbol 130 MovieClip [empty] in Frame 7
onClipEvent (load) {
tm = getTimer();
}
onClipEvent (mouseDown) {
if ((tm + 1000) < getTimer()) {
_parent.gotoAndStop(2);
}
}
Frame 8
function checkPassword() {
var found = 0;
var i = 0;
while (i < passA.length) {
if (password.toString() == passA[i].toString()) {
found = i;
break;
}
i++;
}
level = found + 1;
gotoAndPlay (3);
}
stop();
pressed = false;
Symbol 42 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 20
gotoAndPlay (1);
Symbol 53 MovieClip Frame 21
stop();
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 25
gotoAndPlay (6);
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 2
if (_root.cMap[y - 1][x] != 0) {
gotoAndStop (1);
}
Symbol 76 MovieClip Frame 17
_root.cMap[y][x] = 0;
_root.cMap[y - 1][x] = 11;
_root.con[(("t" + (y - 1)) + "_") + x].gotoAndStop(12);
stop();
_parent.gotoAndStop(1);
Symbol 76 MovieClip Frame 18
if (_root.cMap[y + 1][x] != 0) {
gotoAndStop (1);
}
Symbol 76 MovieClip Frame 34
_root.cMap[y][x] = 0;
_root.cMap[y + 1][x] = 11;
_root.con[(("t" + (y + 1)) + "_") + x].gotoAndStop(12);
stop();
_parent.gotoAndStop(1);
Symbol 81 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 2
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 2
stop();
Symbol 89 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 2
if (_root.cMap[y][x - 1] != 0) {
gotoAndStop (1);
}
Symbol 89 MovieClip Frame 17
_root.cMap[y][x] = 0;
_root.cMap[y][x - 1] = 19;
_root.con[(("t" + y) + "_") + (x - 1)].gotoAndStop(20);
stop();
_parent.gotoAndStop(1);
Symbol 89 MovieClip Frame 18
if (_root.cMap[y][x + 1] != 0) {
gotoAndStop (1);
}
Symbol 89 MovieClip Frame 34
_root.cMap[y][x] = 0;
_root.cMap[y][x + 1] = 19;
_root.con[(("t" + y) + "_") + (x + 1)].gotoAndStop(20);
stop();
_parent.gotoAndStop(1);
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 2
if (_root.cMap[y - 1][x] != 0) {
gotoAndStop (1);
}
Symbol 95 MovieClip Frame 10
_root.cMap[y][x] = 0;
_root.cMap[y - 1][x] = 21;
_root.con[(("t" + (y - 1)) + "_") + x].gotoAndStop(22);
stop();
_parent.gotoAndStop(1);
Symbol 95 MovieClip Frame 11
if (_root.cMap[y][x + 1] != 0) {
gotoAndStop (1);
}
Symbol 95 MovieClip Frame 19
_root.cMap[y][x] = 0;
_root.cMap[y][x + 1] = 21;
_root.con[(("t" + y) + "_") + (x + 1)].gotoAndStop(22);
stop();
_parent.gotoAndStop(1);
Symbol 95 MovieClip Frame 20
if (_root.cMap[y + 1][x] != 0) {
gotoAndStop (1);
}
Symbol 95 MovieClip Frame 28
_root.cMap[y][x] = 0;
_root.cMap[y + 1][x] = 21;
_root.con[(("t" + (y + 1)) + "_") + x].gotoAndStop(22);
stop();
_parent.gotoAndStop(1);
Symbol 95 MovieClip Frame 29
if (_root.cMap[y][x - 1] != 0) {
gotoAndStop (1);
}
Symbol 95 MovieClip Frame 37
_root.cMap[y][x] = 0;
_root.cMap[y][x - 1] = 21;
_root.con[(("t" + y) + "_") + (x - 1)].gotoAndStop(22);
stop();
_parent.gotoAndStop(1);
Symbol 100 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 2
_root.cMap[y - 1][x] = 24;
Symbol 101 MovieClip Frame 10
_root.cMap[y][x] = 0;
_root.con[(("t" + (y - 1)) + "_") + x].gotoAndStop(25);
stop();
_parent.gotoAndStop(1);
Symbol 101 MovieClip Frame 11
_root.cMap[y][x + 1] = 24;
Symbol 101 MovieClip Frame 19
_root.cMap[y][x] = 0;
_root.con[(("t" + y) + "_") + (x + 1)].gotoAndStop(25);
stop();
_parent.gotoAndStop(1);
Symbol 101 MovieClip Frame 20
_root.cMap[y + 1][x] = 24;
Symbol 101 MovieClip Frame 28
_root.cMap[y][x] = 0;
_root.con[(("t" + (y + 1)) + "_") + x].gotoAndStop(25);
stop();
_parent.gotoAndStop(1);
Symbol 101 MovieClip Frame 29
_root.cMap[y][x - 1] = 24;
Symbol 101 MovieClip Frame 37
_root.cMap[y][x] = 0;
_root.con[(("t" + y) + "_") + (x - 1)].gotoAndStop(25);
stop();
_parent.gotoAndStop(1);
Symbol 109 Button
on (release) {
_parent.chooseLevel(level);
}
Symbol 120 MovieClip [level_show] Frame 1
stop();
Symbol 129 MovieClip [tut] Frame 1
stop();
Symbol 146 Button
on (release) {
gotoAndPlay (3);
}
Symbol 149 Button
on (release) {
gotoAndStop (8);
}
Symbol 160 Button
on (release) {
gotoAndStop (2);
_root.soundon = false;
}
Symbol 163 Button
on (release) {
gotoAndStop (1);
_root.soundon = true;
}
Symbol 164 MovieClip Frame 1
stop();
Symbol 180 Button
on (release, keyPress "<Enter>") {
if (!pressed) {
checkPassword();
pressed = true;
}
}