home *** CD-ROM | disk | FTP | other *** search
- function Position(x, y)
- {
- this.x = x;
- this.y = y;
- }
- function tVector(x, y)
- {
- this.x = x;
- this.y = y;
- this.norm = dist(0,0,x,y);
- this.phiRad = Math.atan2(y,x);
- this.phiDeg = this.phiRad * toDeg;
- }
- function tBall(mc, pos, vel)
- {
- this.mc = mc;
- this.pos = pos;
- this.vel = vel;
- this.oldPos = new Position();
- this.mode = undefined;
- }
- function tWall(mc, angle, pos)
- {
- this.mc = mc;
- this.angle = angle;
- this.pos = pos;
- this.strength = 1;
- }
- function tFlipper(mc, angle, length, pos)
- {
- this.mc = mc;
- this.angle = angle;
- this.moving = 0;
- this.length = length;
- this.pos = pos;
- }
- function tBumper(mc, radius, strength, pos, clip)
- {
- this.mc = mc;
- this.radius = radius;
- this.strength = strength;
- this.pos = pos;
- this.clip = clip;
- }
- function tTarget(mc, radius, strength, pos, hitStatus)
- {
- this.mc = mc;
- this.radius = radius;
- this.strength = strength;
- this.pos = pos;
- this.hitStatus = hitStatus;
- this.pos = pos;
- this.setOn = function()
- {
- this.mc.gotoAndStop("on");
- this.hitStatus = true;
- };
- this.setOff = function()
- {
- this.mc.gotoAndStop("off");
- this.hitStatus = false;
- };
- }
- function tSwitch(mc, hitStatus)
- {
- this.mc = mc;
- this.hitStatus = hitstatus;
- this.setOn = function()
- {
- this.mc.gotoAndStop("on");
- this.hitStatus = true;
- };
- this.setOff = function()
- {
- this.mc.gotoAndStop("off");
- this.hitStatus = false;
- };
- }
- function tbonus(mc)
- {
- this.mc = mc;
- this.setOn = function()
- {
- this.mc.gotoAndStop("on");
- this.status = true;
- };
- this.setOff = function()
- {
- this.mc.gotoAndStop("off");
- this.status = false;
- };
- this.setOff();
- }
- play();
-