Frame 1
stop();
_global.livello = 1;
_global.lastlivello = 6;
var snd_musica = new Sound();
snd_musica.attachSound("s_musica");
snd_musica.start(0, 99);
titolo.onRelease = function () {
snd_musica.stop();
gotoAndStop (2);
};
howTo.onRelease = function () {
snd_musica.stop();
gotoAndStop (5);
};
_global.livello1 = function () {
startX = 318;
startY = 336;
grid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 14, 12, 13, 12, 14, 13, 14, 12, 14, 13, 14, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 18, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 23, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 23, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 0, 27, 17, 15, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 17, 16, 17, 15, 16, 15, 17, 15, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 14, 12, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 19, 0, 0, 26, 13, 12, 14, 14, 12, 14, 13, 14, 12, 14, 14, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 14, 14, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 22, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 18, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 15, 15, 16, 17, 16, 24, 0, 0, 0, 0, 0, 27, 17, 16, 15, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 19, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 0, 21, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 19, 0, 0, 0, 0, 0, 23, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 14, 14, 12, 14, 13, 14, 12, 14, 13, 14, 14, 12, 14, 13, 14, 14, 12, 14, 13, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 20, 0, 0, 0, 0, 0, 27, 16, 17, 16, 24, 0, 0, 0, 0, 0, 0, 0, 43, 0, 23, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 18, 0, 0, 0, 0, 31, 14, 13, 12, 13, 12, 17, 29, 0, 0, 0, 0, 27, 15, 16, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 16, 24, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 19, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 16, 17, 15, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 33, 13, 33, 19, 0, 0, 0, 31, 29, 0, 0, 0, 0, 0, 21, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 20, 0, 26, 25, 0, 0, 0, 0, 0, 0, 31, 29, 0, 0, 22, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 33, 15, 17, 16, 15, 16, 17, 15, 17, 16, 15, 17, 15, 15, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 14, 12, 14, 13, 14, 12, 14, 14, 13, 12, 14, 14, 33, 33, 33, 33, 14, 14, 12, 14, 14, 13, 14, 14, 12, 14, 14, 14, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 14, 13, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 15, 15, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 15, 16, 16, 24, 0, 0, 0, 0, 0, 27, 16, 16, 33, 33, 33, 33, 15, 16, 24, 0, 0, 0, 0, 0, 0, 27, 15, 16, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 19, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 19, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 21, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 21, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 19, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 0, 31, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 26, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 26, 12, 13, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 25, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 0, 43, 23, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 29, 0, 0, 0, 0, 0, 0, 27, 15, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 19, 0, 0, 0, 0, 0, 0, 0, 21, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 34, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 21, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 19, 0, 0, 0, 0, 31, 29, 0, 23, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 24, 0, 0, 0, 0, 0, 27, 33, 33, 33, 33, 33, 33, 33, 33, 33, 24, 0, 0, 0, 0, 0, 27, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 19, 0, 0, 0, 0, 27, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 26, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 24, 0, 0, 0, 27, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 24, 0, 0, 0, 0, 21, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 15, 17, 16, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 15, 17, 15, 16, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
};
_global.livello4 = function () {
startX = 1518;
startY = 336;
grid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 14, 12, 14, 13, 13, 14, 12, 14, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 18, 0, 0, 0, 34, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 19, 0, 0, 0, 0, 31, 29, 0, 0, 26, 33, 33, 33, 33, 33, 33, 33, 33, 13, 12, 14, 33, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 19, 0, 0, 0, 0, 0, 0, 0, 31, 17, 33, 33, 33, 33, 33, 33, 33, 19, 0, 0, 0, 21, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 18, 0, 0, 0, 0, 0, 31, 29, 0, 26, 13, 12, 14, 13, 14, 12, 14, 25, 0, 0, 0, 26, 13, 12, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 19, 0, 31, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 17, 15, 16, 15, 17, 15, 16, 17, 15, 16, 24, 0, 0, 0, 0, 27, 16, 17, 15, 17, 24, 0, 0, 22, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 0, 0, 22, 33, 33, 33, 33, 19, 0, 0, 22, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 19, 0, 0, 0, 0, 21, 33, 33, 33, 33, 20, 0, 0, 21, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 22, 33, 14, 14, 13, 25, 0, 0, 23, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 17, 24, 0, 0, 23, 18, 43, 0, 0, 0, 0, 0, 22, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 21, 33, 24, 0, 0, 0, 0, 0, 23, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 19, 0, 0, 21, 33, 33, 15, 17, 15, 17, 15, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 22, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 18, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 19, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 17, 16, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 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 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
};
_global.livello3 = function () {
startX = 510;
startY = 336;
grid = [[0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 14, 12, 13, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 12, 25, 0, 0, 0, 21, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 34, 22, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 14, 12, 14, 13, 13, 14, 12, 14, 13, 14, 12, 14, 14, 13, 12, 13, 13, 14, 12, 14, 13, 12, 25, 0, 0, 0, 0, 27, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 17, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 17, 15, 16, 24, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 27, 17, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 20, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 21, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 13, 13, 12, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 19, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 15, 15, 17, 15, 17, 15, 17, 15, 15, 17, 16, 15, 17, 15, 17, 15, 17, 16, 15, 15, 15, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
};
Frame 2
stop();
waitStart = 0;
livelloText.text = "Level " + _global.livello;
if (_global.livello > _global.lastlivello) {
gotoAndStop (4);
} else {
onEnterFrame = function () {
waitStart = waitStart + 1;
if (waitStart > 130) {
gotoAndStop (3);
}
if (Math.floor((waitStart / 10) % 2) == 0) {
livelloText._alpha = 0;
} else {
livelloText._alpha = 100;
}
};
}
Frame 3
function creaPlayer() {
outScreen.attachMovie("milanPl", "player", outScreen.getNextHighestDepth());
outScreen.player.xx = startX;
outScreen.player.yy = startY;
outScreen.player.vx = 1.5;
outScreen.player.vy = 0;
outScreen.player.onFloor = false;
outScreen.player.hoChiave = false;
outScreen.player.onEnterFrame = function () {
this._x = this.xx - offx;
this._y = this.yy - offy;
if (grido[Math.floor(this.yy / tileWidth)][Math.floor(this.xx / tileWidth)] == 0) {
this.vy = this.vy + 0.1;
}
if (this.onFreezo) {
this.vy = 0;
}
if (grido[Math.floor(this.yy / tileWidth)][Math.floor(this.xx / tileWidth)] == 1) {
this.yy = Math.floor(this.yy / tileWidth) * tileWidth;
this.vy = 0;
this.onFloor = true;
}
if (grido[Math.floor((this.yy - (tileWidth / 2)) / tileWidth)][Math.floor((this.xx + (tileWidth / 3)) / tileWidth)] == 1) {
if (this.vx > 0) {
this.vx = this.vx * -1;
snd_muro.start(0, 1);
}
}
if (grido[Math.floor((this.yy - (tileWidth / 2)) / tileWidth)][Math.floor((this.xx - (tileWidth / 3)) / tileWidth)] == 1) {
if (this.vx < 0) {
this.vx = this.vx * -1;
snd_muro.start(0, 1);
}
}
if (grido[Math.floor((this.yy + (tileWidth / 3)) / tileWidth) - 1][Math.floor(this.xx / tileWidth)] == 1) {
if (this.vy < 0) {
this.vy = 0;
}
}
if (vittoria == false) {
if (this.vx >= 0) {
this._xscale = 100;
} else {
this._xscale = -100;
}
if ((this.vy != 0) and (this._currentframe < 21)) {
this.gotoAndPlay(21);
}
if ((this.vy == 0) and (this._currentframe > 20)) {
this.gotoAndPlay(1);
}
}
if (((Key.isDown(90) and (this.vy == 0)) and (this.onFloor == true)) and (vittoria == false)) {
this.vy = -2.5;
this.onFloor = false;
this.pusho = 0;
snd_salto.start(0, 1);
}
if (((Key.isDown(90) and (this.vy < 0)) and (this.pusho < 23)) and (vittoria == false)) {
this.vy = this.vy - 0.1;
this.pusho = this.pusho + 1;
}
if (((Key.isDown(88) and (attendi == 0)) and (dist(startX, startY, this.xx, this.yy) > 60)) and (vittoria == false)) {
biancoEnero();
posXfr = this.xx;
posYfr = this.yy;
this.xx = startX;
this.yy = startY;
this.vx = 1.5;
this.vy = 0;
creaFreezed(posXfr, posYfr);
outScreen["freezo" + numFr].gotoAndStop(this._currentframe);
outScreen["freezo" + numFr]._xscale = this._xscale;
attendi = dist(posXfr, posYfr, this.xx, this.yy) / 5;
snd_musica.stop();
snd_rev.start(0, 1);
snd_musica.suono = false;
}
attendi = curveValue(attendi, 0, 10);
if (attendi > 0) {
if (numFr == 0) {
_root.disp.gotoAndStop(40);
} else {
_root.disp.gotoAndStop(41);
}
}
if (Key.isDown(82) and (attendi == 0)) {
snd_musica.stop();
resettaTutto();
}
if (((dist(ptx, pty, this.xx, this.yy) < 45) and this.hoChiave) and (vittoria == false)) {
snd_musica.stop();
snd_tesoro.start(0, 1);
superScreen.chiave._alpha = 0;
vittoria = true;
this.gotoAndStop(this._currentFrame);
this.vx = 0;
}
if (attendi == 0) {
this.xx = this.xx + this.vx;
this.yy = this.yy + this.vy;
if ((_root.disp._currentframe == 41) or (_root.disp._currentframe == 40)) {
_root.disp.gotoAndPlay(1);
}
if (bn_filter) {
colori();
}
if (snd_musica.suono == false) {
snd_rev.stop();
snd_musica.start(0, 99);
snd_musica.suono = true;
}
}
};
}
function creaFreezed(atx, aty) {
numFr = numFr + 1;
outScreen.attachMovie("freezed", "freezo" + numFr, 5 + numFr);
outScreen["freezo" + numFr].xx = atx;
outScreen["freezo" + numFr].yy = aty;
outScreen["freezo" + numFr].codice = numFr;
ply = outScreen.player;
outScreen["freezo" + numFr].onEnterFrame = function () {
if (this.codice == ply.wFreezo) {
ply.onFreezo = false;
}
if (((((this.xx - 28) < ply.xx) and ((this.xx + 28) > ply.xx)) and ((this.yy - 24) > ply.yy)) and ((this.yy - 42) <= ply.yy)) {
ply.yy = this.yy - 42;
ply.vy = 0;
ply.onFloor = true;
ply.onFreezo = true;
ply.wFreezo = this.codice;
}
if (((((this.xx - 40) < ply.xx) and ((this.xx - 20) > ply.xx)) and ((this.yy + 24) > ply.yy)) and ((this.yy - 35) < ply.yy)) {
if (ply.vx > 0) {
ply.vx = ply.vx * -1;
}
}
if (((((this.xx + 40) > ply.xx) and ((this.xx + 20) < ply.xx)) and ((this.yy + 24) > ply.yy)) and ((this.yy - 35) < ply.yy)) {
if (ply.vx < 0) {
ply.vx = ply.vx * -1;
}
}
if (((((this.xx - 24) < ply.xx) and ((this.xx + 24) > ply.xx)) and ((this.yy + 45) > ply.yy)) and ((this.yy - 10) < ply.yy)) {
if (ply.vy < 0) {
ply.vy = 0;
}
}
};
}
function creaFreccia() {
superScreen.attachMovie("freccia", "freccia", superScreen.getNextHighestDepth());
superScreen.freccia.xx = outScreen.player.xx;
superScreen.freccia.yy = outScreen.player.yy;
superScreen.freccia.onEnterFrame = function () {
this.xx = outScreen.player.xx;
this.yy = outScreen.player.yy - 20;
this._rotation = angolo(this.xx, this.yy, objxx, objyy);
this.disto = dist(this.xx, this.yy, objxx, objyy);
if (this.disto < 100) {
this._alpha = this.disto;
if (this.disto < 70) {
this._alpha = 0;
}
} else {
this._alpha = 100;
}
this._x = this.xx - offx;
this._y = this.yy - offy;
};
}
function creaChiave() {
superScreen.attachMovie("chiave", "chiave", superScreen.getNextHighestDepth());
superScreen.chiave.xx = atx;
superScreen.chiave.yy = aty;
superScreen.chiave.onEnterFrame = function () {
ply = outScreen.player;
if (ply.hoChiave) {
this.xx = ply.xx + outScreen.player.mano._x;
this.yy = ply.yy + outScreen.player.mano._y;
this._xscale = ply._xscale;
}
if ((dist(this.xx + 10, this.yy, ply.xx, ply.yy - 24) < 30) and (ply.hoChiave == false)) {
ply.hoChiave = true;
snd_chiave.start(0, 1);
}
if (ply.hoChiave == false) {
objxx = this.xx;
objyy = this.yy;
} else {
objxx = ptx;
objyy = pty;
}
};
}
function repaintGrid() {
var _local1 = 0;
while (_local1 < tileNumY) {
j = 0;
while (j < tileNumX) {
if ((grid[_local1][j] > 0) or true) {
var _local3 = grid[_local1][j] % BKtileNumX;
var _local2 = Math.floor(grid[_local1][j] / BKtileNumX);
var _local4 = new flash.geom.Rectangle(_local3 * tileWidth, _local2 * tileHeight, tileWidth, tileHeight);
var _local5 = new flash.geom.Point(j * tileWidth, _local1 * tileHeight);
gameboard.copyPixels(texturePage, _local4, _local5);
}
j++;
}
_local1++;
}
_local1 = 0;
while (_local1 < tileNumY) {
j = 0;
while (j < tileNumX) {
var _local3 = grids[_local1][j] % BKtileNumX;
var _local2 = Math.floor(grids[_local1][j] / BKtileNumX);
var _local4 = new flash.geom.Rectangle(_local3 * tileWidth, _local2 * tileHeight, tileWidth, tileHeight);
var _local5 = new flash.geom.Point(j * tileWidth, _local1 * tileHeight);
gameback.copyPixels(texturePage, _local4, _local5);
j++;
}
_local1++;
}
}
function loadLevel(fname) {
var _local5 = new LoadVars();
_local5.onLoad = function () {
var _local4 = this.ldat.split(",");
var _local3 = 0;
var _local2 = 0;
while (_local2 < tileNumY) {
grid[_local2] = new Array();
grido[_local2] = new Array();
j = 0;
while (j < tileNumX) {
grid[_local2][j] = _local4[_local3++];
grido[_local2][j] = grid[_local2][j];
if (grid[_local2][j] != 0) {
grido[_local2][j] = 1;
}
j++;
}
_local2++;
}
solid_array = this.sol.split(",");
ladder_array = this.lad.split(",");
collect_array = this.col.split(",");
repaintGrid();
};
_local5.load(fname);
}
function rectInters(x1, y1, x2, y2, siz1, siz2) {
if ((((x1 < ((x2 + (siz2 / 2)) + (siz1 / 2))) and (x1 > ((x2 - (siz2 / 2)) - (siz1 / 2)))) and (y1 < ((y2 + (siz2 / 2)) + (siz1 / 2)))) and (y1 > ((y2 - (siz2 / 2)) - (siz1 / 2)))) {
return(1);
}
return(0);
}
function newXvalue(direz, step) {
return(step * Math.cos((direz * Math.PI) / 180));
}
function newYvalue(direz, step) {
return(step * Math.sin((direz * Math.PI) / 180));
}
function angolo(x1, y1, x2, y2) {
return(warpAngle(57.2957795130823 * Math.atan2(y2 - y1, x2 - x1)));
}
function curveAngle(angoloin, angolofin, step) {
var _local1 = angoloin;
var _local3 = angolofin;
if (Math.abs(angoloin - angolofin) > 180) {
_local1 = warpAngle(angoloin + 180);
_local3 = warpAngle(angolofin + 180);
}
if (_local1 > _local3) {
_local1 = warpAngle(_local1 - step);
if (_local1 >= _local3) {
angoloin = warpAngle(angoloin - step);
} else {
angoloin = angolofin;
}
}
if (_local1 < _local3) {
_local1 = warpAngle(_local1 + step);
if (_local1 <= _local3) {
angoloin = warpAngle(angoloin + step);
} else {
angoloin = angolofin;
}
}
return(warpAngle(angoloin));
}
function warpAngle(angolo) {
if (angolo < 0) {
angolo = angolo + ((int(angolo / 360) + 1) * 360);
}
if (angolo > 359) {
angolo = angolo - ((int(angolo / 360) + 1) * 360);
}
return(angolo);
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)));
}
function curveValue(valIn, valOut, coeff) {
if (valIn > valOut) {
valIn = valIn - ((valIn - valOut) / coeff);
}
if (valIn < valOut) {
valIn = valIn + ((valOut - valIn) / coeff);
}
if (Math.abs(valIn - valOut) < 1) {
valIn = valOut;
}
return(valIn);
}
function curveValue2(valIn, valOut, coeff) {
if (valIn > valOut) {
valIn = valIn - coeff;
if (valIn < valOut) {
valIn = valOut;
}
}
if (valIn < valOut) {
valIn = valIn + coeff;
if (valIn > valOut) {
valIn = valOut;
}
}
return(valIn);
}
function biancoEnero() {
matrix = [rLum, gLum, bLum, 0, 0, rLum, gLum, bLum, 0, 0, rLum, gLum, bLum, 0, 0, 0, 0, 0, 1, 0];
var _local1 = new flash.filters.ColorMatrixFilter(matrix);
outScreen.filters = new Array(_local1);
superScreen.filters = new Array(_local1);
bn_filter = true;
}
function colori() {
matrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
var _local1 = new flash.filters.ColorMatrixFilter(matrix);
outScreen.filters = new Array(_local1);
superScreen.filters = new Array(_local1);
bn_filter = false;
}
function resettaTutto() {
removeMovieClip(scanlines);
removeMovieClip(outScreen.player);
removeMovieClip(superScreen.chiave);
removeMovieClip(superScreen.freccia);
i = 1;
while (i <= numFr) {
removeMovieClip(outScreen["freezo" + i]);
i++;
}
grid = [];
grido = [];
grids = [];
delete _root.onEnterFrame;
gotoAndStop (2);
}
function caricaLivello(numliv) {
var _local2 = 0;
while (_local2 < tileNumY) {
grids[_local2] = new Array();
indiceSfondoi = _local2 % 3;
j = 0;
while (j < tileNumX) {
indiceSfondoj = j % 3;
grids[_local2][j] = (indiceSfondoj + 3) + (3 * indiceSfondoi);
j++;
}
_local2++;
}
if (_global.livello == 1) {
livello1();
}
if (_global.livello == 2) {
livello2();
}
if (_global.livello == 3) {
livello3();
}
if (_global.livello == 4) {
livello4();
}
if (_global.livello == 5) {
livello5();
}
if (_global.livello == 6) {
livello6();
}
_local2 = 0;
while (_local2 < tileNumY) {
grido[_local2] = new Array();
j = 0;
while (j < tileNumX) {
if (grid[_local2][j] == 34) {
atx = (j * tileWidth) + (tileWidth / 4);
aty = (_local2 * tileWidth) + (tileWidth / 2);
grid[_local2][j] = 0;
}
grido[_local2][j] = grid[_local2][j];
if (grid[_local2][j] != 0) {
grido[_local2][j] = 1;
}
if (grid[_local2][j] == 43) {
ptx = (j * tileWidth) + (tileWidth / 2);
pty = (_local2 * tileWidth) + (tileWidth / 2);
grido[_local2][j] = 0;
}
if (grid[_local2][j] > 35) {
grido[_local2][j] = 0;
}
j++;
}
_local2++;
}
}
stop();
var rLum = 0.2225;
var gLum = 0.7169;
var bLum = 0.0606;
var matrix = new Array();
var grid = new Array();
var grido = new Array();
var grids = new Array();
var Apl = new Array();
var tileWidth = 48;
var tileHeight = 48;
var tileNumX = 42;
var tileNumY = 42;
var BKtileNumX = 12;
var BKtileNumY = 12;
var gameWidth = 400;
var gameHeight = 300;
var vittoria = false;
var snd_salto = new Sound();
var snd_aterra = new Sound();
var snd_chiave = new Sound();
var snd_muro = new Sound();
var snd_tesoro = new Sound();
var snd_musica = new Sound();
var snd_rev = new Sound();
snd_musica.suono = false;
snd_rev.attachSound("s_rev");
snd_musica.attachSound("s_musica");
snd_salto.attachSound("s_salto");
snd_chiave.attachSound("s_chiave");
snd_muro.attachSound("s_muro");
snd_tesoro.attachSound("s_tesoro");
var gameboard = (new flash.display.BitmapData(2400, 2400, true, 0));
var gameback = (new flash.display.BitmapData(2400, 2400, false, 0));
var worldBack = flash.display.BitmapData.loadBitmap("worldback4");
var bigBack = (new flash.display.BitmapData(2400, 300, false, 0));
var i = 0;
while (i < 3) {
var tRect = (new flash.geom.Rectangle(0, 0, 600, 300));
var destPt = (new flash.geom.Point(i * 600, 0));
bigBack.copyPixels(worldBack, tRect, destPt);
i++;
}
var texturePage = flash.display.BitmapData.loadBitmap("freezetiles2");
var gameScreen = (new flash.display.BitmapData(gameWidth, gameHeight, false, 0));
_root.createEmptyMovieClip("outScreen", 0);
_root.createEmptyMovieClip("superScreen", 80);
outScreen.attachBitmap(gameScreen, 0);
scanlines.swapDepths(outScreen);
scanlines.swapDepths(superScreen);
incre = 0;
var attendi = 30;
var offx = 0;
var offy = 0;
var numFr = 0;
caricaLivello(1);
repaintGrid();
creaPlayer();
creaChiave();
objxx = 0;
objyy = 0;
creaFreccia();
offx = outScreen.player.xx - 200;
offy = outScreen.player.yy - 150;
rootonEnterFrame = function () {
if (attendi < 40) {
offx = Math.round(curveValue(offx, superScreen.freccia.xx - 200, 2 + attendi));
offy = Math.round(curveValue(offy, outScreen.player.yy - 180, 2 + attendi));
}
var _local5 = new flash.geom.Rectangle(offx, offy, gameWidth, gameHeight);
var _local4 = new flash.geom.Rectangle(offx / 1.5, offy / 1.5, gameWidth, gameHeight);
var _local3 = new flash.geom.Point(0, 0);
gameScreen.copyPixels(gameback, _local4, _local3);
gameScreen.copyPixels(gameboard, _local5, _local3);
var _local2 = 1;
while (_local2 <= numFr) {
if ((Math.abs((outScreen["freezo" + _local2].xx - 200) - offx) < 250) and (Math.abs((outScreen["freezo" + _local2].yy - 180) - offy) < 200)) {
outScreen["freezo" + _local2]._x = outScreen["freezo" + _local2].xx - offx;
outScreen["freezo" + _local2]._y = outScreen["freezo" + _local2].yy - offy;
outScreen["freezo" + _local2]._alpha = 100;
} else {
outScreen["freezo" + _local2]._alpha = 0;
}
_local2++;
}
superScreen.chiave._x = superScreen.chiave.xx - offx;
superScreen.chiave._y = superScreen.chiave.yy - offy;
outScreen._x = -(((400 * (outScreen._xscale - 100)) / 100) / 2);
outScreen._y = -(((300 * (outScreen._yscale - 100)) / 100) / 2);
superScreen._xscale = outScreen._xscale;
superScreen._x = outScreen._x;
superScreen._yscale = outScreen._yscale;
superScreen._y = outScreen._y;
if (vittoria) {
outScreen._xscale = outScreen._xscale * 1.05;
outScreen._yscale = outScreen._yscale * 1.05;
if (outScreen._xscale > 600) {
_global.livello = _global.livello + 1;
resettaTutto();
}
if (outScreen._alpha > 5) {
outScreen._alpha = outScreen._alpha - 5;
disp._alpha = disp._alpha - 5;
}
}
};
_root.onEnterFrame = rootonEnterFrame;
stop();
righeRev.onEnterFrame = function () {
this._x = this._x - 10;
if (this._x < -600) {
this._x = -10;
}
if (bn_filter) {
this._alpha = 20;
} else {
this._alpha = 0;
}
};
Frame 4
stop();
var snd_musica = new Sound();
snd_musica.attachSound("s_musica");
snd_musica.start(0, 99);
winscreen.onRelease = function () {
snd_musica.stop();
gotoAndStop (1);
};
Frame 5
stop();
tutorial.onRelease = function () {
gotoAndStop (1);
};
Symbol 47 MovieClip [milanPl] Frame 20
gotoAndPlay (1);
Symbol 47 MovieClip [milanPl] Frame 30
gotoAndPlay (21);
Symbol 52 MovieClip Frame 1
stop();
titlePl.vx = 1.5;
onEnterFrame = function () {
titlePl._x = titlePl._x + titlePl.vx;
if (titlePl._x > 330) {
titlePl.vx = -1.5;
}
if (titlePl._x < 70) {
titlePl.vx = 1.5;
}
if (titlePl.vx > 0) {
titlePl._xscale = 100;
} else {
titlePl._xscale = -100;
}
};
Symbol 77 MovieClip Frame 39
gotoAndPlay (1);
Symbol 77 MovieClip Frame 40
stop();
Symbol 77 MovieClip Frame 41
stop();
Symbol 79 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 1
stop();
titlePl.vx = 1.5;
titlePl.vy = 0;
onEnterFrame = function () {
titlePl._x = titlePl._x + titlePl.vx;
titlePl._y = titlePl._y + titlePl.vy;
if (titlePl._x > 330) {
titlePl.vx = -1.5;
}
if (titlePl._x < 70) {
titlePl.vx = 1.5;
}
if (titlePl.vx > 0) {
titlePl._xscale = 100;
} else {
titlePl._xscale = -100;
}
if ((Math.floor(Math.random() * 20) == 5) and (titlePl._y > 208)) {
titlePl.vy = -2.5;
}
titlePl.vy = titlePl.vy + 0.08;
if (titlePl._y > 210) {
titlePl._y = 210;
}
if (titlePl._y <= 208) {
titlePl.gotoAndStop(26);
} else if (titlePl._currentframe > 20) {
titlePl.gotoAndPlay(1);
}
};