Public paste
TOMMIES MOEDER NAKKERTJE
By: KARIMO | Date: Mar 28 2007 12:13 | Format: None | Expires: never | Size: 1.56 KB | Hits: 1339

  1. var levens = 5;
  2. var punten = 0;
  3. var snelheid = 30;
  4. //initialisatiescript
  5. var toets = "";
  6. //besturing
  7. Key.addListener(this);
  8. function onKeyDown() {
  9.         toets = Key.getCode();
  10. }
  11. function onKeyUp() {
  12.         toets = "";
  13.         worm.gotoAndStop();
  14. }
  15. //gamescript
  16. function onEnterFrame() {
  17.         oudey = worm._y;
  18.         boek1._y += 10.;
  19.         boek2._y += 12.;
  20.         boek3._y += 14.;
  21.         boek4._y += 16.;
  22.         boek5._y += 18.;
  23.         for (a=1; a<=200; a++) {
  24.                 if (worm.hitTest(this["wortel"+a]) && this["wortel"+a]._visible) {
  25.                         this["wortel"+a]._visible = false;
  26.                         _root.punten += 10;
  27.                 }
  28.                 if (worm.hitTest(this["boek"+a]) && this["boek"+a]._visible) {
  29.                         this["boek"+a]._visible = false;
  30.                         _root.levens -= 1;
  31.                 }
  32.                 if (this["boek"+a]._y>=450) {
  33.                         this["boek"+a]._y = Math.round(Math.random()*500+50);
  34.                         this["boek"+a]._y = -50;
  35.                         this["boek"+a]._visible = true;
  36.                 }
  37.         }
  38.         leven._x += 50;
  39.         if (leven._x>800) {
  40.                 leven._x = 0;
  41.                 leven._y = Math.round(Math.random()*550+0);
  42.                 leven._visible = true;
  43.         }
  44.         if (worm.hitTest(leven) && leven._visible) {
  45.                 levens++;
  46.                 leven._visible = false;
  47.         }
  48.         if (toets == 39) {
  49.                 worm._x += snelheid;
  50.                 worm.gotoAndStop(1);
  51.         }
  52.         if (toets == 37) {
  53.                 worm._x -= snelheid;
  54.                 worm.gotoAndStop(2);
  55.         }
  56.         if (worm._x>560) {
  57.                 worm._x = 560;
  58.         }
  59.         if (worm._x<0) {
  60.                 worm._x = 0;
  61.         }
  62.         for (i=1; i<=222; i++) {
  63.                 if (worm.hitTest(this["boom"+i])) {
  64.                         worm._x = oudex;
  65.                         worm._y = oudey;
  66.                 }
  67.         }
  68.         if (levens == 0) {
  69.                 gotoAndStop(10);
  70.         }
  71.         if (punten == 1460) {
  72.                 gotoAndPlay(30);
  73.         }
  74. }
  75. stop();
  76.  
  77.  
  78. VERANDER ZOVEEL MOGELIJK VIEZE KK BEZEM IK PAK JOU MAMA