home *** CD-ROM | disk | FTP | other *** search
- if(Key.isDown(39))
- {
- if(_root.dragger._x < 290)
- {
- _root.dragger._x += 4;
- }
- if(_root.dragger._rotation < 15)
- {
- _root.dragger._rotation = _root.dragger._rotation + 1;
- }
- if(60 >= frame_play)
- {
- frame_play += 2;
- }
- }
- else if(Key.isDown(37))
- {
- if(-15 < _root.dragger._rotation)
- {
- _root.dragger._rotation--;
- }
- if(10 < _root.dragger._x)
- {
- _root.dragger._x -= 4;
- }
- if(frame_play >= 20)
- {
- frame_play -= 2;
- }
- }
- else
- {
- if(0 < _root.dragger._rotation)
- {
- _root.dragger._rotation--;
- }
- if(_root.dragger._rotation < 0)
- {
- _root.dragger._rotation = _root.dragger._rotation + 1;
- }
- if(frame_play < 40)
- {
- frame_play += 2;
- }
- if(40 < frame_play)
- {
- frame_play -= 2;
- }
- }
- if(Key.isDown(40))
- {
- if(_root.dragger._y < 290)
- {
- _root.dragger._y += 4;
- }
- }
- else if(Key.isDown(38))
- {
- if(10 < _root.dragger._y)
- {
- _root.dragger._y -= 4;
- }
- }
- tellTarget(_root.ship)
- {
- gotoAndStop(_root.frame_play);
- }
- overlay.firepowercount = bonuscountdown;
- if(showbonus == 1)
- {
- setProperty(_root.bonus, _X, _root.ship._x);
- setProperty(_root.bonus, _Y, _root.ship._y + 20);
- }
- if(showbonus == 1)
- {
- bonuscount++;
- }
- if(bonuscount >= 75)
- {
- bonuscount = 0;
- showbonus = 0;
- _root.bonus.bonusdisplay = "";
- setProperty(_root.bonus, _X, -100);
- setProperty(_root.bonus, _Y, -100);
- }
- makebubble = random(50);
- if(makebubble == 1)
- {
- bubbletotal++;
- duplicateMovieClip(_root.bubble,"b" + bubbletotal,16384 + bubbletotal);
- setProperty("_root.b" + bubbletotal, _X, random(300));
- setProperty("_root.b" + bubbletotal, _Y, random(300));
- setbubblesize = random(50) + 50;
- setProperty("_root.b" + bubbletotal, _xscale, setbubblesize);
- setProperty("_root.b" + bubbletotal, _yscale, setbubblesize);
- if(100 < bubbletotal)
- {
- bubble = 50;
- }
- }
- potx = getProperty(ship, _X);
- posx = getProperty(dragger, _X);
- posy = getProperty(dragger, _Y);
- poty = getProperty(ship, _Y);
- difx = posx - potx;
- dify = posy - poty;
- call("placement");
- if(_root.displaycount == 0)
- {
- shippause++;
- }
- if(shipcount < 4)
- {
- remove = 0;
- while(15500 >= remove)
- {
- duplicateMovieClip(_root.filler,remove,16384 + remove);
- removeMovieClip("_root." + remove);
- remove++;
- }
- gotoAndPlay(2);
- }
- if(shippause == 100)
- {
- duplicateMovieClip(_root.dockingship1,"dockingship",30383);
- setProperty(_root.dockingship, _Y, -150);
- setProperty(_root.dockingship, _X, 150);
- }
- if(displaycount == 0 && 250 < _root.dockingship._y)
- {
- shield = 1;
- icondepth = 14010;
- placeiconx = 0;
- s = 0;
- while(_root.shipcount + 1 >= s)
- {
- icondepth++;
- removeMovieClip("_root.icon" + icondepth);
- s++;
- }
- placeiconx = -8;
- icondepth = 14010;
- s = 1;
- while(_root.shipcount >= s)
- {
- icondepth++;
- placeiconx += 20;
- duplicateMovieClip(_root.shipicon,"icon" + icondepth,16384 + icondepth);
- setProperty("_root.icon" + icondepth, _X, placeiconx);
- setProperty("_root.icon" + icondepth, _Y, 8);
- s++;
- }
- displaycount = 1;
- shippause = 0;
- }
- if(shield == 1)
- {
- shieldcounter++;
- }
- if(shieldcounter >= shielduration)
- {
- shield = 0;
- shieldcounter = 0;
- }
- makeatrain = random(400);
- if(makeatrain == 1 && allowtrain == 0 && shippause == 0)
- {
- allowtrain = 1;
- duplicateMovieClip(_root.trainengine,"train",17284);
- }
- if(allowtrain == 1)
- {
- trainallowcount++;
- }
- if(trainallowcount >= 800)
- {
- trainallowcount = 0;
- allowtrain = 0;
- }
- count += _root.scrollspeed;
- if(gamepause < 200 && 0 < gamepause)
- {
- setProperty(gamelevel, _X, 150);
- setProperty(gamelevel, _Y, 100);
- gamelevel.gameleveldisplay = gamelevelcount;
- }
- if(0 < gamepause)
- {
- gamepause--;
- }
- else
- {
- setProperty(gamelevel, _X, -150);
- setProperty(gamelevel, _Y, -150);
- }
- if(0 >= gamepause)
- {
- createlander = random(1000);
- if(createlander == 1 && allowlander == 0)
- {
- allowlander = 1;
- duplicateMovieClip(_root.lander,"lander1",29384);
- setProperty(_root.lander1, _Y, -100);
- setProperty(_root.lander1, _X, random(200) + 50);
- }
- makebonusship = random(1000);
- if(makebonusship == 1 && allowbonusship == 0)
- {
- allowbonusship = 1;
- duplicateMovieClip(_root.bonusship1,"bonusship",28384);
- setProperty(_root.bonusship, _Y, -30);
- setProperty(_root.bonusship, _X, random(200) + 50);
- tellTarget(_root.bonusship)
- {
- creation = 0;
- gotoAndStop(6);
- }
- }
- makeenemy = random(100);
- if(makeenemy == 1 && shippause == 0)
- {
- _root.enemycount = _root.enemycount + 1;
- duplicateMovieClip(_root.enemy,"e" + _root.enemycount,16384 + _root.enemycount);
- playenemy = random(50);
- if(40 < playenemy)
- {
- tellTarget("_root.e" + _root.enemycount)
- {
- deathlevel = 0;
- gotoAndStop(2);
- }
- }
- else if(playenemy == 3)
- {
- tellTarget("_root.e" + _root.enemycount)
- {
- deathlevel = 2;
- gotoAndStop(3);
- }
- }
- else if(playenemy == 4)
- {
- tellTarget("_root.e" + _root.enemycount)
- {
- deathlevel = 1;
- gotoAndStop(4);
- }
- }
- else if(playenemy == 5)
- {
- tellTarget("_root.e" + _root.enemycount)
- {
- deathlevel = 3;
- gotoAndStop(5);
- }
- }
- else if(playenemy == 6)
- {
- tellTarget("_root.e" + _root.enemycount)
- {
- deathlevel = 2;
- gotoAndStop(6);
- }
- }
- else
- {
- tellTarget("_root.e" + _root.enemycount)
- {
- deathlevel = 0;
- gotoAndStop(1);
- }
- }
- if(_root.enemycount >= 4010)
- {
- _root.enemycount = 4000;
- }
- }
- if(count >= 20)
- {
- islandcount++;
- if(islandcreate >= islandcount)
- {
- i = 1;
- while(15 >= i)
- {
- if(i >= islandx && islandx + islandwidth >= i)
- {
- totalcount++;
- if(islandtype == 1)
- {
- duplicateMovieClip(_root.terrain,totalcount,16384 + totalcount);
- }
- if(islandtype == 2)
- {
- duplicateMovieClip(_root.terrain2,totalcount,16384 + totalcount);
- }
- setProperty("_root." + totalcount, _X, i * 20);
- setProperty("_root." + totalcount, _Y, -120);
- if(totalcount >= 1300)
- {
- totalcount = 1000;
- }
- if(islandcount == 1 && i == islandx)
- {
- tellTarget("_root." + totalcount)
- {
- gotoAndStop(1);
- }
- }
- else if(islandcount == 1 && islandx < i && i < islandx + islandwidth)
- {
- tellTarget("_root." + totalcount)
- {
- gotoAndStop(2);
- }
- }
- else if(islandcount == 1 && i == islandx + islandwidth)
- {
- tellTarget("_root." + totalcount)
- {
- gotoAndStop(3);
- }
- }
- else if(1 < islandcount && islandcount < islandcreate && i == islandx)
- {
- tellTarget("_root." + totalcount)
- {
- gotoAndStop(4);
- }
- }
- else if(1 < islandcount && islandcount < islandcreate && i == islandx + islandwidth)
- {
- tellTarget("_root." + totalcount)
- {
- gotoAndStop(5);
- }
- }
- else if(islandcount == islandcreate && i == islandx)
- {
- tellTarget("_root." + totalcount)
- {
- gotoAndStop(6);
- }
- }
- else if(islandcount == islandcreate && islandx < i && i < islandx + islandwidth)
- {
- tellTarget("_root." + totalcount)
- {
- gotoAndStop(7);
- }
- }
- else if(islandcount == islandcreate && i == islandx + islandwidth)
- {
- tellTarget("_root." + totalcount)
- {
- gotoAndStop(8);
- }
- }
- else if(1 < islandcount && islandcount < islandcreate && islandx < i && i < islandx + islandwidth)
- {
- tellTarget("_root." + totalcount)
- {
- gotoAndStop(9);
- }
- }
- }
- i++;
- }
- }
- if(islandcount >= islandpause)
- {
- totalislands++;
- if(totalislands >= levelduration)
- {
- gamelevelcount++;
- gamepause = 500;
- increasespeed++;
- if(increasespeed == 3)
- {
- scrollspeed += 0.2;
- increasespeed = 0;
- }
- totalislands = 0;
- }
- tiletype = 1;
- islandcreate = random(10) + 2;
- islandtype = random(2) + 1;
- islandpause = islandcreate + random(20) + 2;
- islandx = random(11) + 1;
- islandwidth = random(2) + 2;
- islandcount = 0;
- }
- count = 0;
- }
- }
- overlay.platformsremaining = levelduration - totalislands;
-