Código:
fscommand("fullscreen", "true");
PaulineInitialY = 208.3;
// Score is how fast the player wins:
AverageTime = 0;
// To calculate AverageTime:
SumOfTimes = 0;
Playthroughs = 0;
// Used to determine how SumOfTimes and AverageTime increase...
// CHANGED: "INCREASESES" WAS A TYPO, NOW "INCREASE"
// when the player commits a mistake:
// CHANGED: "PLAYERS COMMITS" WAS GRAMMATICALLY INCORRECT, NOW "THE PLAYER COMMITS"
// CHANGED: RENAMED PlayerWon TO PlayerHasWon SO IT MATCHES THE NAME USED IN FireExtinguished()
PlayerHasWon = false;
// Counted while the fire is on the screen:
TimePassed = 0;
// Acts like character lives:
Chances = 4;
// CHANGED: FireAparitionProgress WAS MISSPELLED, NOW FireApparitionProgress
// (THE FUNCTIONS ALREADY USED THE CORRECT SPELLING, SO THIS ALSO FIXES A BUG:
// THE VARIABLE WAS NEVER PROPERLY INITIALIZED)
FireApparitionProgress = 0;
// Determine messages:
HitsOnPauline = 0;
HitsOnBackground = 0;
// Used repeatedly on an object in frame 2:
function FireAppearing() {
if (Math.abs(PaulineVibration) < 0.1) {
Pauline._y = PaulineInitialY;
PaulineVibration = 0;
} else {
Pauline._y = PaulineInitialY + PaulineVibration;
PaulineVibration = PaulineVibration / -1.1;
if (Math.abs(PaulineVibration) < 2) {
Pauline._xscale = 100;
}
}
FireApparitionProgress++;
if (FireApparitionProgress > 300) {
// This "if" statement is to avoid an error that...
// I am not sure could happen. When the player...
// makes too many mistakes, the game goes to frame 4,
// which is game over. But if this specific event...
// happens right then, it could overwrite it.
// This "if" is added so this event only occurs...
// if the other one shouldn't:
if (Chances > 0) {
TimePassed = 0;
gotoAndStop(3);
}
}
}
// Used on the button when the fire is clicked:
function FireExtinguished() {
PlayerHasWon = true;
Playthroughs++;
SumOfTimes = SumOfTimes + TimePassed;
AverageTime = SumOfTimes / Playthroughs;
FireApparitionProgress = 0;
gotoAndStop(2);
}
PaulineInitialY = 208.3;
// Score is how fast the player wins:
AverageTime = 0;
// To calculate AverageTime:
SumOfTimes = 0;
Playthroughs = 0;
// Used to determine how SumOfTimes and AverageTime increase...
// CHANGED: "INCREASESES" WAS A TYPO, NOW "INCREASE"
// when the player commits a mistake:
// CHANGED: "PLAYERS COMMITS" WAS GRAMMATICALLY INCORRECT, NOW "THE PLAYER COMMITS"
// CHANGED: RENAMED PlayerWon TO PlayerHasWon SO IT MATCHES THE NAME USED IN FireExtinguished()
PlayerHasWon = false;
// Counted while the fire is on the screen:
TimePassed = 0;
// Acts like character lives:
Chances = 4;
// CHANGED: FireAparitionProgress WAS MISSPELLED, NOW FireApparitionProgress
// (THE FUNCTIONS ALREADY USED THE CORRECT SPELLING, SO THIS ALSO FIXES A BUG:
// THE VARIABLE WAS NEVER PROPERLY INITIALIZED)
FireApparitionProgress = 0;
// Determine messages:
HitsOnPauline = 0;
HitsOnBackground = 0;
// Used repeatedly on an object in frame 2:
function FireAppearing() {
if (Math.abs(PaulineVibration) < 0.1) {
Pauline._y = PaulineInitialY;
PaulineVibration = 0;
} else {
Pauline._y = PaulineInitialY + PaulineVibration;
PaulineVibration = PaulineVibration / -1.1;
if (Math.abs(PaulineVibration) < 2) {
Pauline._xscale = 100;
}
}
FireApparitionProgress++;
if (FireApparitionProgress > 300) {
// This "if" statement is to avoid an error that...
// I am not sure could happen. When the player...
// makes too many mistakes, the game goes to frame 4,
// which is game over. But if this specific event...
// happens right then, it could overwrite it.
// This "if" is added so this event only occurs...
// if the other one shouldn't:
if (Chances > 0) {
TimePassed = 0;
gotoAndStop(3);
}
}
}
// Used on the button when the fire is clicked:
function FireExtinguished() {
PlayerHasWon = true;
Playthroughs++;
SumOfTimes = SumOfTimes + TimePassed;
AverageTime = SumOfTimes / Playthroughs;
FireApparitionProgress = 0;
gotoAndStop(2);
}

