Combined Code
frame 1 {
var savefile = SharedObject.getLocal('the_game');
trace(savefile.data.alcoholism_score);
if (savefile.data.alcoholism_score == undefined) {
savefile.data.alcoholism_score = 0;
savefile.flush();
}
if (savefile.data.troll_score == undefined) {
savefile.data.troll_score = 0;
savefile.flush();
}
if (savefile.data.bush_score == undefined) {
savefile.data.bush_score = 0;
savefile.flush();
}
savefile.flush();
trace(savefile.data.alcoholism_score);
}
frame 1 {
menuChange = new ContextMenu();
menuChange.hideBuiltInItems();
_root.menu = menuChange;
}
frame 1 {
MochiAd.showClickAwayAd({'id': '50a0408150b05432', 'clip': clickawayad_mc});
btn_mainMenu_clickaway.onRelease = function () {
MochiAd.unload(clickawayad_mc);
gotoAndPlay('f_mainMenu');
};
stop();
}
frame 1 {
stop();
}
movieClip 4 {
}
movieClip 5 {
instance dollar of movieClip 4 {
onClipEvent (load) {
tellTarget ('_parent') {
_y = random(250);
n = random(360);
falling = random(20) / 1.5 + 2;
movement = random(5) / 1.5 + 1;
_rotation = 0;
}
}
onClipEvent (enterFrame) {
tellTarget ('_parent') {
_y = _y + 2;
if (_y < 250) {
_x = _root.player._x;
}
_x = _x + movement * Math.sin(n);
_rotation = -movement * Math.sin(n) * 3;
n += 0.1;
if (_y > 450) {
movement = random(5) / 1.5 + 1;
_rotation = 0;
_y = 200 - random(50);
falling = random(20) / 1.5 + 2;
}
}