Frame 1
function doSomething() {
}
stop();
_root.attachMovie("preloader loadtext", "pload", 1, {_x:8, _y:8});
startT = getTimer();
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This game belongs to Aether Studios and UGO Player", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
onEnterFrame = function () {
var _local2 = _root.getBytesLoaded() / _root.getBytesTotal();
pload.loadert.text = Math.floor(_local2 * 100) + "% Loaded";
if ((_local2 == 1) && (pload._alpha > 0)) {
pload._alpha--;
}
if ((_local2 == 1) && ((getTimer() - startT) > 4800)) {
pload.removeMovieClip();
delete onEnterFrame;
gotoAndPlay (3);
}
};
Frame 2
if (false) {
}
Frame 3
function doSomething() {
}
mochi.MochiServices.connect("49a23231713615d7");
mochi.MochiScores.setBoardID("df49d49c83fc9e2d");
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This game belongs to Aether Studios and UGO Player", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
achievements = SharedObject.getLocal("achievements");
achieved = new Array();
if (achievements.data.a1 == 1) {
achieved[0] = 1;
} else {
achieved[0] = 0;
}
if (achievements.data.a2 == 1) {
achieved[1] = 1;
} else {
achieved[1] = 0;
}
if (achievements.data.a3 == 1) {
achieved[2] = 1;
} else {
achieved[2] = 0;
}
if (achievements.data.a4 == 1) {
achieved[3] = 1;
} else {
achieved[3] = 0;
}
if (achievements.data.a5 == 1) {
achieved[4] = 1;
} else {
achieved[4] = 0;
}
if (achievements.data.a6 == 1) {
achieved[5] = 1;
} else {
achieved[5] = 0;
}
if (achievements.data.a7 == 1) {
achieved[6] = 1;
} else {
achieved[6] = 0;
}
if (achievements.data.a8 == 1) {
achieved[7] = 1;
} else {
achieved[7] = 0;
}
if (achievements.data.a9 == 1) {
achieved[8] = 1;
} else {
achieved[8] = 0;
}
if (achievements.data.a10 == 1) {
achieved[9] = 1;
} else {
achieved[9] = 0;
}
achieve = new Array();
achieve[0] = "Appear in the newspaper";
achieve[1] = "Earn a red ribbon";
achieve[2] = "Earn a blue ribbon";
achieve[3] = "Get 5000 total points";
achieve[4] = "Get 7000 total points";
achieve[5] = "Get 1000 points in a single round";
achieve[6] = "Get 3000 points in a single round";
achieve[7] = "Clear all turnips with a positive round score";
achieve[8] = "Do not pick up any rotten turnips";
achieve[9] = "Secret";
_root.createEmptyMovieClip("sounds", 300);
turnippull = new Sound(sounds.createEmptyMovieClip("sound" + sounds.getNextHighestDepth(), sounds.getNextHighestDepth()));
turnippull.attachSound("Turnip Pull");
turnippull.setVolume(70);
opening = new Sound(sounds.createEmptyMovieClip("sound" + sounds.getNextHighestDepth(), sounds.getNextHighestDepth()));
opening.attachSound("Opening");
opening.setVolume(80);
banjo = new Sound(sounds.createEmptyMovieClip("sound" + sounds.getNextHighestDepth(), sounds.getNextHighestDepth()));
banjo.attachSound("Banjo 1");
banjo.setVolume(70);
bclick = new Sound(sounds.createEmptyMovieClip("sound" + sounds.getNextHighestDepth(), sounds.getNextHighestDepth()));
bclick.attachSound("Button Click 1");
bclick.setVolume(65);
ribbonhit = new Sound(sounds.createEmptyMovieClip("sound" + sounds.getNextHighestDepth(), sounds.getNextHighestDepth()));
ribbonhit.attachSound("ribbon-hit");
ribbonhit.setVolume(100);
achievesound = new Sound(sounds.createEmptyMovieClip("sound" + sounds.getNextHighestDepth(), sounds.getNextHighestDepth()));
achievesound.attachSound("Achieve");
achievesound.setVolume(80);
country3 = new Sound(sounds.createEmptyMovieClip("sound" + sounds.getNextHighestDepth(), sounds.getNextHighestDepth()));
country3.attachSound("Country3");
country3.setVolume(70);
musicmuted = false;
soundmuted = false;
Frame 4
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("621d3ebe", this, 10301, true);
function doSomething() {
}
stop();
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This game belongs to Aether Studios and UGO Player", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
now = getTimer();
opening.start(0, 1);
_root.createEmptyMovieClip("aether", 1);
aether.attachMovie("bg", "bg", 1, {_x:250, _y:250});
aether.attachMovie("fg", "fg", 2, {_x:250, _y:240});
aether.attachMovie("Letters", "Letters", 3, {_x:210, _y:-240});
aether.attachMovie("Studios", "Studios", 4, {_x:250.6, _y:305});
onEnterFrame = function () {
now2 = getTimer();
if ((now2 - now) > 4500) {
opening.stop();
aether.removeMovieClip();
banjo.start(0.5, 9999999);
gotoAndStop (5);
}
};
Frame 5
function doSomething() {
}
function toggleMusic() {
musicmuted = !musicmuted;
if (musicmuted == false) {
banjo.setVolume(70);
country3.setVolume(70);
_root.MuteButtonMC2.removeMovieClip();
_root.attachMovie("Mute Button MC", "MuteButtonMC", 30, {_x:480, _y:14});
} else {
banjo.setVolume(0);
country3.setVolume(0);
_root.MuteButtonMC.removeMovieClip();
_root.attachMovie("Mute Button MC 2", "MuteButtonMC2", 30, {_x:480, _y:14});
}
}
function toggleSound() {
soundmuted = !soundmuted;
if (soundmuted == false) {
turnippull.setVolume(70);
bclick.setVolume(65);
ribbonhit.setVolume(100);
achievesound.setVolume(80);
} else {
turnippull.setVolume(0);
bclick.setVolume(0);
ribbonhit.setVolume(0);
achievesound.setVolume(0);
}
}
stop();
openingnow = false;
if (playbanjo == true) {
banjo.stop();
banjo.start(0, 9999999);
banjo.setVolume(0);
playbanjo = false;
}
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This game belongs to Aether Studios and UGO Player", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
_root.createEmptyMovieClip("gamemenu", 1);
gamemenu.attachMovie("bgground", "bgground", 1, {_x:0, _y:110});
gamemenu.attachMovie("Mask", "Mask", 2, {_x:250, _y:110});
gamemenu.attachMovie("BG2", "BG2", 3, {_x:250, _y:60});
gamemenu.attachMovie("Achievements button mc", "abtnmc", 4, {_x:49, _y:64.5});
gamemenu.attachMovie("TTitle", "TTitle", 5, {_x:343.6, _y:50.8});
gamemenu.TTitle._width = 278.8;
gamemenu.TTitle._height = 61.8;
gamemenu.attachMovie("Shadow", "Shadow", 6, {_x:220.9, _y:494});
gamemenu.attachMovie("MFarmer", "MFarmer", 7, {_x:214.5, _y:311.1});
gamemenu.MFarmer._width = 258.4;
gamemenu.MFarmer._height = 380.6;
gamemenu.attachMovie("Arm", "Arm", 8, {_x:283.1, _y:293.5});
gamemenu.Arm._width = 107.8;
gamemenu.Arm._height = 61.2;
gamemenu.attachMovie("Glove", "Glove", 9, {_x:230.1, _y:289.3});
gamemenu.Glove._width = 36.8;
gamemenu.Glove._height = 37.5;
gamemenu.attachMovie("Menu Turnip", "MenuTurnip", 10, {_x:0, _y:234.3});
gamemenu.MenuTurnip._width = 200;
gamemenu.MenuTurnip._height = 310;
gamemenu.MenuTurnip._rotation = -10;
gamemenu.attachMovie("Glove", "Glove2", 11, {_x:231.8, _y:308.1});
gamemenu.Glove2._width = 60;
gamemenu.Glove2._height = 45;
gamemenu.attachMovie("Glove", "Glove3", 12, {_x:50.7, _y:342.4});
gamemenu.Glove3._width = 35.2;
gamemenu.Glove3._height = 35.8;
gamemenu.attachMovie("Menu Turnip Pile", "MenuTurnipPile", 13, {_x:339.1, _y:435.3});
gamemenu.attachMovie("Menu Credits", "MenuCredits", 14, {_x:417.1, _y:234.5});
if (musicmuted == true) {
_root.attachMovie("Mute Button MC 2", "MuteButtonMC2", 30, {_x:480, _y:14});
} else {
_root.attachMovie("Mute Button MC", "MuteButtonMC", 30, {_x:480, _y:14});
}
gamemenu.MenuTurnip.turnipbtn.onRelease = function () {
gamemenu.removeMovieClip();
gotoAndStop (6);
};
gamemenu.MenuCredits.credbtn.onRelease = function () {
gamemenu.removeMovieClip();
gotoAndStop (8);
};
gamemenu.MenuTurnipPile.pmgbtn.onRelease = function () {
getURL ("http://secure-us.imrworldwide.com/cgi-bin/b?cg=ugoplayer_flash_games&ci=us-ugclicks&tu=http://www.ugoplayer.com", "_blank");
};
gamemenu.abtnmc.abtn.onRelease = function () {
gamemenu.removeMovieClip();
gotoAndStop (9);
};
onEnterFrame = function () {
_root.MuteButtonMC.mutebtn.onRelease = function () {
toggleMusic();
};
_root.MuteButtonMC2.mutebtn.onRelease = function () {
toggleMusic();
};
if ((banjo.getVolume() < 70) && (musicmuted == false)) {
banjo.setVolume(banjo.getVolume() + 1);
}
if (country3.getVolume() > 0) {
country3.setVolume(country3.getVolume() - 1);
} else {
country3.stop();
}
if (Key.isDown(77)) {
if (mpressed == false) {
toggleMusic();
}
mpressed = true;
} else {
mpressed = false;
}
if (Key.isDown(83)) {
if (spressed == false) {
toggleSound();
}
spressed = true;
} else {
spressed = false;
}
};
Frame 6
function doSomething() {
}
function toggleMusic() {
musicmuted = !musicmuted;
if (musicmuted == false) {
banjo.setVolume(70);
country3.setVolume(70);
_root.MuteButtonMC2.removeMovieClip();
_root.attachMovie("Mute Button MC", "MuteButtonMC", 30, {_x:480, _y:14});
} else {
banjo.setVolume(0);
country3.setVolume(0);
_root.MuteButtonMC.removeMovieClip();
_root.attachMovie("Mute Button MC 2", "MuteButtonMC2", 30, {_x:480, _y:14});
}
}
function toggleSound() {
soundmuted = !soundmuted;
if (soundmuted == false) {
turnippull.setVolume(70);
bclick.setVolume(65);
ribbonhit.setVolume(100);
achievesound.setVolume(80);
} else {
turnippull.setVolume(0);
bclick.setVolume(0);
ribbonhit.setVolume(0);
achievesound.setVolume(0);
}
}
stop();
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This game belongs to Aether Studios and UGO Player", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
_root.createEmptyMovieClip("gamemenu", 1);
gamemenu.attachMovie("Floor", "Floor", 1, {_x:250.3, _y:334.1});
gamemenu.attachMovie("BG2", "BG2", 2, {_x:250, _y:60});
gamemenu.attachMovie("Return button", "rbtnmc", 3, {_x:49, _y:64.5});
gamemenu.attachMovie("TTitle", "TTitle", 4, {_x:343.6, _y:50.8});
gamemenu.TTitle._width = 278.8;
gamemenu.TTitle._height = 61.8;
gamemenu.attachMovie("Table", "Table", 5, {_x:420.1, _y:439.8});
gamemenu.attachMovie("Turnipsi", "Turnipsi", 6, {_x:421.8, _y:405.3});
gamemenu.attachMovie("Cat_clock", "catclock", 7, {_x:336.9, _y:370.9});
gamemenu.catclock._width = 15.8;
gamemenu.catclock._height = 52.5;
gamemenu.attachMovie("House", "House", 8, {_x:319.1, _y:417.7});
gamemenu.attachMovie("Turnip text", "Turniptext", 9, {_x:280.4, _y:196.2});
gamemenu.attachMovie("Controls text", "Controlstext", 11, {_x:315.9, _y:528});
gamemenu.attachMovie("FarmerButtonMC", "fbmc", 16, {_x:83.2, _y:351.4});
gamemenu.attachMovie("ContinueMC", "ContinueMC", 19, {_x:447.1, _y:476.3});
if (musicmuted == true) {
_root.attachMovie("Mute Button MC 2", "MuteButtonMC2", 30, {_x:480, _y:14});
} else {
_root.attachMovie("Mute Button MC", "MuteButtonMC", 30, {_x:480, _y:14});
}
gamemenu.fbmc.farmbtn.onRelease = function () {
getURL ("http://secure-us.imrworldwide.com/cgi-bin/b?cg=ugoplayer_flash_games&ci=us-ugclicks&tu=http://www.ugoplayer.com", "_blank");
};
gamemenu.ContinueMC.contbtn.onRelease = function () {
gamemenu.removeMovieClip();
gotoAndStop (7);
};
gamemenu.rbtnmc.rbtn.onRelease = function () {
gamemenu.removeMovieClip();
gotoAndStop (5);
};
onEnterFrame = function () {
_root.MuteButtonMC.mutebtn.onRelease = function () {
toggleMusic();
};
_root.MuteButtonMC2.mutebtn.onRelease = function () {
toggleMusic();
};
if ((banjo.getVolume() < 70) && (musicmuted == false)) {
banjo.setVolume(banjo.getVolume() + 1);
}
if (country3.getVolume() > 0) {
country3.setVolume(country3.getVolume() - 1);
} else {
country3.stop();
}
if (Key.isDown(77)) {
if (mpressed == false) {
toggleMusic();
}
mpressed = true;
} else {
mpressed = false;
}
if (Key.isDown(83)) {
if (spressed == false) {
toggleSound();
}
spressed = true;
} else {
spressed = false;
}
};
Frame 7
function doSomething() {
}
function toggleMusic() {
musicmuted = !musicmuted;
if (musicmuted == false) {
banjo.setVolume(70);
country3.setVolume(70);
_root.MuteButtonMC2.removeMovieClip();
_root.attachMovie("Mute Button MC", "MuteButtonMC", 30, {_x:480, _y:14});
} else {
banjo.setVolume(0);
country3.setVolume(0);
_root.MuteButtonMC.removeMovieClip();
_root.attachMovie("Mute Button MC 2", "MuteButtonMC2", 30, {_x:480, _y:14});
}
}
function toggleSound() {
soundmuted = !soundmuted;
if (soundmuted == false) {
turnippull.setVolume(70);
bclick.setVolume(65);
ribbonhit.setVolume(100);
achievesound.setVolume(80);
} else {
turnippull.setVolume(0);
bclick.setVolume(0);
ribbonhit.setVolume(0);
achievesound.setVolume(0);
}
}
function showAchievement(num) {
achslider.achdes.text = achieve[num];
achslider.achsmall.gotoAndStop(num + 1);
achievesound.start(0, 1);
achslider.gotoAndPlay(2);
}
function checkAchievements() {
if (((level > 5) && (paperloaded == true)) && (achieved[0] == 0)) {
achieved[0] = 1;
achievements.data.a1 = 1;
achlist.push(0);
}
if ((((totalscore >= 4000) && (paperloaded == true)) && (level > 5)) && (achieved[1] == 0)) {
achieved[1] = 1;
achievements.data.a2 = 1;
achlist.push(1);
}
if ((((totalscore >= 6000) && (paperloaded == true)) && (level > 5)) && (achieved[2] == 0)) {
achieved[2] = 1;
achievements.data.a3 = 1;
achlist.push(2);
}
if ((totalscore >= 5000) && (achieved[3] == 0)) {
achieved[3] = 1;
achievements.data.a4 = 1;
achlist.push(3);
}
if ((totalscore >= 7000) && (achieved[4] == 0)) {
achieved[4] = 1;
achievements.data.a5 = 1;
achlist.push(4);
}
if (((roundscore >= 1000) && (endlevel == true)) && (achieved[5] == 0)) {
achieved[5] = 1;
achievements.data.a6 = 1;
achlist.push(5);
}
if (((roundscore >= 3000) && (endlevel == true)) && (achieved[6] == 0)) {
achieved[6] = 1;
achievements.data.a7 = 1;
achlist.push(6);
}
if ((((allturnipsgone == true) && (roundscore > 0)) && (endlevel == true)) && (achieved[7] == 0)) {
achieved[7] = 1;
achievements.data.a8 = 1;
achlist.push(7);
}
if (((level > 5) && (norotten == true)) && (achieved[8] == 0)) {
achieved[8] = 1;
achievements.data.a9 = 1;
achlist.push(8);
}
}
function pausegame() {
if (gamepaused == true) {
startpause = getTimer();
game.PauseMenu.gotoAndPlay(2);
pcount = 0;
} else {
pcount++;
game.PauseMenu.gotoAndPlay(16);
endpause = getTimer() - startpause;
if (pcount == 1) {
totalpausetime = totalpausetime + endpause;
}
}
}
function loadScore() {
calculateRoundScore();
_root.createEmptyMovieClip("game", 1);
game.attachMovie("Sky", "sky", 1, {_x:250, _y:274.9});
game.sky._width = 500;
game.sky._height = 550;
game.attachMovie("Title", "title", 2, {_x:68.8, _y:20.1});
game.title._width = 123.1;
game.title._height = 27.3;
game.attachMovie("Mts", "mts", 3, {_x:249.1, _y:552.5});
game.mts._width = 503.9;
game.mts._height = 70.1;
game.mts._alpha = 69;
game.attachMovie("wm", "wm", 4, {_x:103.3, _y:355.2});
game.attachMovie("Continue Sign", "contsign", 6, {_x:0, _y:0});
game.attachMovie("Turnip Slider", "TurnipSlider", 5, {_x:250, _y:880});
game.contsign.rscoret.text = roundscore;
game.contsign.rscoreb.text = roundscore;
game.contsign.tscoret.text = totalscore;
game.contsign.tscoreb.text = totalscore;
game.contsign.tarscoret.text = targetScore;
game.contsign.tarscoreb.text = targetScore;
rscore = roundscore;
changeby = Math.ceil(rscore / 450);
if ((totalscore + rscore) >= targetScore) {
game.contsign.ntarscoret.text = nextTargetScore;
game.contsign.ntarscoreb.text = nextTargetScore;
} else {
game.contsign.ntarscoret.text = targetScore;
game.contsign.ntarscoreb.text = targetScore;
}
if (roundscore == 0) {
signpress = 2;
}
rcount = 0;
}
function switchScores() {
rcount = 0;
rcount2 = 0;
changeby = Math.ceil(rscore / 90);
quickgoto = Math.floor(rscore / 2);
switchscore = true;
}
function switchScores2() {
rcount = quickgoto * 2;
if ((quickgoto >= 590) && (drainscore == true)) {
game.TurnipSlider._y = 290;
} else if (drainscore == true) {
game.TurnipSlider._y = 880 - quickgoto;
}
if (drainscore == true) {
totalscore = totalscore + rscore;
}
rscore = 0;
game.contsign.rscoret.text = rscore;
game.contsign.rscoreb.text = rscore;
game.contsign.tscoret.text = totalscore;
game.contsign.tscoreb.text = totalscore;
}
function switchScoresInt() {
switchScores();
}
function clearSwitchScoresInt() {
}
function drawLevel() {
game.attachMovie("Score", "Score", 40, {_x:420, _y:462});
game.attachMovie("Pause Menu", "PauseMenu", 99999, {_x:-1, _y:0.1});
game.attachMovie("Farmer", "farmer", 19, {_x:farmerXPos, _y:farmerYPos});
game.attachMovie("Turnip_man", "turnipman", 41, {_x:turnipXPos, _y:turnipYPos});
game.attachMovie("Sky", "sky", 1, {_x:250, _y:57.3});
game.attachMovie("Mts", "mts", 2, {_x:248.3, _y:116.5});
game.mts._alpha = 55;
game.mts._width = 501.9;
game.mts._height = 18.1;
game.attachMovie("Windmill", "windmill", 3, {_x:44.5, _y:72});
game.windmill._width = 63;
game.windmill._height = 89.4;
game.attachMovie("Ground", "ground", 4, {_x:0, _y:114.7});
game.attachMovie("Lane", "lane1mc", 5, {_x:25, _y:272.4});
game.attachMovie("Lane", "lane2mc", 6, {_x:75, _y:272.4});
game.attachMovie("Score_text_pop", "lane1_2score", 51, {_x:50, _y:75});
game.attachMovie("Score_text_pop2", "multitext", 80000, {_x:250, _y:275});
game.attachMovie("Lane", "lane3mc", 7, {_x:125, _y:272.4});
game.attachMovie("Score_text_pop", "lane2_3score", 52, {_x:100, _y:75});
game.attachMovie("Lane", "lane4mc", 8, {_x:175, _y:272.4});
game.attachMovie("Score_text_pop", "lane3_4score", 53, {_x:150, _y:75});
game.attachMovie("Lane", "lane5mc", 9, {_x:225, _y:272.4});
game.attachMovie("Score_text_pop", "lane4_5score", 54, {_x:200, _y:75});
game.attachMovie("Lane", "lane6mc", 10, {_x:275, _y:272.4});
game.attachMovie("Score_text_pop", "lane5_6score", 55, {_x:250, _y:75});
game.attachMovie("Lane", "lane7mc", 11, {_x:325, _y:272.4});
game.attachMovie("Score_text_pop", "lane6_7score", 56, {_x:300, _y:75});
game.attachMovie("Lane", "lane8mc", 12, {_x:375, _y:272.4});
game.attachMovie("Score_text_pop", "lane7_8score", 57, {_x:350, _y:75});
game.attachMovie("Lane", "lane9mc", 13, {_x:425, _y:272.4});
game.attachMovie("Score_text_pop", "lane8_9score", 58, {_x:400, _y:75});
game.attachMovie("Lane", "lane10mc", 14, {_x:475, _y:272.4});
game.attachMovie("Score_text_pop", "lane9_10score", 59, {_x:450, _y:75});
game.attachMovie("Turnip_Home", "turniphome", 15, {_x:0, _y:431.4});
game.attachMovie("Wire", "wire", 16, {_x:33, _y:267.1});
game.attachMovie("Cat_clock", "clock", 38, {_x:361, _y:480});
game.attachMovie("Turnip_Pile_Right", "turnippiler", 42, {_x:455.9, _y:519.9});
game.attachMovie("Turnip_Pile_Left", "turnippilel", 43, {_x:46.1, _y:519.9});
game.attachMovie("HomeSign", "HomeSign", 39, {_x:160, _y:520});
game.attachMovie("Ground_Top", "groundtop", 9000, {_x:0, _y:105.5});
game.attachMovie("Ground_Bottom", "groundbottom", 9001, {_x:0, _y:425.4});
if (level == 3) {
game.attachMovie("Plus Rotten", "plusrotten", 80001, {_x:250, _y:275});
} else if (level == 4) {
game.attachMovie("Plus Yellow", "plusyellow", 80001, {_x:250, _y:275});
} else if (level == 5) {
game.attachMovie("More Rotten", "morerotten", 80001, {_x:250, _y:275});
}
turn1flash = game.attachMovie("Flasher", "flasher1", 5001, {_x:0, _y:130});
turn2flash = game.attachMovie("Flasher", "flasher2", 5002, {_x:0, _y:130});
r = 0;
while (r < grid.length) {
c = 0;
while (c < grid[r].length) {
xPos = 25 + (c * 50);
yPos = 118 + (r * 60);
colorNum = getTurnipColor(r, c);
if (colorNum == 1) {
turn = game.attachMovie("Turnip_Wild", (("turnip" + r) + "x") + c, depth, {_x:xPos, _y:yPos});
} else if (colorNum == 2) {
turn = game.attachMovie("Turnip_Blue", (("turnip" + r) + "x") + c, depth, {_x:xPos, _y:yPos});
} else if (colorNum == 3) {
turn = game.attachMovie("Turnip_Red", (("turnip" + r) + "x") + c, depth, {_x:xPos, _y:yPos});
} else if (colorNum == 4) {
turn = game.attachMovie("Turnip_Green", (("turnip" + r) + "x") + c, depth, {_x:xPos, _y:yPos});
} else if (colorNum == 5) {
turn = game.attachMovie("Turnip_Yellow", (("turnip" + r) + "x") + c, depth, {_x:xPos, _y:yPos});
} else if (colorNum == 6) {
turn = game.attachMovie("Turnip_Rotten", (("turnip" + r) + "x") + c, depth, {_x:xPos, _y:yPos});
}
stalkNum = getTurnipStalk(r, c);
turn.leaves.gotoAndStop(stalkNum);
depth++;
rotate = Math.round(Math.random() * 30) - 15;
turn._rotation = turn._rotation + rotate;
c++;
}
r++;
}
}
function drawNewspaper() {
paperloaded = true;
game.attachMovie("Newspaper", "np", 1, {_x:-212, _y:289.4});
if (totalscore > 6000) {
} else if (totalscore > 4000) {
game.np.nptween.ribbonmotion.ribbon.gotoAndStop(2);
} else if (totalscore >= 3000) {
game.np.nptween.ribbonmotion.ribbon.gotoAndStop(3);
}
mochi.MochiScores.requestList(this, "score_received");
}
function loadLevelStuff() {
_root.createEmptyMovieClip("game", 1);
if (level > 5) {
drawNewspaper();
} else {
achshow = false;
dontgoback = false;
switchscore = false;
totalpausetime = 0;
pausepressed = false;
gamepaused = false;
multiplier = 1;
paperloaded = false;
roundscore = 0;
scoreload = false;
endlevel = false;
farmerXPos = 0;
farmerYPos = 59.4;
turnipXPos = 250;
turnipYPos = 504;
turnipsAcross = 10;
turnipsHigh = 6;
depth = 2000;
throwDepth = 10000;
turnipmove = false;
lane1queue = new Array();
lane2queue = new Array();
depth1queue = new Array();
depth2queue = new Array();
added = false;
turnipmove = false;
manleft = false;
manright = false;
turnip1hold = undefined;
turnip2hold = undefined;
endgame = false;
totals = {c1:0, c2:0, c3:0, c4:0, c5:0, c6:0, c7:0, c8:0, c9:0};
grid = createGrid(level, turnipsHigh, turnipsAcross);
drawLevel();
timeTaken = getTimer();
}
}
function createGrid(l, h, a) {
switch (l) {
case 1 :
totalWild = 13;
totalBlue = 18;
totalRed = 18;
totalGreen = 18;
totalYellow = 0;
totalRotten = 0;
totalOne = 22;
totalTwo = 22;
totalThree = 22;
targetScore = 500;
nextTargetScore = 1000;
totaltime = 60000;
percents = {wild:19, blue:27, red:27, green:27, yellow:0, rotten:0};
break;
case 2 :
totalWild = 13;
totalBlue = 18;
totalRed = 18;
totalGreen = 18;
totalYellow = 0;
totalRotten = 0;
totalOne = 22;
totalTwo = 22;
totalThree = 22;
targetScore = 1000;
nextTargetScore = 1500;
totaltime = 60000;
percents = {wild:19, blue:27, red:27, green:27, yellow:0, rotten:0};
break;
case 3 :
totalWild = 12;
totalBlue = 18;
totalRed = 18;
totalGreen = 18;
totalYellow = 0;
totalRotten = 5;
totalOne = 22;
totalTwo = 22;
totalThree = 22;
targetScore = 1500;
nextTargetScore = 2000;
totaltime = 60000;
percents = {wild:16, blue:26, red:26, green:26, yellow:0, rotten:6};
break;
case 4 :
totalWild = 11;
totalBlue = 16;
totalRed = 16;
totalGreen = 16;
totalYellow = 16;
totalRotten = 5;
totalOne = 22;
totalTwo = 22;
totalThree = 22;
targetScore = 2000;
nextTargetScore = 3000;
totaltime = 60000;
percents = {wild:14, blue:20, red:20, green:20, yellow:20, rotten:6};
break;
case 5 :
totalWild = 9;
totalBlue = 16;
totalRed = 16;
totalGreen = 16;
totalYellow = 16;
totalRotten = 8;
totalOne = 22;
totalTwo = 22;
totalThree = 22;
targetScore = 3000;
nextTargetScore = "None";
totaltime = 60000;
percents = {wild:11, blue:20, red:20, green:20, yellow:20, rotten:9};
break;
default :
totalWild = 10;
totalBlue = 20;
totalRed = 20;
totalGreen = 20;
totalYellow = 20;
totalRotten = 0;
totalOne = 24;
totalTwo = 24;
totalThree = 24;
targetScore = 500;
totaltime = 60000;
percents = {wild:12, blue:22, red:22, green:22, yellow:22, rotten:0};
}
wild = 0;
blue = 0;
red = 0;
green = 0;
yellow = 0;
rotten = 0;
one = 0;
two = 0;
three = 0;
grid = new Array();
r = 0;
while (r < h) {
grid[r] = new Array();
c = 0;
while (c < a) {
yay1 = false;
yay2 = false;
do {
num = Math.ceil(Math.random() * 100);
if ((num <= percents.wild) && (wild < totalWild)) {
number1 = 10;
wild++;
yay1 = true;
} else if ((num <= (percents.wild + percents.blue)) && (blue < totalBlue)) {
number1 = 20;
blue++;
yay1 = true;
} else if ((num <= ((percents.wild + percents.blue) + percents.red)) && (red < totalRed)) {
number1 = 30;
red++;
yay1 = true;
} else if ((num <= (((percents.wild + percents.blue) + percents.red) + percents.green)) && (green < totalGreen)) {
number1 = 40;
green++;
yay1 = true;
} else if ((num <= ((((percents.wild + percents.blue) + percents.red) + percents.green) + percents.yellow)) && (yellow < totalYellow)) {
number1 = 50;
yellow++;
yay1 = true;
} else if ((num <= (((((percents.wild + percents.blue) + percents.red) + percents.green) + percents.yellow) + percents.rotten)) && (rotten < totalRotten)) {
number1 = 60;
rotten++;
yay1 = true;
}
} while (yay1 == false);
do {
number2 = Math.ceil(Math.random() * 3);
if ((number2 == 1) && (one < totalOne)) {
one++;
yay2 = true;
}
if ((number2 == 2) && (two < totalTwo)) {
two++;
yay2 = true;
}
if ((number2 == 3) && (three < totalThree)) {
three++;
yay2 = true;
}
} while (yay2 == false);
grid[r][c] = number1 + number2;
c++;
}
r++;
}
endlevel = false;
return(grid);
}
function getTurnipColor(r, c) {
return(Math.floor(grid[r][c] / 10));
}
function getTurnipStalk(r, c) {
return(grid[r][c] % 10);
}
function getTurnipColor2(t) {
return(Math.floor(t / 10));
}
function getTurnipStalk2(t) {
return(t % 10);
}
function calculateBoxLane(x) {
return(Math.round(x / 50));
}
function getTurnipSelected(lane) {
return(grid[0][lane - 1]);
}
function calculateRoundScore() {
if (roundscore < 0) {
roundscore = 0;
}
}
function compareTurnips(t1, t2) {
comparescore = 0;
updatemulti = false;
colorNum1 = getTurnipColor2(t1);
colorNum2 = getTurnipColor2(t2);
stalkNum1 = getTurnipStalk2(t1);
stalkNum2 = getTurnipStalk2(t2);
if ((colorNum1 == 1) && (colorNum1 == colorNum2)) {
if (stalkNum1 == stalkNum2) {
totals.c9++;
comparescore = 50 * multiplier;
multiplier = multiplier + 2;
updatemulti = true;
} else {
totals.c8++;
comparescore = 40 * multiplier;
multiplier = 1;
}
} else if (((colorNum1 == 1) || (colorNum2 == 1)) && ((colorNum1 != 6) && (colorNum2 != 6))) {
if (stalkNum1 == stalkNum2) {
totals.c7++;
comparescore = 30 * multiplier;
multiplier = multiplier + 1;
updatemulti = true;
} else {
totals.c6++;
comparescore = 20 * multiplier;
multiplier = 1;
}
} else if (((((colorNum1 == 6) || (colorNum2 == 6)) && (colorNum1 != colorNum2)) && (colorNum1 != 1)) && (colorNum2 != 1)) {
totals.c5++;
comparescore = -50;
norotten = false;
multiplier = 1;
} else if (((colorNum1 == 1) && (colorNum2 == 6)) || ((colorNum1 == 6) && (colorNum2 == 1))) {
comparescore = 20 * multiplier;
norotten = false;
multiplier = 1;
} else if ((colorNum1 != colorNum2) && (stalkNum1 != stalkNum2)) {
totals.c4++;
comparescore = -50;
multiplier = 1;
} else if (((colorNum1 == colorNum2) && (stalkNum1 == stalkNum2)) && (colorNum1 != 6)) {
totals.c3++;
comparescore = 30 * multiplier;
multiplier = multiplier + 1;
updatemulti = true;
} else if (stalkNum1 == stalkNum2) {
totals.c2++;
comparescore = 10 * multiplier;
multiplier = 1;
} else if ((colorNum1 == colorNum2) && (colorNum1 != 6)) {
totals.c1++;
comparescore = 10 * multiplier;
multiplier = 1;
} else if ((colorNum1 == colorNum2) && (colorNum1 == 6)) {
endgame = true;
comparescore = -200;
norotten = false;
multiplier = 1;
}
roundscore = roundscore + comparescore;
return(comparescore);
}
function pickTurnips() {
lane = calculateBoxLane(moveToX);
turnip1 = getTurnipSelected(lane);
turnip2 = getTurnipSelected(lane + 1);
if ((turnip1 != undefined) && (turnip2 != undefined)) {
turnippull.start(0, 1);
comparescore = compareTurnips(turnip1, turnip2);
moveTurnipsUp(lane, lane + 1);
if (comparescore < 0) {
game[((("lane" + lane) + "_") + (lane + 1)) + "score"]._alpha = 100;
game[((("lane" + lane) + "_") + (lane + 1)) + "score"].score.text = comparescore;
} else {
game[((("lane" + lane) + "_") + (lane + 1)) + "score"]._alpha = 100;
game[((("lane" + lane) + "_") + (lane + 1)) + "score"].score.text = "+" + comparescore;
}
if (updatemulti == true) {
game.multitext._alpha = 100;
game.multitext.score.text = "x" + multiplier;
mtxt = new TextFormat();
if (multiplier == 2) {
mtxt.color = 8320669 /* 0x7EF69D */;
} else if (multiplier == 3) {
mtxt.color = 16154343 /* 0xF67EE7 */;
} else if (multiplier == 4) {
mtxt.color = 8303094 /* 0x7EB1F6 */;
} else if (multiplier >= 5) {
mtxt.color = 16182398 /* 0xF6EC7E */;
}
game.multitext.score.setTextFormat(mtxt);
}
}
}
function moveTurnipsUp(lane1, lane2) {
l1 = lane1 - 1;
l2 = lane2 - 1;
depth1queue.unshift(game["turnip0x" + l1].getDepth());
depth2queue.unshift(game["turnip0x" + l2].getDepth());
game["turnip0x" + l1].duplicateMovieClip("throw" + throwDepth, throwDepth);
game["throw" + throwDepth].gotoAndStop(2);
throwDepth++;
game["turnip0x" + l1].removeMovieClip();
game["turnip0x" + l2].duplicateMovieClip("throw" + throwDepth, throwDepth);
game["throw" + throwDepth].gotoAndStop(3);
throwDepth++;
game["turnip0x" + l2].removeMovieClip();
i = 0;
while (i < grid.length) {
k = i + 1;
grid[i][l1] = grid[k][l1];
grid[i][l2] = grid[k][l2];
game[(("turnip" + i) + "x") + l1] = game[(("turnip" + k) + "x") + l1];
game[(("turnip" + i) + "x") + l2] = game[(("turnip" + k) + "x") + l2];
i++;
}
if (throwDepth > 10100) {
throwDepth = 10000;
}
lane1queue.unshift(lane1);
lane2queue.unshift(lane2);
updateLevel();
}
function updateLevel() {
checkturn = false;
i = 0;
while (i < grid.length) {
k = 0;
while (k < grid[i].length) {
x = 25 + (k * 50);
y = 118 + (i * 60);
game[(("turnip" + i) + "x") + k]._x = x;
game[(("turnip" + i) + "x") + k]._y = y;
if (game[(("turnip" + i) + "x") + k] != undefined) {
checkturn = true;
}
k++;
}
i++;
}
if (checkturn == false) {
allturnipsgone = true;
}
}
function addTurnips(lane1, lane2) {
l1 = lane1 - 1;
l2 = lane2 - 1;
depth1 = depth1queue.pop();
depth2 = depth2queue.pop();
r = turnipsHigh - 1;
c = l1;
grid[r][c] = turnip1hold;
xPos = 25 + (c * 50);
yPos = 118 + (r * 60);
colorNum = getTurnipColor(r, c);
if (colorNum == 1) {
turn = game.attachMovie("Turnip_Wild", (("turnip" + r) + "x") + c, depth1, {_x:xPos, _y:yPos});
} else if (colorNum == 2) {
turn = game.attachMovie("Turnip_Blue", (("turnip" + r) + "x") + c, depth1, {_x:xPos, _y:yPos});
} else if (colorNum == 3) {
turn = game.attachMovie("Turnip_Red", (("turnip" + r) + "x") + c, depth1, {_x:xPos, _y:yPos});
} else if (colorNum == 4) {
turn = game.attachMovie("Turnip_Green", (("turnip" + r) + "x") + c, depth1, {_x:xPos, _y:yPos});
} else if (colorNum == 5) {
turn = game.attachMovie("Turnip_Yellow", (("turnip" + r) + "x") + c, depth1, {_x:xPos, _y:yPos});
} else if (colorNum == 6) {
turn = game.attachMovie("Turnip_Rotten", (("turnip" + r) + "x") + c, depth1, {_x:xPos, _y:yPos});
}
stalkNum = getTurnipStalk(r, c);
turn.leaves.gotoAndStop(stalkNum);
rotate = Math.round(Math.random() * 30) - 15;
turn._rotation = turn._rotation + rotate;
game[(("turnip" + r) + "x") + c] = turn;
moveTurnipUp(lane1);
r = turnipsHigh - 1;
c = l2;
grid[r][c] = turnip2hold;
xPos = 25 + (c * 50);
yPos = 118 + (r * 60);
colorNum = getTurnipColor(r, c);
if (colorNum == 1) {
turn = game.attachMovie("Turnip_Wild", (("turnip" + r) + "x") + c, depth2, {_x:xPos, _y:yPos});
} else if (colorNum == 2) {
turn = game.attachMovie("Turnip_Blue", (("turnip" + r) + "x") + c, depth2, {_x:xPos, _y:yPos});
} else if (colorNum == 3) {
turn = game.attachMovie("Turnip_Red", (("turnip" + r) + "x") + c, depth2, {_x:xPos, _y:yPos});
} else if (colorNum == 4) {
turn = game.attachMovie("Turnip_Green", (("turnip" + r) + "x") + c, depth2, {_x:xPos, _y:yPos});
} else if (colorNum == 5) {
turn = game.attachMovie("Turnip_Yellow", (("turnip" + r) + "x") + c, depth2, {_x:xPos, _y:yPos});
} else if (colorNum == 6) {
turn = game.attachMovie("Turnip_Rotten", (("turnip" + r) + "x") + c, depth2, {_x:xPos, _y:yPos});
}
stalkNum = getTurnipStalk(r, c);
turn.leaves.gotoAndStop(stalkNum);
rotate = Math.round(Math.random() * 30) - 15;
turn._rotation = turn._rotation + rotate;
game[(("turnip" + r) + "x") + c] = turn;
moveTurnipUp(lane2);
updateLevel();
}
function moveTurnipUp(lane) {
l = lane - 1;
i = grid.length - 1;
while (i > 0) {
k = i - 1;
if (grid[k][l] == undefined) {
grid[k][l] = grid[i][l];
grid[i][l] = undefined;
game[(("turnip" + k) + "x") + l] = game[(("turnip" + i) + "x") + l];
game[(("turnip" + i) + "x") + l] = undefined;
} else {
break;
}
i--;
}
}
function moveTurnipMan() {
if ((manleft == false) && (manright == false)) {
if (game.turnipman._x <= 250) {
manleft = true;
} else {
manright = true;
}
}
lane1 = lane1queue.pop();
lane2 = lane2queue.pop();
if (manleft == true) {
xtspeed = 12;
}
if (manright == true) {
xtspeed = -12;
}
if (((manleft == true) && (game.turnipman._x <= 40)) && (turnipmove == false)) {
turnipmove = true;
num = Math.ceil(Math.random() * 100);
if (num <= percents.wild) {
number1 = 10;
} else if (num <= (percents.wild + percents.blue)) {
number1 = 20;
} else if (num <= ((percents.wild + percents.blue) + percents.red)) {
number1 = 30;
} else if (num <= (((percents.wild + percents.blue) + percents.red) + percents.green)) {
number1 = 40;
} else if (num <= ((((percents.wild + percents.blue) + percents.red) + percents.green) + percents.yellow)) {
number1 = 50;
} else if (num <= (((((percents.wild + percents.blue) + percents.red) + percents.green) + percents.yellow) + percents.rotten)) {
number1 = 60;
}
number2 = Math.ceil(Math.random() * 3);
turnip1hold = number1 + number2;
num = Math.ceil(Math.random() * 100);
if (num <= percents.wild) {
number1 = 10;
} else if (num <= (percents.wild + percents.blue)) {
number1 = 20;
} else if (num <= ((percents.wild + percents.blue) + percents.red)) {
number1 = 30;
} else if (num <= (((percents.wild + percents.blue) + percents.red) + percents.green)) {
number1 = 40;
} else if (num <= ((((percents.wild + percents.blue) + percents.red) + percents.green) + percents.yellow)) {
number1 = 50;
} else if (num <= (((((percents.wild + percents.blue) + percents.red) + percents.green) + percents.yellow) + percents.rotten)) {
number1 = 60;
}
number2 = Math.ceil(Math.random() * 3);
turnip2hold = number1 + number2;
xPos = -30;
yPos = 0;
colorNum = getTurnipColor2(turnip1hold);
if (colorNum == 1) {
turnhold1 = game.turnipman.attachMovie("Turnip_Wild", "turniphold", 300, {_x:xPos, _y:yPos});
} else if (colorNum == 2) {
turnhold1 = game.turnipman.attachMovie("Turnip_Blue", "turniphold", 300, {_x:xPos, _y:yPos});
} else if (colorNum == 3) {
turnhold1 = game.turnipman.attachMovie("Turnip_Red", "turniphold", 300, {_x:xPos, _y:yPos});
} else if (colorNum == 4) {
turnhold1 = game.turnipman.attachMovie("Turnip_Green", "turniphold", 300, {_x:xPos, _y:yPos});
} else if (colorNum == 5) {
turnhold1 = game.turnipman.attachMovie("Turnip_Yellow", "turniphold", 300, {_x:xPos, _y:yPos});
} else if (colorNum == 6) {
turnhold1 = game.turnipman.attachMovie("Turnip_Rotten", "turniphold", 300, {_x:xPos, _y:yPos});
}
xPos = 30;
yPos = 0;
colorNum = getTurnipColor2(turnip2hold);
if (colorNum == 1) {
turnhold2 = game.turnipman.attachMovie("Turnip_Wild", "turniphold2", 301, {_x:xPos, _y:yPos});
} else if (colorNum == 2) {
turnhold2 = game.turnipman.attachMovie("Turnip_Blue", "turniphold2", 301, {_x:xPos, _y:yPos});
} else if (colorNum == 3) {
turnhold2 = game.turnipman.attachMovie("Turnip_Red", "turniphold2", 301, {_x:xPos, _y:yPos});
} else if (colorNum == 4) {
turnhold2 = game.turnipman.attachMovie("Turnip_Green", "turniphold2", 301, {_x:xPos, _y:yPos});
} else if (colorNum == 5) {
turnhold2 = game.turnipman.attachMovie("Turnip_Yellow", "turniphold2", 301, {_x:xPos, _y:yPos});
} else if (colorNum == 6) {
turnhold2 = game.turnipman.attachMovie("Turnip_Rotten", "turniphold2", 301, {_x:xPos, _y:yPos});
}
}
if (((manright == true) && (game.turnipman._x >= 460)) && (turnipmove == false)) {
turnipmove = true;
num = Math.ceil(Math.random() * 100);
if (num <= percents.wild) {
number1 = 10;
} else if (num <= (percents.wild + percents.blue)) {
number1 = 20;
} else if (num <= ((percents.wild + percents.blue) + percents.red)) {
number1 = 30;
} else if (num <= (((percents.wild + percents.blue) + percents.red) + percents.green)) {
number1 = 40;
} else if (num <= ((((percents.wild + percents.blue) + percents.red) + percents.green) + percents.yellow)) {
number1 = 50;
} else if (num <= (((((percents.wild + percents.blue) + percents.red) + percents.green) + percents.yellow) + percents.rotten)) {
number1 = 60;
}
number2 = Math.ceil(Math.random() * 3);
turnip1hold = number1 + number2;
num = Math.ceil(Math.random() * 100);
if (num <= percents.wild) {
number1 = 10;
} else if (num <= (percents.wild + percents.blue)) {
number1 = 20;
} else if (num <= ((percents.wild + percents.blue) + percents.red)) {
number1 = 30;
} else if (num <= (((percents.wild + percents.blue) + percents.red) + percents.green)) {
number1 = 40;
} else if (num <= ((((percents.wild + percents.blue) + percents.red) + percents.green) + percents.yellow)) {
number1 = 50;
} else if (num <= (((((percents.wild + percents.blue) + percents.red) + percents.green) + percents.yellow) + percents.rotten)) {
number1 = 60;
}
number2 = Math.ceil(Math.random() * 3);
turnip2hold = number1 + number2;
xPos = -30;
yPos = 0;
colorNum = getTurnipColor2(turnip1hold);
if (colorNum == 1) {
turnhold1 = game.turnipman.attachMovie("Turnip_Wild", "turniphold", 300, {_x:xPos, _y:yPos});
} else if (colorNum == 2) {
turnhold1 = game.turnipman.attachMovie("Turnip_Blue", "turniphold", 300, {_x:xPos, _y:yPos});
} else if (colorNum == 3) {
turnhold1 = game.turnipman.attachMovie("Turnip_Red", "turniphold", 300, {_x:xPos, _y:yPos});
} else if (colorNum == 4) {
turnhold1 = game.turnipman.attachMovie("Turnip_Green", "turniphold", 300, {_x:xPos, _y:yPos});
} else if (colorNum == 5) {
turnhold1 = game.turnipman.attachMovie("Turnip_Yellow", "turniphold", 300, {_x:xPos, _y:yPos});
} else if (colorNum == 6) {
turnhold1 = game.turnipman.attachMovie("Turnip_Rotten", "turniphold", 300, {_x:xPos, _y:yPos});
}
xPos = 30;
yPos = 0;
colorNum = getTurnipColor2(turnip2hold);
if (colorNum == 1) {
turnhold2 = game.turnipman.attachMovie("Turnip_Wild", "turniphold2", 301, {_x:xPos, _y:yPos});
} else if (colorNum == 2) {
turnhold2 = game.turnipman.attachMovie("Turnip_Blue", "turniphold2", 301, {_x:xPos, _y:yPos});
} else if (colorNum == 3) {
turnhold2 = game.turnipman.attachMovie("Turnip_Red", "turniphold2", 301, {_x:xPos, _y:yPos});
} else if (colorNum == 4) {
turnhold2 = game.turnipman.attachMovie("Turnip_Green", "turniphold2", 301, {_x:xPos, _y:yPos});
} else if (colorNum == 5) {
turnhold2 = game.turnipman.attachMovie("Turnip_Yellow", "turniphold2", 301, {_x:xPos, _y:yPos});
} else if (colorNum == 6) {
turnhold2 = game.turnipman.attachMovie("Turnip_Rotten", "turniphold2", 301, {_x:xPos, _y:yPos});
}
}
if (turnipmove == true) {
xtspeed = -xtspeed;
}
game.turnipman._x = game.turnipman._x - xtspeed;
if (((game.turnipman._x > ((lane1 * 50) - 20)) && (game.turnipman._x < ((lane1 * 50) + 20))) && (turnipmove == true)) {
added = true;
turnipmove = false;
manleft = false;
manright = false;
turnhold1.removeMovieClip();
turnhold2.removeMovieClip();
addTurnips(lane1, lane2);
}
if (added == false) {
lane1queue.push(lane1);
lane2queue.push(lane2);
}
added = false;
}
function drawRules() {
dontgoback = true;
_root.createEmptyMovieClip("gamemenu", 2);
gamemenu.attachMovie("Floor", "Floor", 1, {_x:250.3, _y:334.1});
gamemenu.attachMovie("BG2", "BG2", 2, {_x:250, _y:60});
gamemenu.attachMovie("TTitle", "TTitle", 3, {_x:343.6, _y:50.8});
gamemenu.TTitle._width = 278.8;
gamemenu.TTitle._height = 61.8;
gamemenu.attachMovie("Table", "Table", 4, {_x:420.1, _y:439.8});
gamemenu.attachMovie("Turnipsi", "Turnipsi", 5, {_x:421.8, _y:405.3});
gamemenu.attachMovie("Cat_clock", "catclock", 6, {_x:336.9, _y:370.9});
gamemenu.catclock._width = 15.8;
gamemenu.catclock._height = 52.5;
gamemenu.attachMovie("House", "House", 7, {_x:319.1, _y:417.7});
gamemenu.attachMovie("Turnip text", "Turniptext", 8, {_x:280.4, _y:196.2});
gamemenu.attachMovie("Controls text", "Controlstext", 10, {_x:315.9, _y:528});
gamemenu.attachMovie("FarmerButtonMC", "fbmc", 15, {_x:83.2, _y:351.4});
gamemenu.attachMovie("ContinueMC", "ContinueMC", 18, {_x:447.1, _y:476.3});
}
function drawAchievements() {
dontgoback = true;
achshow = true;
_root.createEmptyMovieClip("gamemenu", 2);
gamemenu.attachMovie("Achievements bg", "Achievementsbg", 1, {_x:250, _y:275.5});
gamemenu.attachMovie("Trophy outlines", "outlines", 2, {_x:275.9, _y:329.1});
gamemenu.attachMovie("Reset Achievements MC", "ResetMC", 14, {_x:363, _y:30});
gamemenu.attachMovie("Appear in the newspaper", "ach1", 3, {_x:419.5, _y:170.5});
if (achieved[0] != 1) {
gamemenu.ach1._alpha = 0;
}
gamemenu.attachMovie("Clear all turnips and be positive", "ach2", 4, {_x:176.7, _y:206.7});
if (achieved[7] != 1) {
gamemenu.ach2._alpha = 0;
}
gamemenu.attachMovie("Earn a blue ribbon", "ach3", 5, {_x:66.8, _y:305.3});
if (achieved[2] != 1) {
gamemenu.ach3._alpha = 0;
}
gamemenu.attachMovie("Earn a red ribbon", "ach4", 6, {_x:347.8, _y:316.8});
if (achieved[1] != 1) {
gamemenu.ach4._alpha = 0;
}
gamemenu.attachMovie("Finish the game with 5000", "ach5", 7, {_x:442.2, _y:371});
if (achieved[3] != 1) {
gamemenu.ach5._alpha = 0;
}
gamemenu.attachMovie("Finish the game with 10000 points", "ach6", 8, {_x:294.5, _y:113.8});
if (achieved[4] != 1) {
gamemenu.ach6._alpha = 0;
}
gamemenu.attachMovie("No rottens", "ach7", 9, {_x:112.6, _y:77.3});
if (achieved[8] != 1) {
gamemenu.ach7._alpha = 0;
}
gamemenu.attachMovie("Secret", "ach8", 10, {_x:112, _y:428});
if (achieved[9] != 1) {
gamemenu.ach8._alpha = 0;
}
gamemenu.attachMovie("Single round score 3000", "ach9", 11, {_x:343, _y:478.4});
if (achieved[5] != 1) {
gamemenu.ach9._alpha = 0;
}
gamemenu.attachMovie("Single round score 7000", "ach10", 12, {_x:440, _y:478.7});
if (achieved[6] != 1) {
gamemenu.ach10._alpha = 0;
}
}
function score_updated() {
mochi.MochiScores.requestList(this, "score_received");
}
function score_received(args) {
game.np.nptween.createTextField("hsrank", 20, 35, -90, 20, 300);
game.np.nptween.createTextField("hsname", 21, 80, -90, 140, 300);
game.np.nptween.createTextField("hsscore", 22, 220, -90, 140, 300);
i = 0;
while (i < 15) {
if (args.scores.alltime.rows[i][1] != undefined) {
game.np.nptween.hsrank.text = game.np.nptween.hsrank.text + ((i + 1) + newline);
game.np.nptween.hsname.text = game.np.nptween.hsname.text + (args.scores.alltime.rows[i][1] + newline);
game.np.nptween.hsscore.text = game.np.nptween.hsscore.text + (args.scores.alltime.rows[i][0] + newline);
}
i++;
}
hstxt = new TextFormat();
hstxt.bold = true;
hstxt.font = "Times New Roman";
hstxt.size = 16;
hstxt.color = 5000268 /* 0x4C4C4C */;
hstxt.align = "right";
game.np.nptween.hsrank.setTextFormat(hstxt);
hstxt = new TextFormat();
hstxt.bold = true;
hstxt.font = "Times New Roman";
hstxt.size = 16;
hstxt.color = 5000268 /* 0x4C4C4C */;
hstxt.align = "left";
game.np.nptween.hsname.setTextFormat(hstxt);
hstxt = new TextFormat();
hstxt.bold = true;
hstxt.font = "Times New Roman";
hstxt.size = 16;
hstxt.color = 5000268 /* 0x4C4C4C */;
hstxt.align = "left";
game.np.nptween.hsscore.setTextFormat(hstxt);
}
stop();
country3.stop();
country3.start(0, 9999999);
country3.setVolume(0);
if (musicmuted == true) {
_root.attachMovie("Mute Button MC 2", "MuteButtonMC2", 30, {_x:480, _y:14});
} else {
_root.attachMovie("Mute Button MC", "MuteButtonMC", 30, {_x:480, _y:14});
}
achsliderexists = false;
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This game belongs to Aether Studios and UGO Player", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
level = 1;
roundscore = 0;
totalscore = 0;
loadLevelStuff();
submitted = false;
norotten = true;
allturnipsgone = false;
playbanjo = true;
secondtimethrough = false;
achlist = new Array();
onEnterFrame = function () {
if (achslider._currentframe == 90) {
achsliderexists = false;
achslider.removeMovieClip();
}
game.Score.frontscore1.text = roundscore;
game.Score.frontscore2.text = roundscore;
_root.MuteButtonMC.mutebtn.onRelease = function () {
toggleMusic();
};
_root.MuteButtonMC2.mutebtn.onRelease = function () {
toggleMusic();
};
if ((country3.getVolume() < 70) && (musicmuted == false)) {
country3.setVolume(country3.getVolume() + 1);
}
if (banjo.getVolume() > 0) {
banjo.setVolume(banjo.getVolume() - 1);
} else {
banjo.stop();
}
if (Key.isDown(77)) {
if (mpressed == false) {
toggleMusic();
}
mpressed = true;
} else {
mpressed = false;
}
if (Key.isDown(83)) {
if (spressed == false) {
toggleSound();
}
spressed = true;
} else {
spressed = false;
}
checkAchievements();
if (((achsliderexists == false) && (gamepaused == false)) && (achlist.length > 0)) {
achsliderexists = true;
_root.attachMovie("Achievement slider", "achslider", 20, {_x:250, _y:575});
num = achlist.pop();
showAchievement(num);
}
if (switchscore == true) {
if (rscore > 0) {
bclick.start(0, 1);
if ((rscore - changeby) < 0) {
changeby = changeby - (-(rscore - changeby));
}
rscore = rscore - changeby;
if (drainscore == true) {
totalscore = totalscore + changeby;
}
game.contsign.rscoret.text = rscore;
game.contsign.rscoreb.text = rscore;
game.contsign.tscoret.text = totalscore;
game.contsign.tscoreb.text = totalscore;
} else {
switchscore = false;
signpress = 2;
}
}
rcount = rcount + changeby;
rcount2++;
if (((((rcount < (quickgoto * 2)) && ((rcount2 % 2) == 0)) && (game.TurnipSlider._y > 290)) && (drainscore == true)) && (signpress == 1)) {
game.TurnipSlider._y = game.TurnipSlider._y - changeby;
}
if (game.TurnipSlider._y < 290) {
game.TurnipSlider._y = 290;
}
if (endlevel == false) {
if ((Key.isDown(80) && ((game.PauseMenu._currentframe == 16) || (game.PauseMenu._currentframe == 1))) && (dontgoback == false)) {
if (pausepressed == false) {
gamepaused = !gamepaused;
}
pausepressed = true;
pausegame();
} else {
pausepressed = false;
}
}
if ((endlevel == false) && (gamepaused == false)) {
timePassed = timeTaken - (getTimer() - totalpausetime);
if (((-timePassed) / totaltime) >= 1) {
game.removeMovieClip();
endlevel = true;
}
rotationTime = ((-timePassed) / totaltime) * 360;
game.clock.needle._rotation = rotationTime;
game.sky.gotoAndStop(Math.round(((-timePassed) / totaltime) * 240));
moveToX = _xmouse;
if (moveToX < game.lane1mc._width) {
moveToX = game.lane1mc._width;
} else if (moveToX > ((game.lane9mc._width / 2) + game.lane9mc._x)) {
moveToX = (game.lane9mc._width / 2) + game.lane9mc._x;
}
farmerXPos = farmerXPos + ((moveToX - game.farmer._x) * 0.15);
game.farmer._x = farmerXPos;
lane1s = calculateBoxLane(moveToX);
lane2s = calculateBoxLane(mveToX) + 1;
turn1flash._x = (lane1s * 50) - 25;
turn2flash._x = (lane1s * 50) + 25;
l1r = game["turnip0x" + (lane1s - 1)]._rotation;
l2r = game["turnip0x" + (lane2s - 1)]._rotation;
turn1flash._rotation = l1r;
turn2flash._rotation = l2r;
if ((lane1queue.length > 0) && (lane1queue.length > 0)) {
moveTurnipMan();
}
li = 1;
while (li < 10) {
if (game[((("lane" + li) + "_") + (li + 1)) + "score"]._alpha > 0) {
game[((("lane" + li) + "_") + (li + 1)) + "score"]._alpha = game[((("lane" + li) + "_") + (li + 1)) + "score"]._alpha - 2;
}
li++;
}
if (game.multitext._alpha > 0) {
game.multitext._alpha = game.multitext._alpha - 2;
}
} else if ((scoreload == false) && (gamepaused == false)) {
signpress = 0;
if ((totalscore + roundscore) >= targetScore) {
level++;
drainscore = true;
} else {
drainscore = false;
}
loadScore();
scoreload = true;
} else if ((paperloaded == true) && (gamepaused == false)) {
if ((Key.isDown(13) && (game.np.nptween.submitname.text != "")) && (submitted == false)) {
uscore = totalscore;
uname = game.np.nptween.submitname.text;
mochi.MochiScores.submit(uscore, uname, this, score_updated);
submitted = true;
game.np.removeMovieClip();
secondtimethrough = true;
drawNewspaper();
mochi.MochiScores.requestList(this, "score_received");
game.np.gotoAndStop(15);
}
}
game.np.nptween.submitscorebtn.submitscorebtn2.onRelease = function () {
if ((paperloaded == true) && (gamepaused == false)) {
if ((game.np.nptween.submitname.text != "") && (submitted == false)) {
uscore = totalscore;
uname = game.np.nptween.submitname.text;
mochi.MochiScores.submit(uscore, uname, this, score_updated);
submitted = true;
game.np.removeMovieClip();
secondtimethrough = true;
drawNewspaper();
mochi.MochiScores.requestList(this, "score_received");
game.np.gotoAndStop(15);
}
}
};
game.np.nptween.adv3btn.onRelease = function () {
game.removeMovieClip();
gotoAndStop (5);
};
game.PauseMenu.pmtween.rulesbtn.onRelease = function () {
drawRules();
game.PauseMenu.gotoAndStop(1);
};
game.PauseMenu.pmtween.achbtn.onRelease = function () {
drawAchievements();
game.PauseMenu.gotoAndStop(1);
};
game.PauseMenu.pmtween.quitbtn.onRelease = function () {
game.removeMovieClip();
gotoAndStop (5);
};
game.PauseMenu.pmtween.returnbtn.onRelease = function () {
gamepaused = false;
pausegame();
};
game.PauseMenu.pmtween.soundonbtn.onRelease = function () {
soundmuted = true;
toggleSound();
};
game.PauseMenu.pmtween.soundoffbtn.onRelease = function () {
soundmuted = false;
toggleSound();
};
game.PauseMenu.pmtween.musiconbtn.onRelease = function () {
musicmuted = true;
toggleMusic();
};
game.PauseMenu.pmtween.musicoffbtn.onRelease = function () {
musicmuted = false;
toggleMusic();
};
gamemenu.ContinueMC.contbtn.onRelease = function () {
gamemenu.removeMovieClip();
game.PauseMenu.gotoAndStop(16);
};
gamemenu.fbmc.farmbtn.onRelease = function () {
getURL ("http://secure-us.imrworldwide.com/cgi-bin/b?cg=ugoplayer_flash_games&ci=us-ugclicks&tu=http://www.ugoplayer.com", "_blank");
};
game.contsign.contsignbtn.onRelease = function () {
if (achshow == false) {
if (signpress == 0) {
switchScoresInt();
signpress = 1;
} else if (signpress == 1) {
clearSwitchScoresInt();
switchScores2();
signpress = 2;
} else if (signpress == 2) {
loadLevelStuff();
}
}
};
achslider.achpopbtn.onRelease = function () {
achslider.gotoAndStop(1);
gamepaused = true;
pausegame();
drawAchievements();
game.PauseMenu.gotoAndStop(1);
};
if ((achieved[0] == 1) && (gamemenu.ach1.hitTest(_xmouse, _ymouse, true))) {
gamemenu.attachMovie("Achievement slider 2", "ach1slider", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
gamemenu.ach1slider.achsmall.gotoAndStop(1);
gamemenu.ach1slider.achdes.text = achieve[0];
gamemenu.ach1slider2.removeMovieClip();
} else if (gamemenu.ach1.hitTest(_xmouse, _ymouse, true)) {
gamemenu.ach1slider.removeMovieClip();
gamemenu.attachMovie("Achievement slider 3", "ach1slider2", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
gamemenu.ach1slider2.achdes.text = achieve[0];
} else {
gamemenu.ach1slider.removeMovieClip();
gamemenu.ach1slider2.removeMovieClip();
}
if ((achieved[7] == 1) && (gamemenu.ach2.hitTest(_xmouse, _ymouse, true))) {
gamemenu.attachMovie("Achievement slider 2", "ach2slider", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
gamemenu.ach2slider.achsmall.gotoAndStop(8);
gamemenu.ach2slider.achdes.text = achieve[7];
gamemenu.ach2slider2.removeMovieClip();
} else if (gamemenu.ach2.hitTest(_xmouse, _ymouse, true)) {
gamemenu.ach2slider.removeMovieClip();
gamemenu.attachMovie("Achievement slider 3", "ach2slider2", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
gamemenu.ach2slider2.achdes.text = achieve[7];
} else {
gamemenu.ach2slider.removeMovieClip();
gamemenu.ach2slider2.removeMovieClip();
}
if ((achieved[2] == 1) && (gamemenu.ach3.hitTest(_xmouse, _ymouse, true))) {
gamemenu.attachMovie("Achievement slider 2", "ach3slider", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
gamemenu.ach3slider.achsmall.gotoAndStop(3);
gamemenu.ach3slider.achdes.text = achieve[2];
gamemenu.ach3slider2.removeMovieClip();
} else if (gamemenu.ach3.hitTest(_xmouse, _ymouse, true)) {
gamemenu.ach3slider.removeMovieClip();
gamemenu.attachMovie("Achievement slider 3", "ach3slider2", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
gamemenu.ach3slider2.achdes.text = achieve[2];
} else {
gamemenu.ach3slider.removeMovieClip();
gamemenu.ach3slider2.removeMovieClip();
}
if ((achieved[1] == 1) && (gamemenu.ach4.hitTest(_xmouse, _ymouse, true))) {
gamemenu.attachMovie("Achievement slider 2", "ach4slider", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
gamemenu.ach4slider.achsmall.gotoAndStop(2);
gamemenu.ach4slider.achdes.text = achieve[1];
gamemenu.ach4slider2.removeMovieClip();
} else if (gamemenu.ach4.hitTest(_xmouse, _ymouse, true)) {
gamemenu.ach4slider.removeMovieClip();
gamemenu.attachMovie("Achievement slider 3", "ach4slider2", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
gamemenu.ach4slider2.achdes.text = achieve[1];
} else {
gamemenu.ach4slider.removeMovieClip();
gamemenu.ach4slider2.removeMovieClip();
}
if ((achieved[3] == 1) && (gamemenu.ach5.hitTest(_xmouse, _ymouse, true))) {
gamemenu.attachMovie("Achievement slider 2", "ach5slider", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
gamemenu.ach5slider.achsmall.gotoAndStop(4);
gamemenu.ach5slider.achdes.text = achieve[3];
gamemenu.ach5slider2.removeMovieClip();
} else if (gamemenu.ach5.hitTest(_xmouse, _ymouse, true)) {
gamemenu.ach5slider.removeMovieClip();
gamemenu.attachMovie("Achievement slider 3", "ach5slider2", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
gamemenu.ach5slider2.achdes.text = achieve[3];
} else {
gamemenu.ach5slider.removeMovieClip();
gamemenu.ach5slider2.removeMovieClip();
}
if ((achieved[4] == 1) && (gamemenu.ach6.hitTest(_xmouse, _ymouse, true))) {
gamemenu.attachMovie("Achievement slider 2", "ach6slider", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
gamemenu.ach6slider.achsmall.gotoAndStop(5);
gamemenu.ach6slider.achdes.text = achieve[4];
gamemenu.ach6slider2.removeMovieClip();
} else if (gamemenu.ach6.hitTest(_xmouse, _ymouse, true)) {
gamemenu.ach6slider.removeMovieClip();
gamemenu.attachMovie("Achievement slider 3", "ach6slider2", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
gamemenu.ach6slider2.achdes.text = achieve[4];
} else {
gamemenu.ach6slider.removeMovieClip();
gamemenu.ach6slider2.removeMovieClip();
}
if ((achieved[8] == 1) && (gamemenu.ach7.hitTest(_xmouse, _ymouse, true))) {
gamemenu.attachMovie("Achievement slider 2", "ach7slider", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
gamemenu.ach7slider.achsmall.gotoAndStop(9);
gamemenu.ach7slider.achdes.text = achieve[8];
gamemenu.ach7slider2.removeMovieClip();
} else if (gamemenu.ach7.hitTest(_xmouse, _ymouse, true)) {
gamemenu.ach7slider.removeMovieClip();
gamemenu.attachMovie("Achievement slider 3", "ach7slider2", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
gamemenu.ach7slider2.achdes.text = achieve[8];
} else {
gamemenu.ach7slider.removeMovieClip();
gamemenu.ach7slider2.removeMovieClip();
}
if ((achieved[9] == 1) && (gamemenu.ach8.hitTest(_xmouse, _ymouse, true))) {
gamemenu.attachMovie("Achievement slider 2", "ach8slider", 43, {_x:_xmouse + 175, _y:_ymouse - 22});
gamemenu.ach8slider.achsmall.gotoAndStop(10);
gamemenu.ach8slider.achdes.text = achieve[9];
} else {
gamemenu.ach8slider.removeMovieClip();
}
if ((achieved[5] == 1) && (gamemenu.ach9.hitTest(_xmouse, _ymouse, true))) {
gamemenu.attachMovie("Achievement slider 2", "ach9slider", 43, {_x:_xmouse - 140, _y:_ymouse - 22});
gamemenu.ach9slider.achsmall.gotoAndStop(6);
gamemenu.ach9slider.achdes.text = achieve[5];
gamemenu.ach9slider2.removeMovieClip();
} else if (gamemenu.ach9.hitTest(_xmouse, _ymouse, true)) {
gamemenu.ach9slider.removeMovieClip();
gamemenu.attachMovie("Achievement slider 3", "ach9slider2", 43, {_x:_xmouse - 140, _y:_ymouse - 22});
gamemenu.ach9slider2.achdes.text = achieve[5];
} else {
gamemenu.ach9slider.removeMovieClip();
gamemenu.ach9slider2.removeMovieClip();
}
if ((achieved[6] == 1) && (gamemenu.ach10.hitTest(_xmouse, _ymouse, true))) {
gamemenu.attachMovie("Achievement slider 2", "ach10slider", 43, {_x:_xmouse - 140, _y:_ymouse - 22});
gamemenu.ach10slider.achsmall.gotoAndStop(7);
gamemenu.ach10slider.achdes.text = achieve[6];
gamemenu.ach10slider2.removeMovieClip();
} else if (gamemenu.ach10.hitTest(_xmouse, _ymouse, true)) {
gamemenu.ach10slider.removeMovieClip();
gamemenu.attachMovie("Achievement slider 3", "ach10slider2", 43, {_x:_xmouse - 140, _y:_ymouse - 22});
gamemenu.ach10slider2.achdes.text = achieve[6];
} else {
gamemenu.ach10slider.removeMovieClip();
gamemenu.ach10slider2.removeMovieClip();
}
gamemenu.ResetMC.resetbtn.onRelease = function () {
achievements.data.a1 = 0;
achieved[0] = 0;
achievements.data.a2 = 0;
achieved[1] = 0;
achievements.data.a3 = 0;
achieved[2] = 0;
achievements.data.a4 = 0;
achieved[3] = 0;
achievements.data.a5 = 0;
achieved[4] = 0;
achievements.data.a6 = 0;
achieved[5] = 0;
achievements.data.a7 = 0;
achieved[6] = 0;
achievements.data.a8 = 0;
achieved[7] = 0;
achievements.data.a9 = 0;
achieved[8] = 0;
achievements.data.a10 = 0;
achieved[9] = 0;
drawAchievements();
};
};
onMouseDown = function () {
if ((dontgoback == true) && (achshow == true)) {
if ((((!gamemenu.ResetMC.hitTest(_xmouse, _ymouse, false)) && (!_root.MuteButtonMC.hitTest(_xmouse, _ymouse, false))) && (!_root.MuteButtonMC2.hitTest(_xmouse, _ymouse, false))) && (!gamemenu.ach8.hitTest(_xmouse, _ymouse, false))) {
gamemenu.removeMovieClip();
dontgoback = false;
achshow = false;
game.PauseMenu.gotoAndStop(16);
}
} else if ((!_root.MuteButtonMC.hitTest(_xmouse, _ymouse, false)) && (!_root.MuteButtonMC2.hitTest(_xmouse, _ymouse, false))) {
if (game.HomeSign.hitTest(_xmouse, _ymouse, true) && (gamepaused == false)) {
gamepaused = true;
pausegame();
} else if ((gamepaused == false) && (endlevel == false)) {
farmerXPos = calculateBoxLane(moveToX) * 50;
game.farmer._x = farmerXPos;
game.farmer.gotoAndPlay(2);
pickTurnips();
}
}
};
Frame 8
function doSomething() {
}
function drawNewspaper() {
paperloaded = true;
game.attachMovie("Newspaper2", "np", 1, {_x:-212, _y:289.4});
mochi.MochiScores.requestList(this, "score_received");
game.np.gotoAndStop(15);
}
function toggleMusic() {
musicmuted = !musicmuted;
if (musicmuted == false) {
banjo.setVolume(70);
country3.setVolume(70);
_root.MuteButtonMC2.removeMovieClip();
_root.attachMovie("Mute Button MC", "MuteButtonMC", 30, {_x:480, _y:14});
} else {
banjo.setVolume(0);
country3.setVolume(0);
_root.MuteButtonMC.removeMovieClip();
_root.attachMovie("Mute Button MC 2", "MuteButtonMC2", 30, {_x:480, _y:14});
}
}
function toggleSound() {
soundmuted = !soundmuted;
if (soundmuted == false) {
turnippull.setVolume(70);
bclick.setVolume(65);
ribbonhit.setVolume(100);
achievesound.setVolume(80);
} else {
turnippull.setVolume(0);
bclick.setVolume(0);
ribbonhit.setVolume(0);
achievesound.setVolume(0);
}
}
function score_received(args) {
game.np.nptween.createTextField("hsrank", 20, 35, -90, 20, 300);
game.np.nptween.createTextField("hsname", 21, 80, -90, 140, 300);
game.np.nptween.createTextField("hsscore", 22, 220, -90, 140, 300);
i = 0;
while (i < 15) {
if (args.scores.alltime.rows[i][1] != undefined) {
game.np.nptween.hsrank.text = game.np.nptween.hsrank.text + ((i + 1) + newline);
game.np.nptween.hsname.text = game.np.nptween.hsname.text + (args.scores.alltime.rows[i][1] + newline);
game.np.nptween.hsscore.text = game.np.nptween.hsscore.text + (args.scores.alltime.rows[i][0] + newline);
}
i++;
}
hstxt = new TextFormat();
hstxt.bold = true;
hstxt.font = "Times New Roman";
hstxt.size = 16;
hstxt.color = 5000268 /* 0x4C4C4C */;
hstxt.align = "right";
game.np.nptween.hsrank.setTextFormat(hstxt);
hstxt = new TextFormat();
hstxt.bold = true;
hstxt.font = "Times New Roman";
hstxt.size = 16;
hstxt.color = 5000268 /* 0x4C4C4C */;
hstxt.align = "left";
game.np.nptween.hsname.setTextFormat(hstxt);
hstxt = new TextFormat();
hstxt.bold = true;
hstxt.font = "Times New Roman";
hstxt.size = 16;
hstxt.color = 5000268 /* 0x4C4C4C */;
hstxt.align = "left";
game.np.nptween.hsscore.setTextFormat(hstxt);
}
stop();
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This game belongs to Aether Studios and UGO Player", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
if (musicmuted == true) {
_root.attachMovie("Mute Button MC 2", "MuteButtonMC2", 30, {_x:480, _y:14});
} else {
_root.attachMovie("Mute Button MC", "MuteButtonMC", 30, {_x:480, _y:14});
}
_root.createEmptyMovieClip("game", 1);
drawNewspaper();
onEnterFrame = function () {
_root.MuteButtonMC.mutebtn.onRelease = function () {
toggleMusic();
};
_root.MuteButtonMC2.mutebtn.onRelease = function () {
toggleMusic();
};
if ((banjo.getVolume() < 70) && (musicmuted == false)) {
banjo.setVolume(banjo.getVolume() + 1);
}
if (country3.getVolume() > 0) {
country3.setVolume(country3.getVolume() - 1);
} else {
country3.stop();
}
game.np.nptween.adv3btn.onRelease = function () {
game.removeMovieClip();
gotoAndStop (5);
};
if (Key.isDown(77)) {
if (mpressed == false) {
toggleMusic();
}
mpressed = true;
} else {
mpressed = false;
}
if (Key.isDown(83)) {
if (spressed == false) {
toggleSound();
}
spressed = true;
} else {
spressed = false;
}
};
Frame 9
function doSomething() {
}
function drawAchievements() {
game.attachMovie("Achievements bg", "Achievementsbg", 1, {_x:250, _y:275.5});
game.attachMovie("Trophy outlines", "outlines", 2, {_x:275.9, _y:329.1});
game.attachMovie("Reset Achievements MC", "ResetMC", 14, {_x:363, _y:30});
game.attachMovie("Appear in the newspaper", "ach1", 3, {_x:419.5, _y:170.5});
if (achieved[0] != 1) {
game.ach1._alpha = 0;
}
game.attachMovie("Clear all turnips and be positive", "ach2", 4, {_x:176.7, _y:206.7});
if (achieved[7] != 1) {
game.ach2._alpha = 0;
}
game.attachMovie("Earn a blue ribbon", "ach3", 5, {_x:66.8, _y:305.3});
if (achieved[2] != 1) {
game.ach3._alpha = 0;
}
game.attachMovie("Earn a red ribbon", "ach4", 6, {_x:347.8, _y:316.8});
if (achieved[1] != 1) {
game.ach4._alpha = 0;
}
game.attachMovie("Finish the game with 5000", "ach5", 7, {_x:442.2, _y:371});
if (achieved[3] != 1) {
game.ach5._alpha = 0;
}
game.attachMovie("Finish the game with 10000 points", "ach6", 8, {_x:294.5, _y:113.8});
if (achieved[4] != 1) {
game.ach6._alpha = 0;
}
game.attachMovie("No rottens", "ach7", 9, {_x:112.6, _y:77.3});
if (achieved[8] != 1) {
game.ach7._alpha = 0;
}
game.attachMovie("Secret", "ach8", 10, {_x:112, _y:428});
if (achieved[9] != 1) {
game.ach8._alpha = 0;
}
game.attachMovie("Single round score 3000", "ach9", 11, {_x:343, _y:478.4});
if (achieved[5] != 1) {
game.ach9._alpha = 0;
}
game.attachMovie("Single round score 7000", "ach10", 12, {_x:440, _y:478.7});
if (achieved[6] != 1) {
game.ach10._alpha = 0;
}
}
function toggleMusic() {
musicmuted = !musicmuted;
if (musicmuted == false) {
banjo.setVolume(70);
country3.setVolume(70);
_root.MuteButtonMC2.removeMovieClip();
_root.attachMovie("Mute Button MC", "MuteButtonMC", 30, {_x:480, _y:14});
} else {
banjo.setVolume(0);
country3.setVolume(0);
_root.MuteButtonMC.removeMovieClip();
_root.attachMovie("Mute Button MC 2", "MuteButtonMC2", 30, {_x:480, _y:14});
}
}
function toggleSound() {
soundmuted = !soundmuted;
if (soundmuted == false) {
turnippull.setVolume(70);
bclick.setVolume(65);
ribbonhit.setVolume(100);
achievesound.setVolume(80);
} else {
turnippull.setVolume(0);
bclick.setVolume(0);
ribbonhit.setVolume(0);
achievesound.setVolume(0);
}
}
stop();
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This game belongs to Aether Studios and UGO Player", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
cangoback = true;
if (musicmuted == true) {
_root.attachMovie("Mute Button MC 2", "MuteButtonMC2", 30, {_x:480, _y:14});
} else {
_root.attachMovie("Mute Button MC", "MuteButtonMC", 30, {_x:480, _y:14});
}
_root.createEmptyMovieClip("game", 1);
drawAchievements();
onMouseDown = function () {
if (((((!game.ResetMC.hitTest(_xmouse, _ymouse, false)) && (!_root.MuteButtonMC.hitTest(_xmouse, _ymouse, false))) && (!_root.MuteButtonMC2.hitTest(_xmouse, _ymouse, false))) && (!_root.MuteButtonMC.hitTest(_xmouse, _ymouse, false))) && (!game.ach8.hitTest(_xmouse, _ymouse, false))) {
if (cangoback == true) {
cangoback = false;
game.removeMovieClip();
gotoAndStop (5);
}
}
};
onEnterFrame = function () {
_root.MuteButtonMC.mutebtn.onRelease = function () {
toggleMusic();
};
_root.MuteButtonMC2.mutebtn.onRelease = function () {
toggleMusic();
};
if ((banjo.getVolume() < 70) && (musicmuted == false)) {
banjo.setVolume(banjo.getVolume() + 1);
}
if (country3.getVolume() > 0) {
country3.setVolume(country3.getVolume() - 1);
} else {
country3.stop();
}
if (Key.isDown(77)) {
if (mpressed == false) {
toggleMusic();
}
mpressed = true;
} else {
mpressed = false;
}
if (Key.isDown(83)) {
if (spressed == false) {
toggleSound();
}
spressed = true;
} else {
spressed = false;
}
game.ResetMC.resetbtn.onRelease = function () {
achievements.data.a1 = 0;
achieved[0] = 0;
achievements.data.a2 = 0;
achieved[1] = 0;
achievements.data.a3 = 0;
achieved[2] = 0;
achievements.data.a4 = 0;
achieved[3] = 0;
achievements.data.a5 = 0;
achieved[4] = 0;
achievements.data.a6 = 0;
achieved[5] = 0;
achievements.data.a7 = 0;
achieved[6] = 0;
achievements.data.a8 = 0;
achieved[7] = 0;
achievements.data.a9 = 0;
achieved[8] = 0;
achievements.data.a10 = 0;
achieved[9] = 0;
drawAchievements();
};
if ((achieved[0] == 1) && (game.ach1.hitTest(_xmouse, _ymouse, true))) {
game.attachMovie("Achievement slider 2", "ach1slider", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
game.ach1slider.achsmall.gotoAndStop(1);
game.ach1slider.achdes.text = achieve[0];
game.ach1slider2.removeMovieClip();
} else if (game.ach1.hitTest(_xmouse, _ymouse, true)) {
game.ach1slider.removeMovieClip();
game.attachMovie("Achievement slider 3", "ach1slider2", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
game.ach1slider2.achdes.text = achieve[0];
} else {
game.ach1slider.removeMovieClip();
game.ach1slider2.removeMovieClip();
}
if ((achieved[7] == 1) && (game.ach2.hitTest(_xmouse, _ymouse, true))) {
game.attachMovie("Achievement slider 2", "ach2slider", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
game.ach2slider.achsmall.gotoAndStop(8);
game.ach2slider.achdes.text = achieve[7];
game.ach2slider2.removeMovieClip();
} else if (game.ach2.hitTest(_xmouse, _ymouse, true)) {
game.ach2slider.removeMovieClip();
game.attachMovie("Achievement slider 3", "ach2slider2", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
game.ach2slider2.achdes.text = achieve[7];
} else {
game.ach2slider.removeMovieClip();
game.ach2slider2.removeMovieClip();
}
if ((achieved[2] == 1) && (game.ach3.hitTest(_xmouse, _ymouse, true))) {
game.attachMovie("Achievement slider 2", "ach3slider", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
game.ach3slider.achsmall.gotoAndStop(3);
game.ach3slider.achdes.text = achieve[2];
game.ach3slider2.removeMovieClip();
} else if (game.ach3.hitTest(_xmouse, _ymouse, true)) {
game.ach3slider.removeMovieClip();
game.attachMovie("Achievement slider 3", "ach3slider2", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
game.ach3slider2.achdes.text = achieve[2];
} else {
game.ach3slider.removeMovieClip();
game.ach3slider2.removeMovieClip();
}
if ((achieved[1] == 1) && (game.ach4.hitTest(_xmouse, _ymouse, true))) {
game.attachMovie("Achievement slider 2", "ach4slider", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
game.ach4slider.achsmall.gotoAndStop(2);
game.ach4slider.achdes.text = achieve[1];
game.ach4slider2.removeMovieClip();
} else if (game.ach4.hitTest(_xmouse, _ymouse, true)) {
game.ach4slider.removeMovieClip();
game.attachMovie("Achievement slider 3", "ach4slider2", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
game.ach4slider2.achdes.text = achieve[1];
} else {
game.ach4slider.removeMovieClip();
game.ach4slider2.removeMovieClip();
}
if ((achieved[3] == 1) && (game.ach5.hitTest(_xmouse, _ymouse, true))) {
game.attachMovie("Achievement slider 2", "ach5slider", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
game.ach5slider.achsmall.gotoAndStop(4);
game.ach5slider.achdes.text = achieve[3];
game.ach5slider2.removeMovieClip();
} else if (game.ach5.hitTest(_xmouse, _ymouse, true)) {
game.ach5slider.removeMovieClip();
game.attachMovie("Achievement slider 3", "ach5slider2", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
game.ach5slider2.achdes.text = achieve[3];
} else {
game.ach5slider.removeMovieClip();
game.ach5slider2.removeMovieClip();
}
if ((achieved[4] == 1) && (game.ach6.hitTest(_xmouse, _ymouse, true))) {
game.attachMovie("Achievement slider 2", "ach6slider", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
game.ach6slider.achsmall.gotoAndStop(5);
game.ach6slider.achdes.text = achieve[4];
game.ach6slider2.removeMovieClip();
} else if (game.ach6.hitTest(_xmouse, _ymouse, true)) {
game.ach6slider.removeMovieClip();
game.attachMovie("Achievement slider 3", "ach6slider2", 43, {_x:_xmouse - 140, _y:_ymouse + 30});
game.ach6slider2.achdes.text = achieve[4];
} else {
game.ach6slider.removeMovieClip();
game.ach6slider2.removeMovieClip();
}
if ((achieved[8] == 1) && (game.ach7.hitTest(_xmouse, _ymouse, true))) {
game.attachMovie("Achievement slider 2", "ach7slider", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
game.ach7slider.achsmall.gotoAndStop(9);
game.ach7slider.achdes.text = achieve[8];
game.ach7slider2.removeMovieClip();
} else if (game.ach7.hitTest(_xmouse, _ymouse, true)) {
game.ach7slider.removeMovieClip();
game.attachMovie("Achievement slider 3", "ach7slider2", 43, {_x:_xmouse + 175, _y:_ymouse + 30});
game.ach7slider2.achdes.text = achieve[8];
} else {
game.ach7slider.removeMovieClip();
game.ach7slider2.removeMovieClip();
}
if ((achieved[9] == 1) && (game.ach8.hitTest(_xmouse, _ymouse, true))) {
game.attachMovie("Achievement slider 2", "ach8slider", 43, {_x:_xmouse + 175, _y:_ymouse - 22});
game.ach8slider.achsmall.gotoAndStop(10);
game.ach8slider.achdes.text = achieve[9];
} else {
game.ach8slider.removeMovieClip();
}
if ((achieved[5] == 1) && (game.ach9.hitTest(_xmouse, _ymouse, true))) {
game.attachMovie("Achievement slider 2", "ach9slider", 43, {_x:_xmouse - 140, _y:_ymouse - 22});
game.ach9slider.achsmall.gotoAndStop(6);
game.ach9slider.achdes.text = achieve[5];
game.ach9slider2.removeMovieClip();
} else if (game.ach9.hitTest(_xmouse, _ymouse, true)) {
game.ach9slider.removeMovieClip();
game.attachMovie("Achievement slider 3", "ach9slider2", 43, {_x:_xmouse - 140, _y:_ymouse - 22});
game.ach9slider2.achdes.text = achieve[5];
} else {
game.ach9slider.removeMovieClip();
game.ach9slider2.removeMovieClip();
}
if ((achieved[6] == 1) && (game.ach10.hitTest(_xmouse, _ymouse, true))) {
game.attachMovie("Achievement slider 2", "ach10slider", 43, {_x:_xmouse - 140, _y:_ymouse - 22});
game.ach10slider.achsmall.gotoAndStop(7);
game.ach10slider.achdes.text = achieve[6];
game.ach10slider2.removeMovieClip();
} else if (game.ach10.hitTest(_xmouse, _ymouse, true)) {
game.ach10slider.removeMovieClip();
game.attachMovie("Achievement slider 3", "ach10slider2", 43, {_x:_xmouse - 140, _y:_ymouse - 22});
game.ach10slider2.achdes.text = achieve[6];
} else {
game.ach10slider.removeMovieClip();
game.ach10slider2.removeMovieClip();
}
};
Symbol 17 Button
on (release) {
getURL ("http://secure-us.imrworldwide.com/cgi-bin/b?cg=ugoplayer_flash_games&ci=us-ugclicks&tu=http://www.ugoplayer.com", "_blank");
}
Symbol 26 MovieClip Frame 1
function nielsen(movieClip) {
scCI = "us-ugo";
scCG = "ugoplayer_flashgames";
scSI = escape(movieClip);
loadMovieNum ((((((("http://secure-us.imrworldwide.com/cgi-bin/m?ci=" + scCI) + "&cg=") + scCG) + "&si=") + scSI) + "&rnd=") + Math.ceil(Math.random() * 100000000), 100);
}
nielsen("game_intro");
Symbol 26 MovieClip Frame 165
stop();
Symbol 38 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 1
stop();
Symbol 57 MovieClip [Turnip_Yellow] Frame 1
stop();
Symbol 57 MovieClip [Turnip_Yellow] Frame 2
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x - xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 57 MovieClip [Turnip_Yellow] Frame 3
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x + xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation + 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 75 MovieClip [Turnip_Wild] Frame 1
stop();
Symbol 75 MovieClip [Turnip_Wild] Frame 2
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x - xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 75 MovieClip [Turnip_Wild] Frame 3
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x + xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation + 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 77 MovieClip [Turnip_White] Frame 1
stop();
Symbol 81 MovieClip [Turnip_Rotten] Frame 1
stop();
Symbol 81 MovieClip [Turnip_Rotten] Frame 2
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x - xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 81 MovieClip [Turnip_Rotten] Frame 3
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x + xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation + 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 83 MovieClip [Turnip_Red] Frame 1
stop();
Symbol 83 MovieClip [Turnip_Red] Frame 2
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x - xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 83 MovieClip [Turnip_Red] Frame 3
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x + xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation + 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 98 MovieClip [Turnip_Green] Frame 1
stop();
Symbol 98 MovieClip [Turnip_Green] Frame 2
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x - xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 98 MovieClip [Turnip_Green] Frame 3
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x + xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation + 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 100 MovieClip [Turnip_Blue] Frame 1
stop();
Symbol 100 MovieClip [Turnip_Blue] Frame 2
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x - xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 100 MovieClip [Turnip_Blue] Frame 3
stop();
xspeed = 2;
yspeed = 12;
gravity = 1;
alphadrop = 0;
alphadropi = 0.3;
onEnterFrame = function () {
this._alpha = this._alpha - alphadrop;
alphadrop = alphadrop + alphadropi;
this._x = this._x + xspeed;
this._y = this._y - yspeed;
yspeed = yspeed - gravity;
this._rotation = this._rotation + 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 102 MovieClip [Turnip] Frame 1
stop();
Symbol 137 MovieClip [Plus Yellow] Frame 60
stop();
Symbol 140 MovieClip [Plus Rotten] Frame 60
stop();
Symbol 145 MovieClip Frame 1
stop();
Symbol 174 MovieClip [Pause Menu] Frame 1
stop();
Symbol 174 MovieClip [Pause Menu] Frame 16
stop();
Symbol 174 MovieClip [Pause Menu] Frame 32
gotoAndStop (1);
Symbol 181 Button
on (release) {
getURL ("http://secure-us.imrworldwide.com/cgi-bin/b?cg=ugoplayer_flash_games&ci=us-ugclicks&tu=http://www.ugoplayer.com", "_blank");
}
Symbol 196 Button
on (release) {
_root.game.np.gotoAndPlay(2);
}
Symbol 206 MovieClip Frame 1
onEnterFrame = function () {
mydate = new Date();
date = mydate.getDate();
month = mydate.getMonth();
year = mydate.getFullYear();
day = mydate.getDay();
if (month == 0) {
month = "January";
} else if (month == 1) {
month = "February";
} else if (month == 2) {
month = "March";
} else if (month == 3) {
month = "April";
} else if (month == 4) {
month = "May";
} else if (month == 5) {
month = "June";
} else if (month == 6) {
month = "July";
} else if (month == 7) {
month = "August";
} else if (month == 8) {
month = "September";
} else if (month == 9) {
month = "October";
} else if (month == 10) {
month = "November";
} else if (month == 11) {
month = "December";
}
if (day == 0) {
day = "Sunday";
} else if (day == 1) {
day = "Monday";
} else if (day == 2) {
day = "Tuesday";
} else if (day == 3) {
day = "Wednesday";
} else if (day == 4) {
day = "Thursday";
} else if (day == 5) {
day = "Friday";
} else if (day == 6) {
day = "Saturday";
}
dateFinal = (((((day + ", ") + month) + " ") + date) + ", ") + year;
this.datetext.text = dateFinal;
};
Symbol 207 MovieClip [Newspaper2] Frame 1
stop();
Symbol 211 Button
on (release) {
_root.game.np.gotoAndPlay(16);
}
Symbol 222 MovieClip Frame 1
stop();
Symbol 223 MovieClip Frame 20
stop();
if ((_root.soundmuted == false) && (_root.secondtimethrough == false)) {
_root.ribbonhit.start(0, 1);
}
Symbol 225 MovieClip Frame 1
onEnterFrame = function () {
mydate = new Date();
date = mydate.getDate();
month = mydate.getMonth();
year = mydate.getFullYear();
day = mydate.getDay();
if (month == 0) {
month = "January";
} else if (month == 1) {
month = "February";
} else if (month == 2) {
month = "March";
} else if (month == 3) {
month = "April";
} else if (month == 4) {
month = "May";
} else if (month == 5) {
month = "June";
} else if (month == 6) {
month = "July";
} else if (month == 7) {
month = "August";
} else if (month == 8) {
month = "September";
} else if (month == 9) {
month = "October";
} else if (month == 10) {
month = "November";
} else if (month == 11) {
month = "December";
}
if (day == 0) {
day = "Sunday";
} else if (day == 1) {
day = "Monday";
} else if (day == 2) {
day = "Tuesday";
} else if (day == 3) {
day = "Wednesday";
} else if (day == 4) {
day = "Thursday";
} else if (day == 5) {
day = "Friday";
} else if (day == 6) {
day = "Saturday";
}
dateFinal = (((((day + ", ") + month) + " ") + date) + ", ") + year;
this.datetext.text = dateFinal;
};
Symbol 226 MovieClip [Newspaper] Frame 1
stop();
Symbol 226 MovieClip [Newspaper] Frame 15
stop();
Symbol 231 MovieClip [Mute Button MC 2] Frame 1
stop();
Symbol 235 MovieClip [Mute Button MC] Frame 1
stop();
Symbol 238 MovieClip [More rotten] Frame 60
stop();
Symbol 285 MovieClip [Menu Turnip] Frame 1
stop();
Symbol 346 MovieClip [Farmer] Frame 1
stop();
Symbol 386 MovieClip [Sky] Frame 1
stop();
Symbol 386 MovieClip [Sky] Frame 240
stop();
Symbol 403 MovieClip [Studios] Frame 90
stop();
Symbol 407 MovieClip Frame 60
stop();
Symbol 408 MovieClip [Letters] Frame 90
stop();
Symbol 414 MovieClip Frame 90
stop();
Symbol 418 MovieClip [fg] Frame 90
stop();
Symbol 420 Button
on (release) {
getURL ("http://www.aetherstudios.com", "_blank");
}
Symbol 424 MovieClip Frame 90
stop();
Symbol 439 Button
on (release) {
getURL ("http://secure-us.imrworldwide.com/cgi-bin/b?cg=ugoplayer_flash_games&ci=us-ugclicks&tu=http://www.ugoplayer.com", "_blank");
}
Symbol 450 MovieClip [Achievement slider 3] Frame 1
stop();
Symbol 473 MovieClip [achsmall] Frame 1
stop();
Symbol 473 MovieClip [achsmall] Frame 2
stop();
Symbol 473 MovieClip [achsmall] Frame 3
stop();
Symbol 473 MovieClip [achsmall] Frame 4
stop();
Symbol 473 MovieClip [achsmall] Frame 5
stop();
Symbol 473 MovieClip [achsmall] Frame 6
stop();
Symbol 473 MovieClip [achsmall] Frame 7
stop();
Symbol 473 MovieClip [achsmall] Frame 8
stop();
Symbol 473 MovieClip [achsmall] Frame 9
stop();
Symbol 473 MovieClip [achsmall] Frame 10
stop();
Symbol 476 MovieClip [Achievement slider 2] Frame 1
stop();
Symbol 478 MovieClip [Achievement slider] Frame 90
stop();
Symbol 486 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 487 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.31");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}