Frame 1
mc_cg.gotoAndStop(2);
mc_cg.mc_Mask1.gotoAndStop(1);
stop();
Frame 2
prevFrame();
Frame 3
mc_cg.gotoAndStop(2);
mc_cg.mc_Mask1.gotoAndStop(1);
stop();
Frame 4
posx = new Array();
posy = new Array();
snakelength = 2;
x = 210;
t = 0;
while (t < snakelength) {
posx[t] = x;
posy[t] = 120;
x = x + 10;
t++;
}
init = 1;
foods = 0;
score = 0;
scorep = 4;
idou = 3;
stop();
Frame 7
stop();
Frame 10
mc_Ef1.swapDepths(1000);
if (init == 1) {
t = 1;
while (t < snakelength) {
nn = "body" + t;
duplicateMovieClip ("body", nn, t);
t++;
}
init = 0;
}
if (head.up == 1) {
head.sy = head.sy - idou;
cy = head.sy / 10;
cy = Math.floor(cy);
head._y = cy * 10;
head.head_1.gotoAndStop(2);
}
if (head.up == -1) {
head.sy = head.sy + idou;
cy = head.sy / 10;
cy = Math.floor(cy);
head._y = cy * 10;
head.head_1.gotoAndStop(4);
}
if (head.left == 1) {
head.sx = head.sx - idou;
cx = head.sx / 10;
cx = Math.floor(cx);
head._x = cx * 10;
head.head_1.gotoAndStop(1);
}
if (head.left == -1) {
head.sx = head.sx + idou;
cx = head.sx / 10;
cx = Math.floor(cx);
head._x = cx * 10;
head.head_1.gotoAndStop(3);
}
bx = head._x;
by = head._y;
if ((bx != posx[0]) || (by != posy[0])) {
t = snakelength - 1;
while (t > 0) {
posx[t] = posx[t - 1];
posy[t] = posy[t - 1];
t--;
}
posx[0] = bx;
posy[0] = by;
}
t = 1;
while (t < snakelength) {
nn = "body" + t;
setProperty(nn, _x , posx[t]);
setProperty(nn, _y , posy[t]);
t++;
}
if ((((head._x < 0) || (head._x > 230)) || (head._y < 20)) || (head._y > 320)) {
gotoAndPlay ("gameover");
score = Number(score) - 1;
}
t = 2;
while (t < snakelength) {
if ((head._x == posx[t]) and (head._y == posy[t])) {
gotoAndPlay ("gameover");
}
t++;
}
if ((food._x == head._x) && (head._y == food._y)) {
foods = 0;
mc_Ef1._x = food._x;
mc_Ef1._y = food._y;
mc_Ef1.gotoAndPlay(2);
score = Number(score) + 1;
duplicateMovieClip ("body", "body" + snakelength, snakelength);
snakelength = snakelength + 1;
posx[snakelength - 2] = posx[snakelength - 3];
posy[snakelength - 2] = posy[snakelength - 3];
if (score >= (scorep * 9)) {
omkflg = 5;
gotoAndPlay ("clear");
mc_cg.mc_Mask1.gotoAndStop(10);
} else if (score >= (scorep * 8)) {
idou = 6;
mc_cg.mc_Mask1.gotoAndStop(9);
} else if (score >= (scorep * 7)) {
idou = 6;
mc_cg.mc_Mask1.gotoAndStop(8);
} else if (score >= (scorep * 6)) {
idou = 6;
mc_cg.mc_Mask1.gotoAndStop(7);
} else if (score >= (scorep * 5)) {
idou = 5;
mc_cg.mc_Mask1.gotoAndStop(6);
} else if (score >= (scorep * 4)) {
idou = 5;
mc_cg.mc_Mask1.gotoAndStop(5);
} else if (score >= (scorep * 3)) {
idou = 4;
mc_cg.mc_Mask1.gotoAndStop(4);
} else if (score >= (scorep * 2)) {
idou = 4;
mc_cg.mc_Mask1.gotoAndStop(3);
} else if (score >= scorep) {
idou = 4;
mc_cg.mc_Mask1.gotoAndStop(2);
}
}
if (foods != 1) {
x = random(220) + 10;
y = random(270) + 30;
x = x / 10;
y = y / 10;
x = int(x);
y = int(y);
x = x * 10;
y = y * 10;
food._x = x;
food._y = y;
foods = 1;
}
splv = idou - 2;
Instance of Symbol 55 MovieClip "food" in Frame 10
/* no clip actions */
Frame 11
gotoAndPlay ("loop");
Frame 14
mc_cg.mc_Mask1.gotoAndStop(1);
stop();
Frame 16
t = 0;
while (t < snakelength) {
nn = "body" + t;
removeMovieClip(nn);
t++;
}
play();
Frame 20
stop();
Frame 21
stop();
Symbol 7 MovieClip Frame 1
stop();
Symbol 7 MovieClip Frame 11
gotoAndStop (1);
Symbol 8 MovieClip Frame 1
mc_img1.setMask(mc_Mask1);
stop();
Symbol 15 MovieClip Frame 1
stop();
Symbol 17 MovieClip Frame 1
stop();
Symbol 19 Button
on (press) {
gotoAndPlay ("start");
}
Symbol 20 Button
on (press) {
getURL ("http://fastr.blog70.fc2.com/", "_blank");
}
Symbol 23 MovieClip Frame 1
stop();
Symbol 24 Button
on (press) {
if (omkflg == 5) {
gotoAndPlay ("bo");
}
}
Symbol 32 MovieClip Frame 1
stop();
Symbol 33 Button
on (press) {
gotoAndPlay ("loop");
}
Symbol 34 Button
on (press) {
gotoAndStop ("tuto");
}
Symbol 42 MovieClip Frame 1
stop();
Symbol 43 Button
on (press) {
gotoAndStop ("start");
}
Symbol 46 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 1
up = 0;
left = 1;
sx = _x / 10;
sy = _y / 10;
sx = sx * 10;
sy = sy * 10;
stop();
keyuphantei = 0;
Instance of Symbol 46 MovieClip "head_1" in Symbol 47 MovieClip Frame 1
onClipEvent (mouseDown) {
if (_root.B_hidari.hitTest(_root._xmouse, _root._ymouse)) {
if ((_parent.up == 0) && (_parent.left == 1)) {
_parent.up = -1;
_parent.left = 0;
} else if ((_parent.up == -1) && (_parent.left == 0)) {
_parent.up = 0;
_parent.left = -1;
} else if ((_parent.up == 0) && (_parent.left == -1)) {
_parent.up = 1;
_parent.left = 0;
} else if ((_parent.up == 1) && (_parent.left == 0)) {
_parent.up = 0;
_parent.left = 1;
}
} else if (_root.B_migi.hitTest(_root._xmouse, _root._ymouse)) {
if ((_parent.up == 0) && (_parent.left == 1)) {
_parent.up = 1;
_parent.left = 0;
} else if ((_parent.up == -1) && (_parent.left == 0)) {
_parent.up = 0;
_parent.left = 1;
} else if ((_parent.up == 0) && (_parent.left == -1)) {
_parent.up = -1;
_parent.left = 0;
} else if ((_parent.up == 1) && (_parent.left == 0)) {
_parent.up = 0;
_parent.left = -1;
}
}
}
onClipEvent (keyDown) {
if (Key.isDown(37) && (_parent.keyuphantei == 0)) {
_parent.keyuphantei = 1;
if ((_parent.up == 0) && (_parent.left == 1)) {
_parent.up = -1;
_parent.left = 0;
} else if ((_parent.up == -1) && (_parent.left == 0)) {
_parent.up = 0;
_parent.left = -1;
} else if ((_parent.up == 0) && (_parent.left == -1)) {
_parent.up = 1;
_parent.left = 0;
} else if ((_parent.up == 1) && (_parent.left == 0)) {
_parent.up = 0;
_parent.left = 1;
}
}
if (Key.isDown(39) && (_parent.keyuphantei == 0)) {
_parent.keyuphantei = 1;
if ((_parent.up == 0) && (_parent.left == 1)) {
_parent.up = 1;
_parent.left = 0;
} else if ((_parent.up == -1) && (_parent.left == 0)) {
_parent.up = 0;
_parent.left = 1;
} else if ((_parent.up == 0) && (_parent.left == -1)) {
_parent.up = -1;
_parent.left = 0;
} else if ((_parent.up == 1) && (_parent.left == 0)) {
_parent.up = 0;
_parent.left = -1;
}
}
}
onClipEvent (keyUp) {
_parent.keyuphantei = 0;
}
Symbol 55 MovieClip Frame 10
gotoAndPlay (1);
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 8
gotoAndStop (1);
Symbol 65 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 72 Button
on (press, keyPress "<Enter>") {
t = 0;
while (t < snakelength) {
nn = "body" + t;
removeMovieClip(nn);
t++;
}
gotoAndStop (1);
}
Symbol 78 MovieClip Frame 1
stop();
Symbol 79 Button
on (press) {
nextFrame();
}
Symbol 80 Button
on (press) {
gotoAndStop (3);
}
Symbol 81 Button
on (press) {
mc_cg.mc_Mask1.nextFrame();
}