home *** CD-ROM | disk | FTP | other *** search
- function Runner_Walk()
- {
- if(this.Keys_state[10] & _root.Bits_on[3])
- {
- this.gotoAndPlay("Runner_Fast");
- }
- else if(this.Keys_pressed[8] & _root.Bits_on[1])
- {
- this.Obj_DY = -491520;
- this.gotoAndPlay("Runner_Jump");
- }
- else if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_DX += -49152;
- if(this.Obj_DX < -458752)
- {
- this.Obj_DX = -458752;
- }
- if(this.Obj_Flip == 1 && this.Obj_DX > 196608)
- {
- _root.snd.attachSound("LV_184");
- _root.snd.start();
- }
- this.Obj_Flip = -1;
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_DX += 49152;
- if(this.Obj_DX > 458752)
- {
- this.Obj_DX = 458752;
- }
- if(this.Obj_Flip == -1 && this.Obj_DX < -196608)
- {
- _root.snd.attachSound("LV_184");
- _root.snd.start();
- }
- this.Obj_Flip = 1;
- }
- else
- {
- var dx = this.Obj_DX >> 16;
- this.Obj_DX = 0;
- if(dx <= -5 || dx >= 5)
- {
- gotoAndPlay(166);
- }
- else
- {
- gotoAndPlay(47);
- }
- }
- if(this.CX_Ladder("Runner_Climb0"))
- {
- return undefined;
- }
- if(this.CX_LadderX("Runner_Climb0"))
- {
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.CX_Fall_Flag)
- {
- this.gotoAndPlay("Runner_Fall");
- }
- if(this.CX_Collide_Flag & 3)
- {
- this.gotoAndPlay("Runner_Push");
- }
- }
- function Runner_Fast()
- {
- this.Obj_Flags |= 32;
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_DX += -49152;
- if(this.Obj_DX < -458752)
- {
- this.Obj_DX = -458752;
- }
- if(this.Obj_Flip != -1)
- {
- var dx = this.Obj_DX >> 16;
- this.Obj_DX = 0;
- this.Obj_Flags &= 65503;
- if(dx <= -5 || dx >= 5)
- {
- gotoAndPlay(166);
- }
- else
- {
- gotoAndPlay(47);
- }
- }
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_DX += 49152;
- if(this.Obj_DX > 458752)
- {
- this.Obj_DX = 458752;
- }
- if(this.Obj_Flip != 1)
- {
- var dx = this.Obj_DX >> 16;
- this.Obj_DX = 0;
- this.Obj_Flags &= 65503;
- if(dx <= -5 || dx >= 5)
- {
- gotoAndPlay(166);
- }
- else
- {
- gotoAndPlay(47);
- }
- }
- }
- else if(!(this.Keys_state[10] & _root.Bits_on[3]))
- {
- var dx = this.Obj_DX >> 16;
- this.Obj_DX = 0;
- this.Obj_Flags &= 65503;
- if(dx <= -5 || dx >= 5)
- {
- gotoAndPlay(166);
- }
- else
- {
- gotoAndPlay(47);
- }
- }
- else
- {
- var dx = this.Obj_DX >> 16;
- this.Obj_DX = 0;
- this.Obj_Flags &= 65503;
- if(dx <= -5 || dx >= 5)
- {
- gotoAndPlay(166);
- }
- else
- {
- gotoAndPlay(47);
- }
- }
- if(this.CX_Ladder("Runner_Climb0"))
- {
- this.Obj_Flags &= 65503;
- return undefined;
- }
- if(this.CX_LadderX("Runner_Climb0"))
- {
- this.Obj_Flags &= 65503;
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.CX_Fall_Flag)
- {
- this.Obj_Flags &= 65503;
- this.gotoAndPlay("Runner_Fall");
- }
- if(this.CX_Collide_Flag & 3)
- {
- _root.ImpactX_Flag = 9;
- _root.snd.attachSound("LV_185");
- _root.snd.start();
- this.gotoAndPlay("Runner_Bonk");
- }
- }
- function Runner_Idle()
- {
- this.Obj_DX = 0;
- if(0 && this.Keys_pressed[2] & _root.Bits_on[1])
- {
- this.gotoAndPlay("Runner_Cheat");
- }
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_DX = -1;
- gotoAndPlay(15);
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_DX = 1;
- gotoAndPlay(15);
- }
- else if(this.Keys_pressed[8] & _root.Bits_on[1])
- {
- this.Obj_DX = 0;
- this.Obj_DY = -491520;
- gotoAndPlay(144);
- }
- else if(this.Keys_pressed[4] & _root.Bits_on[6])
- {
- if(_root.teleportCheck(this))
- {
- this.gotoAndPlay("Runner_Teleport");
- }
- _root.helpCheck(this);
- }
- if(this.CX_Ladder("Runner_Climb0"))
- {
- return undefined;
- }
- if(this.CX_LadderX("Runner_Climb0"))
- {
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.CX_Fall_Flag)
- {
- this.gotoAndPlay("Runner_Fall");
- }
- }
- function Runner_Jump_Frame()
- {
- var dy = this.Obj_DY;
- if(dy < -65536)
- {
- this.gotoAndPlay("Runner_Jump1");
- }
- else if(dy <= 65536)
- {
- this.gotoAndPlay("Runner_Jump2");
- }
- else
- {
- this.Obj_Timer = this.Obj_Timer + 1;
- if((this.Obj_Timer & 7) < 4)
- {
- this.gotoAndStop("Runner_Fall1");
- }
- else
- {
- this.gotoAndStop("Runner_Fall2");
- }
- }
- }
- function Runner_Jump()
- {
- this.Runner_Jump_Frame();
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_DX += -49152;
- if(this.Obj_DX < -458752)
- {
- this.Obj_DX = -458752;
- }
- this.Obj_Flip = -1;
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_DX += 49152;
- if(this.Obj_DX > 458752)
- {
- this.Obj_DX = 458752;
- }
- this.Obj_Flip = 1;
- }
- else
- {
- this.Obj_DX = 0;
- }
- if(this.Obj_DY > 65536)
- {
- this.gotoAndPlay("Runner_Fall");
- }
- if(this.CX_Ladder("Runner_Climb0"))
- {
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.CX_Collide_Flag & 4)
- {
- this.Obj_DY = 0;
- }
- if(this.CX_Collide_Flag & 8)
- {
- if(this.Keys_pressed[8] & _root.Bits_on[1])
- {
- this.Obj_DY = -491520;
- this.gotoAndPlay("Runner_Jump");
- }
- else
- {
- this.gotoAndPlay("Runner_Idle");
- }
- }
- }
- function Runner_Fall()
- {
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_DX += -49152;
- if(this.Obj_DX < -458752)
- {
- this.Obj_DX = -458752;
- }
- this.Obj_Flip = -1;
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_DX += 49152;
- if(this.Obj_DX > 458752)
- {
- this.Obj_DX = 458752;
- }
- this.Obj_Flip = 1;
- }
- else
- {
- this.Obj_DX = 0;
- }
- if(this.CX_Ladder("Runner_Climb0"))
- {
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.Obj_Y - this.Obj_Target >> 16 > 96)
- {
- this.gotoAndPlay("Runner_FreeFall");
- }
- if(this.CX_Collide_Flag & 4)
- {
- this.Obj_DY = 0;
- }
- if(this.CX_Collide_Flag & 8)
- {
- if(this.Keys_pressed[8] & _root.Bits_on[1])
- {
- this.Obj_DY = -491520;
- this.gotoAndPlay("Runner_Jump");
- }
- else
- {
- _root.snd.attachSound("LV_196");
- _root.snd.start();
- this.gotoAndPlay("Runner_Idle");
- }
- }
- }
- function Runner_FreeFall()
- {
- this.Obj_DX = 0;
- if(this.CX_Ladder("Runner_Climb0"))
- {
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.CX_Collide_Flag & 4)
- {
- this.Obj_DY = 0;
- }
- if(this.CX_Collide_Flag & 8)
- {
- _root.ImpactY_Flag = 9;
- _root.snd.attachSound("LV_185");
- _root.snd.start();
- this.gotoAndPlay("Runner_Crash");
- }
- }
- function Runner_Tired()
- {
- if(0 && this.Keys_pressed[2] & _root.Bits_on[1])
- {
- this.gotoAndPlay("Runner_Cheat");
- }
- if(this.Keys_pressed[8] & _root.Bits_on[1])
- {
- this.Obj_DY = -491520;
- gotoAndPlay(144);
- }
- else if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_Flip = -1;
- this.gotoAndPlay("Runner_Walk");
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_Flip = 1;
- this.gotoAndPlay("Runner_Walk");
- }
- else if(this.Keys_pressed[4] & _root.Bits_on[6])
- {
- if(_root.teleportCheck(this))
- {
- this.gotoAndPlay("Runner_Teleport");
- }
- _root.helpCheck(this);
- }
- if(this.CX_Ladder("Runner_Climb0"))
- {
- return undefined;
- }
- if(this.CX_LadderX("Runner_Climb0"))
- {
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.CX_Fall_Flag)
- {
- this.gotoAndPlay("Runner_Fall");
- }
- }
- function Runner_Climb_Frame()
- {
- this.Obj_AnimFrame += 80;
- switch(this.Obj_AnimFrame >> 8 & 3)
- {
- case 0:
- this.gotoAndStop("Runner_Climb1");
- break;
- case 1:
- this.gotoAndStop("Runner_Climb2");
- break;
- case 2:
- this.gotoAndStop("Runner_Climb3");
- break;
- case 3:
- this.gotoAndStop("Runner_Climb4");
- }
- }
- function Runner_Climb0()
- {
- this.Obj_Flags |= 1;
- if(this.Obj_Timer < 0)
- {
- this.Obj_Timer += 4;
- this.Obj_X -= 262144;
- if(this.Obj_X <= this.Obj_Target)
- {
- this.Obj_X = this.Obj_Target;
- }
- }
- else if(this.Obj_Timer > 0)
- {
- this.Obj_Timer += 4;
- this.Obj_X += 262144;
- if(this.Obj_X >= this.Obj_Target)
- {
- this.Obj_X = this.Obj_Target;
- }
- }
- if(this.Obj_X == this.Obj_Target)
- {
- if(this.Obj_Climb == 0)
- {
- this.gotoAndPlay("Runner_Climb");
- }
- if(this.Obj_Climb == 1)
- {
- this.gotoAndPlay("Runner_Climb_Out");
- }
- }
- }
- function Runner_Climb()
- {
- this.Obj_Flags |= 1;
- this.Obj_DX = 0;
- this.Obj_DY = 0;
- if(this.Keys_state[4] & _root.Bits_on[6])
- {
- this.Obj_DY = -163840;
- this.Runner_Climb_Frame();
- }
- else if(this.Keys_state[5] & _root.Bits_on[0])
- {
- this.Obj_DY = 163840;
- this.Runner_Climb_Frame();
- }
- else if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_Flip = -1;
- this.Obj_Flags &= 65534;
- this.gotoAndPlay("Runner_Fall");
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_Flip = 1;
- this.Obj_Flags &= 65534;
- this.gotoAndPlay("Runner_Fall");
- }
- this.CX(0,0,1073741824);
- if(!this.CX_Ladder0())
- {
- this.Obj_Flags &= 65534;
- this.gotoAndPlay("Runner_Climb_Out");
- }
- if(this.CX_Collide_Flag & 8)
- {
- this.Obj_Flags &= 65534;
- this.gotoAndPlay("Runner_Idle");
- }
- }
- function Runner_Climb_Out()
- {
- this.Obj_DX = 0;
- this.Obj_DY = 0;
- if(this.Keys_state[4] & _root.Bits_on[6])
- {
- this.Obj_DY = -65536;
- }
- else if(this.Keys_state[5] & _root.Bits_on[0])
- {
- this.Obj_DY = 65536;
- }
- if((this.Obj_Y >> 16 & 7) < 4)
- {
- this.gotoAndStop("Runner_Climb_Out1");
- }
- else
- {
- this.gotoAndStop("Runner_Climb_Out2");
- }
- this.Obj_X += this.Obj_DX;
- this.Obj_Y += this.Obj_DY;
- if(!this.CX_LadderX0())
- {
- this.gotoAndPlay("Runner_Idle");
- if(this.CX_Ladder0())
- {
- this.gotoAndPlay("Runner_Climb");
- }
- else
- {
- this.Obj_DX = 0;
- this.Obj_DY = 0;
- this.Obj_Y &= 4294443008;
- this.Obj_Y += 458752;
- this.gotoAndPlay("Runner_Idle");
- }
- }
- }
- function Runner_Dizzy()
- {
- this.CX(0,32768,524288);
- }
- function Runner_Crash()
- {
- this.CX(0,32768,524288);
- }
- function Runner_Push()
- {
- this.Obj_DX = 0;
- if(this.Keys_pressed[8] & _root.Bits_on[1])
- {
- this.Obj_DY = -491520;
- this.gotoAndPlay("Runner_Jump");
- }
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- if(this.Obj_DX > 0)
- {
- this.Obj_DX = 0;
- }
- this.Obj_DX = -65536;
- if(this.Obj_DX < -458752)
- {
- this.Obj_DX = -458752;
- }
- this.Obj_Flip = -1;
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- if(this.Obj_DX < 0)
- {
- this.Obj_DX = 0;
- }
- this.Obj_DX = 65536;
- if(this.Obj_DX > 458752)
- {
- this.Obj_DX = 458752;
- }
- this.Obj_Flip = 1;
- }
- else
- {
- this.gotoAndPlay("Runner_Idle");
- }
- this.CX(0,32768,524288);
- if(!(this.CX_Collide_Flag & 3))
- {
- this.gotoAndPlay("Runner_Idle");
- }
- }
- function Runner_Bonk()
- {
- this.Obj_Flags &= 65503;
- if(this.Obj_DX < 0)
- {
- this.Obj_DX += 8192;
- if(this.Obj_DX > 0)
- {
- this.Obj_DX = 0;
- }
- }
- if(this.Obj_DX > 0)
- {
- this.Obj_DX -= 8192;
- if(this.Obj_DX < 0)
- {
- this.Obj_DX = 0;
- }
- }
- this.CX_Init();
- this.Obj_DY += 32768;
- if(this.Obj_DY > 524288)
- {
- this.Obj_DY = 524288;
- }
- if(this.CX_Obj_Collide)
- {
- this.CX_Collide_Flag |= this.CX_Obj_Collide;
- }
- this.Obj_X += this.Obj_DX;
- if(this.Obj_DX < 0)
- {
- while(this.Ck_Collide_LF())
- {
- }
- }
- if(this.Obj_DX > 0)
- {
- while(this.Ck_Collide_RT())
- {
- }
- }
- this.Obj_Y += this.Obj_DY;
- if(this.Obj_DY < 0)
- {
- while(this.Ck_Collide_UP())
- {
- }
- }
- if(this.Obj_DY > 0)
- {
- while(this.Ck_Collide_DN())
- {
- }
- }
- if(this.CX_Collide_Flag & 8)
- {
- this.Obj_DY = - this.Obj_DY;
- this.Obj_DY += 98304;
- if(this.Obj_DY > 0)
- {
- this.Obj_DY = 0;
- }
- }
- if(this.CX_Obj_Collide & 8)
- {
- x = 262144;
- }
- else
- {
- x = 131072;
- }
- if(this.Obj_Y - this.Old_Y0 > x)
- {
- this.CX_Fall_Flag = 1;
- }
- if(this.CX_Obj_Collide)
- {
- this.CX_Obj_Collide = 0;
- }
- this.cacheCX();
- }
- function Runner_Cheat()
- {
- if(this.Keys_pressed[2] & _root.Bits_on[1])
- {
- this.gotoAndPlay("Runner_Fall");
- }
- if(this.Keys_state[4] & _root.Bits_on[6])
- {
- this.Obj_Y -= 524288;
- }
- if(this.Keys_state[5] & _root.Bits_on[0])
- {
- this.Obj_Y += 524288;
- }
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_Flip = -1;
- this.Obj_X -= 524288;
- }
- if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_Flip = 1;
- this.Obj_X += 524288;
- }
- this.cacheCX();
- trace("x: " + (this.Obj_X >> 16) + ", y: " + (this.Obj_Y >> 16));
- }
- function Runner_Shocked()
- {
- }
- function Runner_Teleport()
- {
- }
- function Runner_Splat()
- {
- }
- function Runner_Hit()
- {
- this.Obj_Flags &= 65534;
- this.Obj_X += this.Obj_DX;
- if(this.Obj_DX < 0)
- {
- while(this.Ck_Collide_LF())
- {
- }
- }
- else if(this.Obj_DX > 0)
- {
- while(this.Ck_Collide_RT())
- {
- }
- }
- }
- function Runner_Die()
- {
- }
- this.gotoAndPlay("Runner_Walk");
- _root.KEY_LT = 37;
- _root.KEY_RT = 39;
- _root.KEY_UP = 38;
- _root.KEY_DN = 40;
- _root.KEY_A = 65;
- _root.KEY_B = 83;
- _root.KEY_LB = 81;
- _root.KEY_RB = 87;
- _root.KEY_CHEAT = 17;
- _root.Obj_Flags_ALWAYSRUN = 384;
- _root.Obj_Flags_BACKGROUND = 256;
- _root.Obj_Flags_MICKEY = 128;
- _root.Obj_Flags_DEAD = 64;
- _root.Obj_Flags_SPECIAL = 32;
- _root.Obj_Flags_KILL = 16;
- _root.Obj_Flags_KEYBD = 8;
- _root.Obj_Flags_GONE = 4;
- _root.Obj_Flags_ATTACK = 2;
- _root.Obj_Flags_CLIMBING = 1;
- this.Obj_X1 = -5;
- this.Obj_X2 = 5;
- this.Obj_Y1 = -31;
- this.Obj_Y2 = 0;
-