Frame 1
stop();
Instance of Symbol 73 MovieClip "bandThree" in Frame 2
onClipEvent (load) {
this.paket1._alpha = 0;
this.paket2._alpha = 0;
this.paket3._alpha = 0;
this.paket4._alpha = 0;
this.paket5._alpha = 0;
this.paket6._alpha = 0;
}
Instance of Symbol 74 MovieClip "bandFour" in Frame 2
onClipEvent (load) {
this.paket1._alpha = 0;
this.paket2._alpha = 0;
this.paket3._alpha = 0;
this.paket4._alpha = 0;
this.paket5._alpha = 0;
this.paket6._alpha = 0;
}
Instance of Symbol 75 MovieClip "bandTwo" in Frame 2
onClipEvent (load) {
this.paket1._alpha = 0;
this.paket2._alpha = 0;
this.paket3._alpha = 0;
this.paket4._alpha = 0;
this.paket5._alpha = 0;
this.paket6._alpha = 0;
this.paket7._alpha = 0;
}
Instance of Symbol 76 MovieClip "bandOne" in Frame 2
onClipEvent (load) {
this.paket1._alpha = 0;
this.paket2._alpha = 0;
this.paket3._alpha = 0;
this.paket4._alpha = 0;
this.paket5._alpha = 0;
this.paket6._alpha = 0;
this.paket7._alpha = 0;
}
Frame 3
stop();
Instance of Symbol 105 MovieClip "main" in Frame 3
onClipEvent (load) {
pLife = 3;
points = 0;
pState = "init";
possible = 0;
_root.tal1.gotoAndPlay("no0");
_root.tal11.gotoAndPlay("no0");
_root.tal111.gotoAndPlay("no0");
_root.tal1111.gotoAndPlay("no0");
}
onClipEvent (enterFrame) {
if (pstate == "init") {
counter = 0;
t = random(4);
nextPacket = t + 1;
band1 = new string("-------");
band2 = new string("-------");
band3 = new string("------");
band4 = new string("------");
phase = 1;
pWait = 0;
pTempo = 5;
sackPos = 1;
_root.sack.gotoAndPlay("pos" add String(sackpos));
tempo = 30;
_root.bandOne.updateBand();
_root.bandTwo.updateBand();
_root.bandThree.updateBand();
_root.bandFour.updateBand();
_root.missar.gotoAndPlay("miss" + String(pLife));
channels = new array(band1, band2, band3, band4);
pState = "play";
}
if (pState == "play") {
if (((Key.isDown(39) or Key.isDown(37)) or Key.isDown(65)) or Key.isDown(76)) {
if (possible == 0) {
possible = 1;
}
} else {
possible = 0;
}
this.moveSack();
if (0 < pWait) {
pWait = pWait - 1;
} else {
this.MoveBand();
pWait = pTempo;
}
}
if (pState == "miss") {
pWait = 30;
pLife = pLife - 1;
_root.missar.gotoAndPlay("miss" + String(pLife));
if (pLife < 0) {
_root.over.gotoAndPlay(2);
pState = "gameover";
} else {
_root.miss.gotoAndPlay(2);
pState = "tryAgain";
}
}
if (pState == "tryAgain") {
if (0 < pWait) {
pWait = pWait - 1;
} else {
pState = "init";
}
}
}
Frame 4
stop();
Symbol 28 Button
on (press) {
_root.goToAndPlay(2);
}
Symbol 48 MovieClip Frame 2
stop();
Symbol 48 MovieClip Frame 4
stop();
Symbol 48 MovieClip Frame 6
stop();
Symbol 48 MovieClip Frame 8
stop();
Symbol 49 MovieClip Frame 2
stop();
Symbol 49 MovieClip Frame 4
stop();
Symbol 49 MovieClip Frame 6
stop();
Symbol 49 MovieClip Frame 8
stop();
Symbol 51 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 20
gotoAndPlay (1);
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 2
play();
Symbol 52 MovieClip Frame 65
_root.gotoAndPlay(4);
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 7
gotoAndPlay (1);
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 7
gotoAndPlay (1);
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 7
gotoAndPlay (1);
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 7
gotoAndPlay (1);
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 7
gotoAndPlay (1);
Symbol 72 MovieClip Frame 29
gotoAndPlay (1);
Symbol 73 MovieClip Frame 1
function updateBand() {
if (_root.main.band3.charAt(0) == "-") {
this.paket1._alpha = 0;
} else {
this.paket1._alpha = 100;
}
if (_root.main.band3.charAt(1) == "-") {
this.paket2._alpha = 0;
} else {
this.paket2._alpha = 100;
}
if (_root.main.band3.charAt(2) == "-") {
this.paket3._alpha = 0;
} else {
this.paket3._alpha = 100;
}
if (_root.main.band3.charAt(3) == "-") {
this.paket4._alpha = 0;
} else {
this.paket4._alpha = 100;
}
if (_root.main.band3.charAt(4) == "-") {
this.paket5._alpha = 0;
} else {
this.paket5._alpha = 100;
}
if (_root.main.band3.charAt(5) == "-") {
this.paket6._alpha = 0;
} else {
this.paket6._alpha = 100;
}
}
Symbol 74 MovieClip Frame 1
function updateBand() {
if (_root.main.band4.charAt(0) == "-") {
this.paket1._alpha = 0;
} else {
this.paket1._alpha = 100;
}
if (_root.main.band4.charAt(1) == "-") {
this.paket2._alpha = 0;
} else {
this.paket2._alpha = 100;
}
if (_root.main.band4.charAt(2) == "-") {
this.paket3._alpha = 0;
} else {
this.paket3._alpha = 100;
}
if (_root.main.band4.charAt(3) == "-") {
this.paket4._alpha = 0;
} else {
this.paket4._alpha = 100;
}
if (_root.main.band4.charAt(4) == "-") {
this.paket5._alpha = 0;
} else {
this.paket5._alpha = 100;
}
if (_root.main.band4.charAt(5) == "-") {
this.paket6._alpha = 0;
} else {
this.paket6._alpha = 100;
}
}
Symbol 75 MovieClip Frame 1
function updateBand() {
if (_root.main.band2.charAt(0) == "-") {
this.paket1._alpha = 0;
} else {
this.paket1._alpha = 100;
}
if (_root.main.band2.charAt(1) == "-") {
this.paket2._alpha = 0;
} else {
this.paket2._alpha = 100;
}
if (_root.main.band2.charAt(2) == "-") {
this.paket3._alpha = 0;
} else {
this.paket3._alpha = 100;
}
if (_root.main.band2.charAt(3) == "-") {
this.paket4._alpha = 0;
} else {
this.paket4._alpha = 100;
}
if (_root.main.band2.charAt(4) == "-") {
this.paket5._alpha = 0;
} else {
this.paket5._alpha = 100;
}
if (_root.main.band2.charAt(5) == "-") {
this.paket6._alpha = 0;
} else {
this.paket6._alpha = 100;
}
if (_root.main.band2.charAt(6) == "-") {
this.paket7._alpha = 0;
} else {
this.paket7._alpha = 100;
}
}
Symbol 76 MovieClip Frame 1
function updateBand() {
if (_root.main.band1.charAt(0) == "-") {
this.paket1._alpha = 0;
} else {
this.paket1._alpha = 100;
}
if (_root.main.band1.charAt(1) == "-") {
this.paket2._alpha = 0;
} else {
this.paket2._alpha = 100;
}
if (_root.main.band1.charAt(2) == "-") {
this.paket3._alpha = 0;
} else {
this.paket3._alpha = 100;
}
if (_root.main.band1.charAt(3) == "-") {
this.paket4._alpha = 0;
} else {
this.paket4._alpha = 100;
}
if (_root.main.band1.charAt(4) == "-") {
this.paket5._alpha = 0;
} else {
this.paket5._alpha = 100;
}
if (_root.main.band1.charAt(5) == "-") {
this.paket6._alpha = 0;
} else {
this.paket6._alpha = 100;
}
if (_root.main.band1.charAt(6) == "-") {
this.paket7._alpha = 0;
} else {
this.paket7._alpha = 100;
}
}
Symbol 82 MovieClip Frame 2
stop();
Symbol 82 MovieClip Frame 4
stop();
Symbol 82 MovieClip Frame 6
stop();
Symbol 82 MovieClip Frame 8
stop();
Symbol 83 MovieClip Frame 2
stop();
Symbol 83 MovieClip Frame 4
stop();
Symbol 83 MovieClip Frame 6
stop();
Symbol 83 MovieClip Frame 8
stop();
Symbol 84 MovieClip Frame 20
stop();
Symbol 95 MovieClip Frame 2
stop();
Symbol 95 MovieClip Frame 4
stop();
Symbol 95 MovieClip Frame 6
stop();
Symbol 95 MovieClip Frame 8
stop();
Symbol 95 MovieClip Frame 10
stop();
Symbol 95 MovieClip Frame 12
stop();
Symbol 95 MovieClip Frame 14
stop();
Symbol 95 MovieClip Frame 16
stop();
Symbol 95 MovieClip Frame 18
stop();
Symbol 95 MovieClip Frame 20
stop();
Symbol 105 MovieClip Frame 1
function moveBand() {
ch = "-";
counter = counter + 1;
if (counter == nextPacket) {
ch = "x";
counter = 0;
t = random(3);
nextPacket = (t + 1) * 4;
slump = random(3);
if (slump == 1) {
t = random(3);
nextPacket = nextPacket + (t + 1);
}
if (slump == 2) {
nextPacket = 2;
}
if (random(10) == 1) {
pTempo = pTempo - 1;
if (pTempo == 0) {
pTempo = 5;
}
}
}
trace("nextPacket" + nextPacket);
trace("pTempo" + pTempo);
if (phase == 1) {
band1 = ch add band1;
band1 = band1.slice(0, -1);
if (band1.charAt(6) == "x") {
if (sackPos == 2) {
band1 = band1.slice(0, -1) add "-";
this.PickUp();
} else {
pState = "miss";
}
} else {
g = band1.indexOf("x");
if (g != -1) {
_root.rulle_left.top.gotoAndPlay(_root.rulle_left.top._currentframe + 1);
_root.blipA.gotoAndPlay(2);
}
}
_root.bandOne.UpdateBand();
}
if (phase == 2) {
band2 = ch add band2;
band2 = band2.slice(0, -1);
if (band2.charAt(6) == "x") {
if (sackPos == 3) {
band2 = band2.slice(0, -1) add "-";
this.PickUp();
} else {
pState = "miss";
}
} else {
g = band2.indexOf("x");
if (g != -1) {
_root.rulle_right.top.gotoAndPlay(_root.rulle_right.top._currentframe + 1);
_root.blipB.gotoAndPlay(2);
}
}
_root.bandTwo.UpdateBand();
}
if (phase == 3) {
band3 = ch add band3;
band3 = band3.slice(0, -1);
if (band3.charAt(5) == "x") {
if (sackPos == 1) {
band3 = band3.slice(0, -1) add "-";
this.PickUp();
} else {
pState = "miss";
}
} else {
g = band3.indexOf("x");
if (g != -1) {
_root.rulle_left.bottom.gotoAndPlay(_root.rulle_left.bottom._currentframe + 1);
_root.blipC.gotoAndPlay(2);
}
}
_root.bandThree.UpdateBand();
}
if (phase == 4) {
band4 = ch add band4;
band4 = band4.slice(0, -1);
if (band4.charAt(5) == "x") {
if (sackPos == 4) {
band4 = band4.slice(0, -1) add "-";
this.PickUp();
} else {
pState = "miss";
}
} else {
g = band4.indexOf("x");
if (g != -1) {
_root.rulle_right.bottom.gotoAndPlay(_root.rulle_right.bottom._currentframe + 1);
_root.blipD.gotoAndPlay(2);
}
}
_root.bandFour.UpdateBand();
}
phase = phase + 1;
if (4 < phase) {
phase = 1;
}
}
function getActiveChannels() {
L = new Array();
t = new Array();
if (band1 != "-------") {
t = L.push("band1");
}
if (band2 != "-------") {
t = L.push("band2");
}
if (band3 != "------") {
t = L.push("band3");
}
if (band4 != "------") {
t = L.push("band4");
}
return(l.length);
}
function PickUp() {
points = points + 1;
_root.hit.gotoAndPlay(2);
if (points < 10) {
_root.tal1.gotoAndPlay("no" + points);
}
if ((9 < points) && (points < 100)) {
_root.tal1.gotoAndPlay("no" + String(points).charAt(1));
_root.tal11.gotoAndPlay("no" + String(points).charAt(0));
}
if ((99 < points) && (points < 1000)) {
_root.tal1.gotoAndPlay("no" + String(points).charAt(2));
_root.tal11.gotoAndPlay("no" + String(points).charAt(1));
_root.tal111.gotoAndPlay("no" + String(points).charAt(0));
}
if ((999 < points) && (points < 10000)) {
_root.tal1.gotoAndPlay("no" + String(points).charAt(3));
_root.tal11.gotoAndPlay("no" + String(points).charAt(2));
_root.tal111.gotoAndPlay("no" + String(points).charAt(1));
_root.tal1111.gotoAndPlay("no" + String(points).charAt(0));
}
}
function moveSack() {
if (possible == 1) {
if (Key.isDown(39) or Key.isDown(76)) {
sackPos = sackPos + 1;
if (4 < sackPos) {
sackPos = 4;
}
}
if (Key.isDown(37) or Key.isDown(65)) {
sackPos = sackPos - 1;
if (sackPos < 1) {
sackPos = 1;
}
}
this.updateSack();
possible = 2;
}
}
function updateSack() {
_root.sack.gotoAndPlay("pos" add String(sackpos));
}
function setGiftCount() {
if (points < 5) {
giftcount = 1;
tempo = 30;
}
if ((4 < points) and (points < 10)) {
giftcount = 1;
tempo = 40;
}
if ((9 < points) and (points < 20)) {
giftcount = 1;
tempo = 50;
}
if ((19 < points) and (points < 30)) {
giftcount = 2;
tempo = 30;
}
if ((9 < points) and (points < 40)) {
giftcount = 2;
tempo = 33;
}
if ((39 < points) and (points < 60)) {
giftcount = 2;
tempo = 35;
}
if ((59 < points) and (points < 80)) {
giftcount = 2;
tempo = 37;
}
if ((79 < points) and (points < 100)) {
giftcount = 3;
tempo = 25;
}
if ((99 < points) and (points < 130)) {
giftcount = 3;
tempo = 30;
}
if ((129 < points) and (points < 160)) {
giftcount = 3;
tempo = 40;
}
if ((159 < points) and (points < 180)) {
giftcount = 3;
tempo = 45;
}
if ((179 < points) and (points < 200)) {
giftcount = 4;
tempo = 20;
}
if ((199 < points) and (points < 250)) {
giftcount = 4;
tempo = 30;
}
if ((249 < points) and (points < 300)) {
giftcount = 4;
tempo = 40;
}
if ((299 < points) and (points < 350)) {
giftcount = 4;
tempo = 50;
}
if ((949 < points) and (points < 9998)) {
giftcount = 4;
tempo = 55;
}
if ((9997 < points) and (points < 9999)) {
giftcount = 3;
tempo = 30;
pState = "gameover";
}
}
function makeGifts() {
channels = new array(band1, band2, band3, band4);
a = 0;
i = 0;
while (i < channels.length) {
t = channels[i];
p = 0;
while (p < t.length) {
if (t[p] == "x") {
a = a + 1;
}
p++;
}
i++;
}
if ((newwood >= 3) or (a == 0)) {
if (a < giftcount) {
r = random(4);
if (r == lastanimal) {
if (r == 1) {
r = 2;
lastanimal = r;
newwood = 0;
return(undefined);
}
if (r == 2) {
r = 3;
lastanimal = r;
newwood = 0;
return(undefined);
}
if (r == 3) {
r = 4;
lastanimal = r;
newwood = 0;
return(undefined);
}
if (r == 4) {
r = 3;
lastanimal = r;
newwood = 0;
return(undefined);
}
}
lastanimal = r;
newwood = 0;
}
} else {
newwood = newwood + 1;
}
}
Symbol 106 Button
on (release) {
_root.main.sackPos = _root.main.sackPos - 1;
if (_root.main.sackPos < 1) {
_root.main.sackPos = 1;
}
_root.sack.gotoAndPlay("pos" add String(_root.main.sackpos));
}
Symbol 107 Button
on (release) {
_root.main.sackPos = _root.main.sackPos + 1;
if (4 < _root.main.sackPos) {
_root.main.sackPos = 4;
}
_root.sack.gotoAndPlay("pos" add String(_root.main.sackpos));
}
Symbol 113 Button
on (release) {
getURL ("http://www.raketspel.se", "_blank");
}