Advertisement
Guest User

ActionScript 3 code - Replay fix

a guest
Nov 22nd, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Change this and the other "score lines":
  2.  
  3. if ((timescore < savedSN.abingotime1 || savedSN.abingotime1 == "-") && timescore != 0) {
  4.                 trace("Score 1");
  5.                 savedSN = { // Set the date the savedSN varible will have
  6.                         abingoname1:nameinput.text,
  7.                         abingoname2:savedSN.abingoname2,
  8.                         abingoname3:savedSN.abingoname3,
  9.                         abingoname4:savedSN.abingoname4,
  10.                         abingoname5:savedSN.abingoname5,
  11.                         abingoname6:savedSN.abingoname6,
  12.                         abingoname7:savedSN.abingoname7,
  13.                         abingoname8:savedSN.abingoname8,
  14.                         abingoname9:savedSN.abingoname9,
  15.                         abingoname10:savedSN.abingoname10,
  16.                     abingotime1:timescore,
  17.                     abingotime2:savedSN.abingotime2,
  18.                     abingotime3:savedSN.abingotime3,
  19.                     abingotime4:savedSN.abingotime4,
  20.                     abingotime5:savedSN.abingotime5,
  21.                     abingotime6:savedSN.abingotime6,
  22.                     abingotime7:savedSN.abingotime7,
  23.                     abingotime8:savedSN.abingotime8,
  24.                     abingotime9:savedSN.abingotime9,
  25.                     abingotime10:savedSN.abingotime10};
  26.                 soSavedScNa.data.nameScore = savedSN; // Set the data in the save file to the savedSN variable
  27.                 soSavedScNa.flush(); // Overwrite existing save file
  28.                 savebingo1.removeEventListener(MouseEvent.MOUSE_UP, saveScore);
  29.                 gotoAndStop(4); // Go to the start menu
  30.             } ...
  31.  
  32. To the change of this, then I think it should work:
  33.  
  34. if ((timescore < savedSN.abingotime1 || savedSN.abingotime1 == "-") && timescore != 0) {
  35.                 trace("Score 1");
  36.                 savedSN = { // Set the date the savedSN varible will have
  37.                         abingoname1:nameinput.text,
  38.                         abingoname2:savedSN.abingoname1,
  39.                         abingoname3:savedSN.abingoname2,
  40.                         abingoname4:savedSN.abingoname3,
  41.                         abingoname5:savedSN.abingoname4,
  42.                         abingoname6:savedSN.abingoname5,
  43.                         abingoname7:savedSN.abingoname6,
  44.                         abingoname8:savedSN.abingoname7,
  45.                         abingoname9:savedSN.abingoname8,
  46.                         abingoname10:savedSN.abingoname9,
  47.                     abingotime1:timescore,
  48.                     abingotime2:savedSN.abingotime1,
  49.                     abingotime3:savedSN.abingotime2,
  50.                     abingotime4:savedSN.abingotime3,
  51.                     abingotime5:savedSN.abingotime4,
  52.                     abingotime6:savedSN.abingotime5,
  53.                     abingotime7:savedSN.abingotime6,
  54.                     abingotime8:savedSN.abingotime7,
  55.                     abingotime9:savedSN.abingotime8,
  56.                     abingotime10:savedSN.abingotime9};
  57.                 soSavedScNa.data.nameScore = savedSN; // Set the data in the save file to the savedSN variable
  58.                 soSavedScNa.flush(); // Overwrite existing save file
  59.                 savebingo1.removeEventListener(MouseEvent.MOUSE_UP, saveScore);
  60.                 gotoAndStop(4); // Go to the start menu
  61.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement