Frame 1
addEventListener("enterFrame", callback_handler);
this.onEnterFrame = function () {
var _local7 = new Date();
var _local13 = _local7.getFullYear();
var _local11 = _local7.getTime();
var _local9 = new Date(_global.destiny, _global.month2, _global.day2);
var _local10 = _local9.getTime();
var _local8 = _local10 - _local11;
var _local3 = Math.floor(_local8 / 1000);
var _local5 = Math.floor(_local3 / 60);
var _local4 = Math.floor(_local5 / 60);
var _local2 = Math.floor(_local4 / 24);
var _local6 = Math.floor(_local2 / 365);
_local3 = String(_local3 % 60);
if (_local3.length < 2) {
}
_local5 = String(_local5 % 60);
if (_local5.length < 10) {
}
_local4 = String(_local4 % 24);
if (_local4.length < 10) {
}
_local2 = String(_local2 % 365);
if (_local2.length < 10) {
}
_local6 = String(_local6);
var _local12 = ((((((((("Viel\u00E4 j\u00E4ljell\u00E4 on " + _local6) + " vuotta, ") + _local2) + " p\u00E4iv\u00E4\u00E4, ") + _local4) + " tuntia, ") + _local5) + " minuuttia ja ") + _local3) + " sekuntia!";
kannustus.time_txt = _local12;
};
stop();
function init1() {
_global.destiny = "";
}
var today2 = new Date();
var currentMonth2 = (today2.getMonth() + 1);
var currentDay2 = today2.getDate();
var currentYear2 = today2.getFullYear();
if (_global.destiny == undefined) {
init1();
}
einappi.onRelease = function () {
_global.destiny = Number(year1) + 30;
if (_global.destiny == "") {
nimenanto = "Vuosiluku on virheellinen!";
} else if (_global.destiny == "undefined") {
nimenanto = "Vuosiluku on virheellinen!";
} else if (_global.destiny <= 1950) {
nimenanto = "Vuosiluku on virheellinen!";
} else if (month1 > 12) {
nimenanto = "Kuukausi on virheellinen!";
} else if (day1 >= 31) {
nimenanto = "P\u00E4iv\u00E4m\u00E4\u00E4r\u00E4 on virheellinen!";
} else {
_global.month2 = Number(month1);
_global.day2 = Number(day1);
nimenanto = ("Uusi " + _global.destiny) + " on syntynyt!";
gotoAndStop (3);
}
};
kyll\u00E4nappi.onRelease = function () {
_global.destiny = Number(year1) + 30;
_global.month3 = Number(month1) - 1;
_global.day3 = Number(day1);
if (_global.destiny == "") {
nimenanto = "Vuosiluku on virheellinen!";
} else if (_global.destiny == "undefined") {
nimenanto = "Vuosiluku on virheellinen!";
} else if (_global.destiny <= 1950) {
nimenanto = "Vuosiluku on virheellinen!";
} else if (month1 >= 13) {
nimenanto = "Kuukausi on virheellinen!";
} else if (day1 >= 32) {
nimenanto = "P\u00E4iv\u00E4m\u00E4\u00E4r\u00E4 on virheellinen!";
} else if ((_global.month3 = "")) {
nimenanto = "Kuukausi on virheellinen!";
} else if ((_global.day3 = "")) {
nimenanto = "P\u00E4iv\u00E4m\u00E4\u00E4r\u00E4 on virheellinen!";
} else if (_global.destiny < currentYear2) {
_root.gotoAndStop(4);
} else if ((_global.destiny <= currentYear2) && (month1 < currentMonth2)) {
_root.gotoAndStop(4);
trace("stalin");
} else if (((_global.destiny <= currentYear2) && (month1 <= currentMonth2)) && (day1 <= currentDay2)) {
_root.gotoAndStop(4);
trace("hitler");
} else {
_global.month2 = Number(month1) - 1;
_global.day2 = Number(day1);
nimenanto = ("Uusi " + _global.destiny) + " on syntynyt!";
gotoAndStop (2);
}
};
Frame 2
stop();
var sound1 = new Sound();
var sound2 = new Sound();
sound1.attachSound("partymusa1");
sound2.attachSound("partymusa2");
sound1.start(0, 0);
sound1.onSoundComplete = function () {
sound2.start(0, 0);
sound2.onSoundComplete = function () {
sound2.start(0, 0);
};
};
Frame 3
stop();
var today1 = new Date();
var currentYear1 = today1.getFullYear();
tekstit.vuosiluku = ">" + currentYear1;
var sound = new Sound();
sound.attachSound("youfail");
sound.start(0, 0);
Frame 4
stop();
var sound3 = new Sound();
var sound4 = new Sound();
sound3.attachSound("oletvelho");
sound4.attachSound("partymusa2");
sound3.start(0, 0);
sound3.onSoundComplete = function () {
sound4.start(0, 0);
sound4.onSoundComplete = function () {
sound4.start(0, 0);
};
};