Frame 1
var mouseListener = new Object();
mouseListener.onMouseMove = function () {
if (hitSpot.hitTest(_xmouse, _ymouse, true)) {
Mouse.hide();
bullseye._x = _xmouse;
bullseye._y = _ymouse;
bullseye._visible = true;
updateAfterEvent();
} else {
Mouse.show();
bullseye._visible = false;
}
};
Mouse.addListener(mouseListener);
var blastSound = new Sound();
blastSound.attachSound("blast");
var emptySound = new Sound();
emptySound.attachSound("empty_shot");
ball1._alpha = 0;
ball2._alpha = 0;
ball3._alpha = 0;
hitSpot.onEnterFrame = function () {
if (hitSpot.hitTest(ball1)) {
ball1._alpha = 100;
} else {
ball1._alpha = 0;
}
if (hitSpot.hitTest(ball2)) {
ball2._alpha = 100;
} else {
ball2._alpha = 0;
}
if (hitSpot.hitTest(ball3)) {
ball3._alpha = 100;
} else {
ball3._alpha = 0;
}
};
counter = 0;
hitSpot.onPress = function () {
counter = counter + 1;
if (counter == 1) {
blastSound.start();
gun.gotoAndPlay(2);
yDis = Math.abs(gun._x - (_ymouse / _xmouse)) / 55;
var _local6 = new mx.transitions.Tween(ball1, "_x", mx.transitions.easing.Regular.easeOut, gun._x, _xmouse, yDis, false);
var _local3 = new mx.transitions.Tween(ball1, "_y", mx.transitions.easing.Regular.easeOut, gun._y, _ymouse, yDis, false);
_local3.onMotionFinished = function () {
attachMovie("explosion", "explosion1", 1, {_x:ball1._x, _y:ball1._y, _rotation:random(100), _alpha:random(30) + 70});
ball1._y = 800;
};
}
if (counter == 2) {
blastSound.start();
gun.gotoAndPlay(2);
yDis = Math.abs(gun._x - (_ymouse / _xmouse)) / 55;
var _local5 = new mx.transitions.Tween(ball2, "_x", mx.transitions.easing.Regular.easeOut, gun._x, _xmouse, yDis, false);
var _local2 = new mx.transitions.Tween(ball2, "_y", mx.transitions.easing.Regular.easeOut, gun._y, _ymouse, yDis, false);
_local2.onMotionFinished = function () {
attachMovie("explosion", "explosion2", 2, {_x:ball2._x, _y:ball2._y, _rotation:random(200), _alpha:random(30) + 70});
ball2._y = 800;
};
}
if (counter == 3) {
blastSound.start();
gun.gotoAndPlay(2);
yDis = Math.abs(gun._x - (_ymouse / _xmouse)) / 55;
var _local10 = new mx.transitions.Tween(ball3, "_x", mx.transitions.easing.Regular.easeOut, gun._x, _xmouse, yDis, false);
var _local1 = new mx.transitions.Tween(ball3, "_y", mx.transitions.easing.Regular.easeOut, gun._y, _ymouse, yDis, false);
_local1.onMotionFinished = function () {
attachMovie("explosion", "explosion3", 3, {_x:ball3._x, _y:ball3._y, _rotation:random(100), _alpha:random(30) + 70});
ball3._y = 800;
counter = 0;
};
}
if (counter >= 4) {
emptySound.start();
gun.gotoAndPlay("empty");
}
};
this.onEnterFrame = function () {
gun._x = tank._x + 50;
gun._y = tank._y + 40;
angle_in_radians = Math.atan2(_root._ymouse - gun._y, _root._xmouse - gun._x);
angle_in_degrees = Math.round((angle_in_radians * 180) / Math.PI);
gun._rotation = angle_in_degrees + 180;
hit_counter.text = _global.hitCount;
};
moveVar = false;
var keyListener = new Object();
keyListener.onKeyDown = function () {
key_var = Key.getCode();
if (Key.isDown(37)) {
moveVar = true;
tank.gotoAndPlay("left");
var _local4 = new mx.transitions.Tween(tank, "_x", mx.transitions.easing.None.easeNone, tank._x, tank._x - 100, 15, false);
_local4.onMotionFinished = function () {
moveVar = false;
};
}
if (Key.isDown(39)) {
moveVar = true;
tank.gotoAndPlay("right");
var _local3 = new mx.transitions.Tween(tank, "_x", mx.transitions.easing.None.easeNone, tank._x, tank._x + 100, 15, false);
_local3.onMotionFinished = function () {
moveVar = false;
};
}
if (Key.isDown(38)) {
moveVar = true;
tank.gotoAndPlay("up");
var _local2 = new mx.transitions.Tween(tank, "_y", mx.transitions.easing.None.easeNone, tank._y, tank._y - 100, 15, false);
_local2.onMotionFinished = function () {
moveVar = false;
};
}
if (Key.isDown(40)) {
moveVar = true;
tank.gotoAndPlay("down");
var _local1 = new mx.transitions.Tween(tank, "_y", mx.transitions.easing.None.easeNone, tank._y, tank._y + 100, 15, false);
_local1.onMotionFinished = function () {
moveVar = false;
};
}
};
keyListener.onKeyUp = function () {
};
Key.addListener(keyListener);
_global.charStrike = 0;
_global.hitCount = 0;
numBombsDropped = 1;
strikes = 0;
speed = 4;
stop();
function getURL() {
getURL ("http://trinkerheim.com", "_parent");
}
var myMenu_cm = new ContextMenu();
myMenu_cm.hideBuiltInItems();
var newItem1_cmi = new ContextMenuItem("trinkerheim.com", getURL);
newItem2_cmi.enabled = false;
newItem2_cmi.separatorBefore = true;
myMenu_cm.customItems.push(newItem1_cmi, newItem2_cmi);
_root.menu = myMenu_cm;
Instance of Symbol 28 MovieClip "tank" in Frame 1
onClipEvent (enterFrame) {
if (this._y > 520) {
this._y = 0;
}
if (this._y < -20) {
this._y = 500;
}
if (this._x > 820) {
this._x = 0;
}
if (this._x < -20) {
this._x = 800;
}
}
Frame 5
stop();
Symbol 5 MovieClip [explosion2] Frame 20
stop();
Symbol 10 MovieClip [bomb] Frame 1
rotationVar = random(5);
hit_area._xscale = 200;
hit_area._yscale = 200;
this.onEnterFrame = function () {
this._y = this._y + 5;
this._rotation = this._rotation + rotationVar;
if (this.hit_area.hitTest(_parent._parent.ball1)) {
_global.hitCount = _global.hitCount + 1;
_parent._parent.attachMovie("explosion2", "explosion4", 4, {_x:_parent._parent.ball1._x, _y:_parent._parent.ball1._y});
this.removeMovieClip();
}
if (this.hit_area.hitTest(_parent._parent.ball2)) {
_global.hitCount = _global.hitCount + 1;
_parent._parent.attachMovie("explosion2", "explosion5", 5, {_x:_parent._parent.ball2._x, _y:_parent._parent.ball2._y});
this.removeMovieClip();
}
if (this.hit_area.hitTest(_parent._parent.ball3)) {
_global.hitCount = _global.hitCount + 1;
_parent._parent.attachMovie("explosion2", "explosion6", 6, {_x:_parent._parent.ball3._x, _y:_parent._parent.ball3._y});
this.removeMovieClip();
}
if (this.hit_area.hitTest(_parent._parent.tank.hit_area)) {
if (_global.charStrike == 0) {
_parent._parent.tank.gotoAndPlay("shake");
_parent._parent.attachMovie("explosion2", "explosion7", 7, {_x:_parent._parent.tank._x + 40, _y:_parent._parent.tank._y});
_global.charStrike = _global.charStrike + 1;
_root.life._xscale = 85;
myColor = new Color(_root.life);
myColor.setRGB(16724736);
this.removeMovieClip();
}
if (_global.charStrike == 1) {
_parent._parent.tank.gotoAndPlay("shake");
_parent._parent.attachMovie("explosion2", "explosion7", 7, {_x:_parent._parent.tank._x + 40, _y:_parent._parent.tank._y});
_global.charStrike = _global.charStrike + 1;
_root.life._xscale = 60;
myColor = new Color(_root.life);
myColor.setRGB(16737792);
this.removeMovieClip();
}
if (_global.charStrike == 2) {
_parent._parent.tank.gotoAndPlay("shake");
_parent._parent.attachMovie("explosion2", "explosion7", 7, {_x:_parent._parent.tank._x + 40, _y:_parent._parent.tank._y});
_global.charStrike = _global.charStrike + 1;
_root.life._xscale = 45;
myColor = new Color(_root.life);
myColor.setRGB(16750848);
this.removeMovieClip();
}
if (_global.charStrike == 3) {
_parent._parent.tank.gotoAndPlay("shake");
_parent._parent.attachMovie("explosion2", "explosion7", 7, {_x:_parent._parent.tank._x + 40, _y:_parent._parent.tank._y});
_global.charStrike = _global.charStrike + 1;
_root.life._xscale = 25;
myColor = new Color(_root.life);
myColor.setRGB(16763955);
this.removeMovieClip();
}
if (_global.charStrike == 4) {
_parent._parent.tank.gotoAndPlay("shake");
_parent._parent.attachMovie("explosion2", "explosion7", 7, {_x:_parent._parent.tank._x + 40, _y:_parent._parent.tank._y});
_global.charStrike = _global.charStrike + 1;
_root.life._xscale = 10;
myColor = new Color(_root.life);
myColor.setRGB(16777062);
this.removeMovieClip();
}
if (_global.charStrike == 5) {
_parent._parent.tank.gotoAndPlay("shake");
_parent._parent.attachMovie("explosion2", "explosion7", 7, {_x:_parent._parent.tank._x + 40, _y:_parent._parent.tank._y});
_parent._parent.gotoAndPlay("gameover");
this.removeMovieClip();
}
}
};
Symbol 13 MovieClip Frame 20
stop();
Symbol 14 MovieClip [explosion] Frame 1
stop();
Symbol 28 MovieClip Frame 1
stop();
Symbol 28 MovieClip Frame 18
gotoAndStop (1);
Symbol 28 MovieClip Frame 24
gotoAndPlay ("left");
Symbol 28 MovieClip Frame 29
gotoAndPlay ("right");
Symbol 28 MovieClip Frame 34
gotoAndPlay ("up");
Symbol 28 MovieClip Frame 39
gotoAndPlay ("down");
Symbol 31 MovieClip Frame 1
stop();
Symbol 31 MovieClip Frame 5
gotoAndStop (1);
Symbol 37 MovieClip Frame 1
_parent.bomb_bg.attachMovie("bomb", "bomb" + _parent.numBombsDropped, _parent.numBombsDropped, {_x:random(750) + 100});
_parent.bomb_bg2.attachMovie("bomb", "bomb" + _parent.numBombsDropped, _parent.numBombsDropped, {_x:random(750) + 100});
_parent.numBombsDropped = _parent.numBombsDropped + 1;
Symbol 37 MovieClip Frame 35
gotoAndPlay (1);
Symbol 53 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 54 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 55 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 56 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 57 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 50 Button
on (release) {
gotoAndPlay (1);
}