Combined Code
frame 1 {
function checkBallon() {
return (ctrlVar / _totalframes) * 14;
}
stop();
var timeFactor = 1000;
var ctrlVar = 1;
var timer = timeFactor;
var curTime = getTimer();
var endGame = false;
var infCom = true;
var inflate_sfx = new Sound();
var asplud_sfx = new Sound();
inflate_sfx.attachSound('inflate_sfx');
asplud_sfx.attachSound('asplud_sfx');
onEnterFrame = function () {
if (!endGame) {
switch (_currentframe) {
case 2:
timer = timeFactor;
break;
case 4:
timer = timeFactor / 2;
break;
case 6:
timer = timeFactor / 3;
break;
case 8:
timer = timeFactor / 4;
break;
case 10:
timer = timeFactor / 5;
break;
case 12:
timer = timeFactor / 6;
}
if (curTime + timer < getTimer()) {
trace('triggered ' + (curTime + timer) + ' & ' + getTimer());
curTime = getTimer();
--ctrlVar;
gotoAndStop(_currentframe - 1);
}
trace(_currentframe + ' ' + ctrlVar);
if (_currentframe < checkBallon()) {
gotoAndStop(checkBallon());
if (infCom) {
infCom = false;
inflate_sfx.start(0, 0);
}
}
if (Math.round(checkBallon()) >= 13) {
gotoAndStop(13);
endGame = true;
curTime = getTimer();
asplud_sfx.start(0, 0);
}
} else {
if (curTime + 1000 < getTimer()) {
gotoAndStop(14);
}
}
};
click_mc.onRelease = function () {
++ctrlVar;
};
click_mc.onPress = function () {
splash_mc._alpha = 0;
delete click_mc.onPress;
};
inflate_sfx.onSoundComplete = function () {
infCom = true;
};
}
// unknown tag 88 length 69
movieClip 11 {
}
movieClip 13 {
}