Frame 1
stop();
Instance of Symbol 137 MovieClip "bigBoy" in Frame 1
/* no clip actions */
Instance of Symbol 139 MovieClip "basketMask" in Frame 1
onClipEvent (enterFrame) {
_x = (_parent.allBoy._x + _parent.allBoy.boy._x);
_y = (_parent.allBoy._y + _parent.allBoy.boy._y);
}
Instance of Symbol 139 MovieClip "actionMask" in Frame 1
onClipEvent (enterFrame) {
_x = (_parent.allBoy._x + _parent.allBoy.boy._x);
_y = ((_parent.allBoy._y + _parent.allBoy.boy._y) - 115);
}
Instance of Symbol 141 MovieClip "allBoy" in Frame 1
onClipEvent (load) {
x = _root._xmouse;
f = int((x / 700) * 50);
gotoAndStop(f);
}
onClipEvent (enterFrame) {
mx = _root._xmouse;
fx = mx;
x = x + ((fx - x) / 2);
frame = int((x / 700) * 50);
gotoAndStop(frame);
if (_parent.state == "speaking") {
if (x > 350) {
_parent.speechBubble.gotoandstop(2);
} else {
_parent.speechBubble.gotoandstop(1);
}
}
if (mx != oldmx) {
boy.run();
} else {
boy.stoprun();
}
oldmx = mx;
}
Instance of Symbol 152 MovieClip "speechBubble" in Frame 1
onClipEvent (load) {
state = 0;
_visible = 0;
activate = function (yn, whichfruit) {
yesno.gotoandstop(1 + yn);
fruit.gotoandstop(whichfruit);
_x = (_parent.allBoy._x + _parent.allBoy.boy._x);
_y = (_parent.allBoy._y + _parent.allBoy.boy._y);
state = 1;
_visible = 1;
};
deactivate = function () {
state = 0;
_visible = 0;
};
}
onClipEvent (enterFrame) {
if (state) {
_x = (_parent.allBoy._x + _parent.allBoy.boy._x);
_y = (_parent.allBoy._y + _parent.allBoy.boy._y);
}
}
Frame 2
newFruit = function (whichFruit, whichSlot, speed) {
var newname = ("f" + whichSlot);
f0.duplicateMovieClip(newname, whichSlot);
var f = eval (newname);
f.fruit.gotoandStop(whichFruit);
f.whichFruit = whichFruit;
if (speed == "slow") {
f.rate = 15;
} else {
f.rate = 7;
}
f.state = "growing";
f._xscale = 10;
f._yscale = 10;
f.finalscale = 100 - random(10);
f.rot = random(300) - 150;
f.finalrot = random(20) - 10;
f.mySlot = whichSlot;
f.myName = fruits[whichFruit];
m = eval ("m" + whichSlot);
m.myFruit = whichFruit;
m.fruitMC = eval (f);
f._x = m._x;
f._y = m._y;
f.finalx = f._x;
f.finaly = f._y;
f.fruit.button.onPress = function () {
this._parent._parent._parent.fall(this._parent._parent);
};
f.fruit.button.onRollover = function () {
this._parent._parent.shake();
};
return(newname);
};
destroyFruit = function () {
i = 1;
while (i <= fCount) {
f = eval ("f" + i);
f.fall();
i++;
}
};
testColl = function (who, detector) {
f = eval (who);
g = eval (detector);
if (f.hitTest(g)) {
return(1);
}
};
makeRandom10List = function (n) {
var a = new array();
var c = new array();
i = 1;
while (i <= n) {
a.unshift(i % 2);
i++;
}
i = 1;
while (i <= n) {
pos = random(a.length);
b = a.splice(pos, 1)[0];
c.unshift(b);
i++;
}
return(c);
};
makeRandomList = function (n) {
var a = new array();
var c = new array();
i = 1;
while (i <= n) {
a.unshift(i);
i++;
}
i = 1;
while (i <= n) {
pos = random(a.length);
b = a.splice(pos, 1)[0];
c.unshift(b);
i++;
}
return(c);
};
Frame 3
fruits = new array("x", "apple", "banana", "cherry", "kiwi", "mango", "orange", "lemon", "pineapple", "starfruit", "strawberry", "watermelon");
numFruits = fruits.length - 1;
bigboy._visible = 0;
bigboy.stoprun();
likedList = makeRandom10List(10);
likedList.unshift(-1);
Frame 7
fCount = 11;
i = 1;
while (i <= fCount) {
newFruit(i, i, "slow");
i++;
}
phase = 1;
state = "waiting";
stop();
fall = function (who) {
if (state == "waiting") {
f = eval (who);
f.fall();
f.say();
state = "falling";
hasActed = 0;
toGrowNum = f.whichFruit;
toGrowSlot = f.mySlot;
}
};
catchFruit = function (who) {
f = eval (who);
whichFruit = f.whichFruit;
allBoy.boy.basket.fruit.init(f.whichFruit);
fruitName = f.myName;
f.removeMovieClip();
state = "waiting";
s = [];
s.push("i_like");
s.push(("m_" + fruitname) + "_s");
sentence.speak(s);
};
missFruit = function (who) {
f = eval (who);
whichFruit = f.whichFruit;
fruitName = f.myName;
f.removeMovieClip();
state = "waiting";
s = [];
s.push("i_dont_like");
s.push(("m_" + fruitName) + "_s");
sentence.speak(s);
if (hasActed) {
finishedAction(0);
} else {
replaceFruit();
}
};
finishedAction = function (yesno) {
speechBubble.activate(yesno, whichFruit);
state = "speaking";
allBoy.boy.speak();
hasActed = 0;
};
replaceFruit = function () {
newFruit(toGrowNum, toGrowSlot, "slow");
};
finishedSpeaking = function () {
if (state != "transition") {
replaceFruit();
}
speechBubble.deactivate();
allBoy.boy.stand();
state = "waiting";
};
likedFruitNear = function () {
if (hasActed == 0) {
hasActed = 1;
allBoy.boy.like();
}
};
dislikedFruitNear = function () {
if (hasActed == 0) {
hasActed = 1;
allBoy.boy.dislike();
}
};
Frame 8
state = "transition";
destroyFruit();
catchFruit = function (who) {
};
missFruit = function (who) {
f = eval (who);
whichFruit = f.whichFruit;
f.removeMovieClip();
};
finishedAction = function (yesno) {
};
replaceFruit = function () {
};
finishedSpeaking = function () {
};
likedFruitNear = function () {
};
dislikedFruitNear = function () {
};
Frame 30
timer.startTimer();
fall = function (who) {
trace(who);
f = eval (who);
if (state == "waiting") {
if (f.whichFruit == askedFruit) {
correct = 1;
f.fall();
f.say_s();
state = "falling";
hasActed = 0;
toGrowSlot = f.mySlot;
i = 1;
while (i <= 4) {
eval ("a" + i)._visible = 0;
i++;
}
} else {
state = "wrong";
correct = 0;
gotoAndPlay (42);
}
}
};
catchFruit = function (who) {
f = eval (who);
whichFruit = f.whichFruit;
allBoy.boy.basket.fruit.init(f.whichFruit);
fruitName = f.myName;
f.removeMovieClip();
};
missFruit = function (who) {
f = eval (who);
whichFruit = f.whichFruit;
f.removeMovieClip();
finishedAction();
};
finishedAction = function (yesno) {
if (hasActed) {
score.addScore(1);
}
gotoAndPlay (62);
};
likedFruitNear = function () {
if (hasActed == 0) {
hasActed = 1;
allBoy.boy.like();
}
};
dislikedFruitNear = function () {
hasActed = 1;
allBoy.boy.dislike();
};
Frame 33
onEnterFrame = 0;
firstTime = 1;
fCount = 0;
gCount = 0;
fruitList = makeRandomList(11);
trace(fruitList);
state = "asking";
i = 1;
while (i <= 4) {
f = fruitList[fCount];
newFruit(f, i, "fast");
fCount++;
i++;
}
gotoAndPlay (62);
Instance of Symbol 157 MovieClip "m3" in Frame 33
/* no clip actions */
Instance of Symbol 157 MovieClip "m4" in Frame 33
/* no clip actions */
Instance of Symbol 157 MovieClip "m2" in Frame 33
/* no clip actions */
Instance of Symbol 157 MovieClip "m1" in Frame 33
/* no clip actions */
Frame 42
correct = 0;
i = 1;
while (i <= 4) {
a = eval ("a" + i);
a._visible = i == askedSlot;
i++;
}
Instance of Symbol 177 MovieClip "a1" in Frame 42
/* no clip actions */
Instance of Symbol 177 MovieClip "a3" in Frame 42
/* no clip actions */
Instance of Symbol 177 MovieClip "a2" in Frame 42
/* no clip actions */
Instance of Symbol 177 MovieClip "a4" in Frame 42
/* no clip actions */
Frame 62
if (firstTime) {
firstTime = 0;
} else {
if (correct) {
if (fCount < 11) {
f = fruitList[fCount];
newFruit(f, askedSlot, "fast");
} else {
eval ("m" + askedSlot).myFruit = "none";
}
}
fCount++;
gCount++;
score.setTotal(gCount);
}
boyX = allBoy._x + allBoy.boy._x;
boyY = allBoy._y + allBoy.boy._y;
state = "asking";
hasActed = 0;
if (fCount < 15) {
askedSlot = random(4) + 1;
s = eval ("m" + askedSlot);
while (s.myFruit == "none") {
askedSlot = random(4) + 1;
s = eval ("m" + askedSlot);
}
s = eval ("m" + askedSlot);
askedFruit = s.myFruit;
trace("asked:" + fruits[askedFruit]);
} else {
gotoAndPlay (79);
}
Instance of Symbol 137 MovieClip "boy2" in Frame 63
onClipEvent (load) {
swapDepths(1001);
_x = _parent.boyX;
_y = _parent.boyY;
finalX = _parent.bigBoy._x;
finalY = _parent.bigBoy._y;
finalScale = _parent.bigBoy._xscale;
steps = 7;
xstep = (finalX - _x) / steps;
ystep = (finalY - _y) / steps;
scalestep = (finalScale - _xscale) / steps;
count = 0;
retreat = function () {
finalX = 370;
finalY = 420;
finalscale = 90;
steps = 7;
xstep = (finalX - _x) / steps;
ystep = (finalY - _y) / steps;
scalestep = (finalScale - _xscale) / steps;
count = 0;
};
}
onClipEvent (enterFrame) {
count++;
if (count <= steps) {
_x = (_x + xstep);
_y = (_y + ystep);
_xscale = (_xscale + scalestep);
_yscale = _xscale;
}
}
Frame 70
boy2.speak();
s = [];
s.push("doyoulike");
s.push(("m_" + fruits[askedFruit]) + "_s");
sentence.speak(s);
yesno = function (a) {
yn = a;
play();
};
stop();
Frame 71
f = eval ("f" + askedSlot);
f.liked = yn;
if (yn == 1) {
s = ["f_yes"];
} else {
s = ["f_no"];
}
i = 1;
while (i <= 4) {
a = eval ("a" + i);
a._visible = 0;
a.num = i;
a.onPress = function () {
this.s = ("this._parent.m" + this.num) + ".fruitMC";
this._parent.fall(eval (this.s));
};
i++;
}
sentence.speak(s, this);
sentenceFinish = function () {
state = "waiting";
i = 1;
while (i <= 4) {
eval ("a" + i)._visible = 1;
i++;
}
};
boy2.retreat();
Instance of Symbol 177 MovieClip "a1" in Frame 71
/* no clip actions */
Instance of Symbol 177 MovieClip "a3" in Frame 71
/* no clip actions */
Instance of Symbol 177 MovieClip "a2" in Frame 71
/* no clip actions */
Instance of Symbol 177 MovieClip "a4" in Frame 71
/* no clip actions */
Frame 76
boy2.removeMovieClip();
stop();
Instance of Symbol 139 MovieClip "basketMask" in Frame 76
onClipEvent (enterFrame) {
_x = (_parent.allBoy._x + _parent.allBoy.boy._x);
_y = (_parent.allBoy._y + _parent.allBoy.boy._y);
}
Instance of Symbol 139 MovieClip "actionMask" in Frame 76
onClipEvent (enterFrame) {
_x = (_parent.allBoy._x + _parent.allBoy.boy._x);
_y = ((_parent.allBoy._y + _parent.allBoy.boy._y) - 115);
}
Instance of Symbol 141 MovieClip "allBoy" in Frame 76
onClipEvent (load) {
x = 350;
f = int((x / 700) * 50);
gotoAndStop(f);
}
onClipEvent (enterFrame) {
mx = _root._xmouse;
fx = mx;
x = x + ((fx - x) / 2);
frame = int((x / 700) * 50);
gotoAndStop(frame);
if (_parent.state == "speaking") {
if (x > 350) {
_parent.speechBubble.gotoandstop(2);
} else {
_parent.speechBubble.gotoandstop(1);
}
}
if (mx != oldmx) {
boy.run();
} else {
boy.stoprun();
}
oldmx = mx;
}
Frame 79
trace("Game over");
score.gotoandplay("flash");
destroyFruit();
sc = score.score;
r = 3;
if (sc > 6) {
r = 2;
}
if (sc > 9) {
r = 1;
}
s = 0;
s = new sound(sentence);
s.loadSound(("assets/m_resp" + r) + ".mp3", 1);
s.onSoundComplete = function () {
gotoAndPlay (91);
};
catchFruit = function (who) {
};
missFruit = function (who) {
f = eval (who);
whichFruit = f.whichFruit;
f.removeMovieClip();
};
finishedAction = function (yesno) {
};
replaceFruit = function () {
};
finishedSpeaking = function () {
};
likedFruitNear = function () {
};
dislikedFruitNear = function () {
};
Instance of Symbol 141 MovieClip "allBoy" in Frame 79
onClipEvent (load) {
x = _root._xmouse;
f = int((x / 700) * 50);
gotoAndStop(f);
}
onClipEvent (enterFrame) {
mx = _root._xmouse;
fx = mx;
x = x + ((fx - x) / 2);
frame = int((x / 700) * 50);
gotoAndStop(frame);
if (_parent.state == "speaking") {
if (x > 350) {
_parent.speechBubble.gotoandstop(2);
} else {
_parent.speechBubble.gotoandstop(1);
}
}
if (mx != oldmx) {
boy.run();
} else {
boy.stoprun();
}
oldmx = mx;
}
Frame 90
allboy.boy.speak();
stop();
Frame 120
gotoAndStop (7);
Symbol 87 MovieClip Frame 1
stop();
Instance of Symbol 87 MovieClip "fruit" in Symbol 88 MovieClip Frame 1
onClipEvent (load) {
initY = _y;
_visible = 0;
init = function (f) {
_visible = 1;
_y = initY;
yv = 4;
gotoAndStop(f);
falling = 1;
};
}
onClipEvent (enterFrame) {
if (falling) {
_y = (_y + yv);
yv = yv + 1;
if (_y > 14) {
_visible = 0;
falling = 0;
_parent._parent._parent._parent.finishedAction(1);
}
}
}
Symbol 137 MovieClip Frame 1
stand = function () {
gotoAndStop (3);
};
run = function () {
legs.play();
};
stoprun = function () {
legs.gotoandstop(1);
};
speak = function () {
gotoAndPlay (13);
};
like = function () {
gotoAndPlay (39);
};
dislike = function () {
gotoAndPlay (48);
};
Symbol 137 MovieClip Frame 3
stop();
Symbol 137 MovieClip Frame 13
play();
Symbol 137 MovieClip Frame 36
_parent._parent.finishedSpeaking();
stand();
Symbol 137 MovieClip Frame 45
stop();
Symbol 137 MovieClip Frame 58
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 1
speak = function (s, c) {
temp.stop();
temp = 0;
sentence = s;
numWords = s.length;
callback = c;
w = 0;
sayWord();
};
sayWord = function () {
temp = new sound(this);
temp.attachSound(sentence[w] + ".wav");
temp.start();
temp.onSoundComplete = wordFinish;
};
wordFinish = function () {
w++;
if (w == numWords) {
finished();
} else {
sayWord();
}
};
finished = function () {
eval (callback).sentenceFinish();
temp = 0;
};
Symbol 150 MovieClip Frame 1
stop();
Symbol 152 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 1
topLevel = 1000;
onEnterFrame = function () {
if (state == "growing") {
_xscale = (_xscale + ((finalscale - _xscale) / rate));
_yscale = _xscale;
rot = rot + ((finalrot - rot) / rate);
xv = xv + (finalx - _x);
yv = yv + (finaly - _y);
xv = xv * 0.9;
yv = yv * 0.9;
_x = (_x + xv);
_y = (_y + yv);
fruit._rotation = rot;
} else if (state == "falling") {
yv = yv + yvv;
_y = (_y + yv);
nx = _x + xv;
if ((nx < 0) || (nx > 700)) {
xv = -xv;
} else {
_x = nx;
}
fruit._rotation = fruit._rotation + rotv;
if (_parent.testColl(this, "actionMask")) {
if (liked) {
_parent.likedFruitNear();
} else {
_parent.dislikedFruitNear();
if ((yv > 0) && (bounce < 4)) {
rotv = random(20) - 10;
yv = (-yv) * 0.8;
boingSnd.setVolume(int((-yv) * 2));
boingSnd.start();
bounce++;
}
}
}
if (_parent.testColl(this, "basketMask")) {
if (liked) {
_parent.catchFruit(this);
}
}
if (_y > 500) {
_parent.missFruit(this);
}
_xscale = (_xscale + ((finalscale - _xscale) / rate));
_yscale = _xscale;
}
};
shake = function () {
if (state == "growing") {
xv = (random(10) - 5) / 2;
yv = (random(10) - 5) / 2;
}
};
fall = function () {
if (state != "falling") {
state = "falling";
yv = -20;
yvv = 4;
xv = random(20) - 10;
rotv = random(20) - 10;
bounce = 0;
finalscale = 80;
this.swapDepths(topLevel);
}
};
Symbol 155 MovieClip Frame 2
liked = _parent.likedList[whichFruit];
snd = new sound(this);
snd.attachSound(("f_" + myName) + ".wav");
snd_s = new sound(this);
snd_s.attachSound(("f_" + myName) + "_s.wav");
boingSnd = new sound(this);
boingSnd.attachSound("boing.wav");
say = function () {
snd.start(0);
};
say_s = function () {
snd_s.start(0);
};
stop();
Symbol 157 MovieClip Frame 1
_visible = 0;
Symbol 161 Button
on (press) {
_parent.play();
}
Symbol 172 MovieClip Frame 1
_visible = 0;
addScore = function (a) {
gotoAndPlay (5);
score = score + a;
};
setTotal = function (t) {
total = t;
};
Symbol 172 MovieClip Frame 2
score = 0;
total = 0;
_visible = 1;
Symbol 172 MovieClip Frame 3
stop();
Symbol 172 MovieClip Frame 5
updateDisplay();
Symbol 172 MovieClip Frame 13
gotoAndStop (3);
Symbol 172 MovieClip Frame 23
gotoAndPlay (18);
Symbol 184 Button
on (press) {
yesno(1);
}
Symbol 188 Button
on (press) {
yesno(0);
}