Frame 1
stop();
_root.perss = 0;
onEnterFrame = function () {
_root.perss++;
var _local2 = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (_local2 > _root.perss) {
_local2 = _root.perss;
}
preloader.line._width = _local2 * 4;
preloader.infoMC.text = ("" + _local2) + "%";
if (_local2 == 100) {
delete onEnterFrame;
play();
}
};
Frame 2
var mySound = new Sound(_root);
mySound.stop();
_root.ballFace.removeMovieClip();
_root._x = 0;
stop();
CarExample.Clear();
delete _root.onEnterFrame;
_root._x = 0;
CarExample.main(_root);
_root.mathWidth = 1222;
Stage.scaleMode = "exactFit";
_root.miniMap._y = 1000;
_root.miniMap.unloadMovie();
_root.miniMap.removeMovieClip();
scores = 0;
_root.boom = 0;
_root.weparr = [0, 1000000, 0, 0, 0, 0, 0];
_root.MaxBaby = 2;
_root.NumBaby = 0;
_root.Life = 2;
Frame 3
stop();
gotoAndPlay (14);
switch (Number(_root.needToLevel)) {
case 1 :
gotoAndStop (15);
break;
case 2 :
gotoAndStop (17);
break;
case 3 :
gotoAndStop (19);
break;
case 4 :
gotoAndStop (28);
break;
case 5 :
gotoAndStop (37);
break;
case 6 :
gotoAndStop (64);
break;
case 7 :
gotoAndStop (94);
break;
case 8 :
gotoAndStop (116);
break;
default :
play();
}
Frame 4
stop();
Frame 12
stop();
Frame 15
_root.mathWidth = 1222;
Stage.scaleMode = "exactFit";
CarExample.Clear();
CarExample.AddFriend(p1);
CarExample.AddEmnemy(e1);
CarExample.AddEmnemy(e2);
CarExample.AddCircleSF(sf2);
CarExample.AddCircleSF(sf4);
CarExample.AddRectSF(sf1);
CarExample.AddRectSF(sf3);
CarExample.AddRectSF(sf5);
CarExample.AddRectSF(sf6);
CarExample.SetMiniMap(miniMap);
CarExample.SetMiniMap(aimmc, 1);
aimmc._visible = false;
stop();
Frame 16
stop();
function updateItem2() {
w2 = _root.weparr[2];
w3 = _root.weparr[3];
w4 = _root.weparr[4];
w5 = _root.weparr[5];
w6 = _root.weparr[6];
}
_root._x = 0;
stop();
updateItem2();
Frame 17
CarExample.Clear();
_root.mathWidth = 1222;
CarExample.AddFriend(p1);
CarExample.AddEmnemy(e1);
CarExample.AddEmnemy(e2);
CarExample.AddEmnemy(e3);
CarExample.AddRectSF(sf1);
CarExample.AddRectSF(sf3);
CarExample.AddRectSF(sf5);
CarExample.AddRectSF(sf6);
CarExample.AddRectSF(sf8);
CarExample.AddCircleSF(sf14);
CarExample.AddCircleSF(sf13);
stop();
CarExample.SetMiniMap(miniMap);
CarExample.SetMiniMap(aimmc, 1);
aimmc._visible = false;
Frame 18
function updateItem2() {
w2 = _root.weparr[2];
w3 = _root.weparr[3];
w4 = _root.weparr[4];
w5 = _root.weparr[5];
w6 = _root.weparr[6];
}
stop();
_root.x = 0;
updateItem2();
Instance of Symbol 273 MovieClip in Frame 18
on (press) {
if (_root.scores >= 300) {
_root.weparr[3]++;
_root.scores = _root.scores - 300;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 18
on (press) {
if ((_root.NumBaby < _root.MaxBaby) && (_root.scores >= 500)) {
_root.NumBaby++;
_root.scores = _root.scores - 500;
}
}
Frame 19
CarExample.Clear();
_root.mathWidth = 1222;
p2._visible = false;
p3._visible = false;
CarExample.AddFriend(p1);
forBaby = [p2, p3];
var maobaby = [];
var nextID = 2;
while (_root.NumBaby > 0) {
CarExample.AddFriend(forBaby.shift());
var myMaoMao = _root.attachMovie("maobaby", "maomao" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
CarExample.addFriend(myMaoMao, nextID);
_root.NumBaby--;
nextID++;
maobaby.push(myMaoMao);
}
CarExample.AddEmnemy(e1);
CarExample.AddEmnemy(e2);
CarExample.AddEmnemy(e3);
CarExample.AddRectSF(sf1);
CarExample.AddRectSF(sf2);
CarExample.AddRectSF(sf3);
CarExample.AddRectSF(sf4);
CarExample.AddRectSF(sf5);
CarExample.AddRectSF(sf6);
CarExample.SetMiniMap(miniMap);
CarExample.SetMiniMap(aimmc, 1);
aimmc._visible = false;
stop();
Frame 20
function updateItem2() {
w2 = _root.weparr[2];
w3 = _root.weparr[3];
w4 = _root.weparr[4];
w5 = _root.weparr[5];
w6 = _root.weparr[6];
}
updateItem2();
while (maobaby.length > 0) {
maobaby.shift().removeMovieClip();
}
Instance of Symbol 273 MovieClip in Frame 20
on (press) {
if (_root.scores >= 300) {
_root.weparr[3]++;
_root.scores = _root.scores - 300;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 20
on (press) {
if (_root.scores >= 600) {
_root.weparr[4]++;
_root.scores = _root.scores - 600;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 20
on (press) {
if ((_root.NumBaby < _root.MaxBaby) && (_root.scores >= 500)) {
_root.NumBaby++;
_root.scores = _root.scores - 500;
}
}
Frame 27
stop();
Frame 28
CarExample.Clear();
_root.mathWidth = 1222;
p2._visible = false;
p3._visible = false;
CarExample.AddFriend(p1);
forBaby = [p2, p3];
var maobaby = [];
var nextID = 2;
while (_root.NumBaby > 0) {
trace("add.............");
CarExample.AddFriend(forBaby.shift());
var myMaoMao = _root.attachMovie("maobaby", "maomao" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
CarExample.addFriend(myMaoMao, nextID);
_root.NumBaby--;
nextID++;
maobaby.push(myMaoMao);
}
aimmc._visible = false;
CarExample.AddEmnemy(e1);
CarExample.AddEmnemy(e2);
CarExample.AddEmnemy(e3);
CarExample.AddRectSF(sf1);
CarExample.AddRectSF(sf2);
CarExample.AddRectSF(sf3);
CarExample.AddRectSF(sf4);
CarExample.AddRectSF(sf5);
CarExample.AddRectSF(sf6);
CarExample.AddRectSF(sf7);
CarExample.SetMiniMap(miniMap);
CarExample.SetMiniMap(aimmc, 1);
stop();
Frame 29
function updateItem2() {
w2 = _root.weparr[2];
w3 = _root.weparr[3];
w4 = _root.weparr[4];
w5 = _root.weparr[5];
w6 = _root.weparr[6];
}
while (maobaby.length > 0) {
maobaby.shift().removeMovieClip();
}
updateItem2();
Instance of Symbol 273 MovieClip in Frame 29
on (press) {
if (_root.scores >= 300) {
_root.weparr[3]++;
_root.scores = _root.scores - 300;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 29
on (press) {
if (_root.scores >= 600) {
_root.weparr[4]++;
_root.scores = _root.scores - 600;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 29
on (press) {
if ((_root.NumBaby < _root.MaxBaby) && (_root.scores >= 500)) {
_root.NumBaby++;
_root.scores = _root.scores - 500;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 29
on (press) {
if (_root.scores >= 500) {
_root.weparr[5]++;
_root.scores = _root.scores - 500;
}
_root.updateItem2();
}
Frame 36
stop();
Frame 37
stop();
stop();
CarExample.Clear();
p2._visible = false;
p3._visible = false;
CarExample.AddFriend(p1);
forBaby = [p2, p3];
var maobaby = [];
var nextID = 2;
while (_root.NumBaby > 0) {
trace("add.............");
CarExample.AddFriend(forBaby.shift());
var myMaoMao = _root.attachMovie("maobaby", "maomao" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
CarExample.addFriend(myMaoMao, nextID);
_root.NumBaby--;
nextID++;
maobaby.push(myMaoMao);
}
aimmc._visible = false;
CarExample.AddEmnemy(e1);
CarExample.AddEmnemy(e2);
CarExample.AddEmnemy(e3);
CarExample.AddRectSF(sf1);
CarExample.AddRectSF(sf2);
CarExample.AddRectSF(sf3);
CarExample.AddRectSF(sf4);
CarExample.AddRectSF(sf5);
CarExample.AddRectSF(sf11);
CarExample.AddRectSF(sf12);
CarExample.SetMiniMap(miniMap);
CarExample.SetMiniMap(aimmc, 1);
Frame 38
function updateItem2() {
w2 = _root.weparr[2];
w3 = _root.weparr[3];
w4 = _root.weparr[4];
w5 = _root.weparr[5];
w6 = _root.weparr[6];
}
stop();
while (maobaby.length > 0) {
maobaby.shift().removeMovieClip();
}
updateItem2();
Instance of Symbol 273 MovieClip in Frame 38
on (press) {
if (_root.scores >= 800) {
_root.weparr[6]++;
_root.scores = _root.scores - 800;
}
}
Instance of Symbol 273 MovieClip in Frame 38
on (press) {
if (_root.scores >= 300) {
_root.weparr[3]++;
_root.scores = _root.scores - 300;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 38
on (press) {
if (_root.scores >= 600) {
_root.weparr[4]++;
_root.scores = _root.scores - 600;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 38
on (press) {
if ((_root.NumBaby < _root.MaxBaby) && (_root.scores >= 500)) {
_root.NumBaby++;
_root.scores = _root.scores - 500;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 38
on (press) {
if (_root.scores >= 500) {
_root.weparr[5]++;
_root.scores = _root.scores - 500;
}
_root.updateItem2();
}
Frame 46
stop();
Frame 64
stop();
stop();
CarExample.Clear();
p2._visible = false;
p3._visible = false;
CarExample.AddFriend(p1);
forBaby = [p2, p3];
var nextID = 2;
var maobaby = [];
while (_root.NumBaby > 0) {
trace("add.............");
CarExample.AddFriend(forBaby.shift());
var myMaoMao = _root.attachMovie("maobaby", "maomao" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
CarExample.addFriend(myMaoMao, nextID);
_root.NumBaby--;
maobaby.push(myMaoMao);
nextID++;
}
aimmc._visible = false;
CarExample.AddEmnemy(e1);
CarExample.AddEmnemy(e2);
CarExample.AddEmnemy(e3);
CarExample.AddEmnemy(e4);
CarExample.AddRectSF(sf1);
CarExample.AddRectSF(sf2);
CarExample.AddRectSF(sf3);
CarExample.AddRectSF(sf4);
CarExample.AddRectSF(sf5);
CarExample.AddRectSF(sf6);
CarExample.AddRectSF(sf7);
CarExample.AddRectSF(sf8);
CarExample.AddRectSF(sf9);
CarExample.AddRectSF(sf10);
CarExample.AddRectSF(sf11);
CarExample.AddRectSF(sf12);
CarExample.SetMiniMap(miniMap);
CarExample.SetMiniMap(aimmc, 1);
Frame 65
function updateItem2() {
w2 = _root.weparr[2];
w3 = _root.weparr[3];
w4 = _root.weparr[4];
w5 = _root.weparr[5];
w6 = _root.weparr[6];
}
while (maobaby.length > 0) {
maobaby.shift().removeMovieClip();
}
updateItem2();
stop();
Instance of Symbol 273 MovieClip in Frame 65
on (press) {
if (_root.scores >= 300) {
_root.weparr[3]++;
_root.scores = _root.scores - 300;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 65
on (press) {
if (_root.scores >= 600) {
_root.weparr[4]++;
_root.scores = _root.scores - 600;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 65
on (press) {
if ((_root.NumBaby < _root.MaxBaby) && (_root.scores >= 500)) {
_root.NumBaby++;
_root.scores = _root.scores - 500;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 65
on (press) {
if (_root.scores >= 500) {
_root.weparr[5]++;
_root.scores = _root.scores - 500;
}
_root.updateItem2();
}
Frame 80
stop();
Frame 94
stop();
CarExample.Clear();
p2._visible = false;
p3._visible = false;
CarExample.AddFriend(p1);
forBaby = [p2, p3];
var nextID = 2;
var maobaby = [];
while (_root.NumBaby > 0) {
trace("add.............");
CarExample.AddFriend(forBaby.shift());
var myMaoMao = _root.attachMovie("maobaby", "maomao" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
CarExample.addFriend(myMaoMao, nextID);
_root.NumBaby--;
maobaby.push(myMaoMao);
nextID++;
}
aimmc._visible = false;
CarExample.AddEmnemy(e1);
CarExample.AddEmnemy(e2);
CarExample.AddEmnemy(e3);
CarExample.AddEmnemy(e4);
CarExample.AddRectSF(sf1);
CarExample.AddRectSF(sf2);
CarExample.AddRectSF(sf3);
CarExample.AddRectSF(sf4);
CarExample.AddRectSF(sf5);
CarExample.AddRectSF(sf6);
CarExample.AddRectSF(sf7);
CarExample.AddRectSF(sf8);
CarExample.AddRectSF(sf9);
CarExample.AddRectSF(sf10);
CarExample.AddRectSF(sf11);
CarExample.SetMiniMap(miniMap);
CarExample.SetMiniMap(aimmc, 1);
Frame 95
function updateItem2() {
w2 = _root.weparr[2];
w3 = _root.weparr[3];
w4 = _root.weparr[4];
w5 = _root.weparr[5];
w6 = _root.weparr[6];
}
while (maobaby.length > 0) {
maobaby.shift().removeMovieClip();
}
updateItem2();
Instance of Symbol 273 MovieClip in Frame 95
on (press) {
if (_root.scores >= 300) {
_root.weparr[3]++;
_root.scores = _root.scores - 300;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 95
on (press) {
if (_root.scores >= 600) {
_root.weparr[4]++;
_root.scores = _root.scores - 600;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 95
on (press) {
if ((_root.NumBaby < _root.MaxBaby) && (_root.scores >= 500)) {
_root.NumBaby++;
_root.scores = _root.scores - 500;
}
_root.updateItem2();
}
Instance of Symbol 273 MovieClip in Frame 95
on (press) {
if (_root.scores >= 500) {
_root.weparr[5]++;
_root.scores = _root.scores - 500;
}
_root.updateItem2();
}
Frame 114
stop();
Frame 116
stop();
CarExample.Clear();
p2._visible = false;
p3._visible = false;
CarExample.AddFriend(p1);
forBaby = [p2, p3];
var nextID = 2;
var maobaby = [];
while (_root.NumBaby > 0) {
trace("add.............");
CarExample.AddFriend(forBaby.shift());
var myMaoMao = _root.attachMovie("maobaby", "maomao" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
CarExample.addFriend(myMaoMao, nextID);
_root.NumBaby--;
maobaby.push(myMaoMao);
nextID++;
}
aimmc._visible = false;
CarExample.AddEmnemy(e1);
CarExample.AddEmnemy(e2);
CarExample.AddEmnemy(e3);
CarExample.AddEmnemy(e4);
CarExample.AddRectSF(sf1);
CarExample.AddRectSF(sf2);
CarExample.AddRectSF(sf3);
CarExample.AddRectSF(sf4);
CarExample.AddRectSF(sf5);
CarExample.AddRectSF(sf6);
CarExample.SetMiniMap(miniMap);
CarExample.SetMiniMap(aimmc, 1);
Frame 117
while (maobaby.length > 0) {
maobaby.shift().removeMovieClip();
}
Frame 130
stop();
Frame 132
stop();
Symbol 11 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
this.clear();
if ((_root.attackRight == _parent) && (CarExample.showling)) {
var _local4 = Math.atan2(this._ymouse, this._xmouse) / (Math.PI/180);
if (_local4 > 0) {
_local4 = 0;
this.canShot = false;
} else if (_local4 < -90) {
_local4 = -90;
this.canShot = false;
} else {
this.canShot = true;
h._rotation = _local4;
g._rotation = _local4;
this.lineStyle(5, 0);
this.lineTo(this._xmouse, this._ymouse);
}
}
};
this.onMouseDown = function () {
if ((_root.attackRight == _parent) && ((CarExample.showling && (this.canShot)) || (_root.aimmc.hitTest(_root._xmouse, _root._ymouse, true)))) {
CarExample.markAGun(_parent._x, _parent._y, this._xmouse, this._ymouse);
CarExample.showling = false;
}
};
Symbol 15 MovieClip [maoBaby] Frame 1
stop();
Symbol 19 MovieClip [fps] Frame 1
function calcFPS() {
numFrames++;
var _local3 = getTimer();
var _local2 = (_local3 - startTime) / 1000;
var _local1 = Math.round(numFrames / _local2);
fpsField.text = _local1;
}
var startTime = getTimer();
var numFrames = 0;
this.onEnterFrame = calcFPS;
Symbol 25 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 10
stop();
Symbol 39 MovieClip [houzi] Frame 1
stop();
CarExample.setE(this, "houzi");
mc = this;
Symbol 39 MovieClip [houzi] Frame 15
gotoAndPlay (2);
Symbol 39 MovieClip [houzi] Frame 16
stop();
Symbol 84 Button
on (press) {
getURL ("http://sillybull.com", "_blank");
}
Symbol 85 MovieClip Frame 1
Symbol 772 MovieClip [__Packages.CarExample] Frame 0
class CarExample
{
static var engine, currentBall;
function CarExample () {
AsBroadcaster.initialize(dispather);
engine = new org.cove.flade.DynamicsEngine();
engine.setDamping(1);
engine.setGravity(0, 1.5);
engine.setSurfaceBounce(0.2);
engine.setSurfaceFriction(0.2);
engine.paintSurfaces();
}
static function Clear() {
isplayerTurn = true;
clearInterval(_root.nextPlayerinter);
clearInterval(_root.gameOVerInter);
for (var _local2 in engine.primitives) {
engine.primitives[_local2].dmc.removeMovieClip();
}
_root.kaohao.removeMovieClip();
engine.primitives = new Array();
engine.surfaces = new Array();
engine.constraints = new Array();
emnemys = new Array();
friends = new Array();
actives = new Array();
friend_mcs = new Array();
links = new Array();
showling = true;
}
static function AddEmnemy(_mc, _index) {
var _local2 = new org.cove.flade.primitives.RectangleParticle(_mc._x + (_mc._width / 2), _mc._y + (_mc._height / 2), _mc._width, _mc._height);
engine.addPrimitive(_local2);
if (_index == undefined) {
emnemys.push(_local2);
} else {
emnemys.splice(_index, 2, _local2);
}
_mc.unloadMovie();
return(_local2);
}
static function AddCircleSF(_mc) {
engine.addSurface(new org.cove.flade.surfaces.CircleTile(_mc._x + (_mc._width / 2), _mc._y + (_mc._height / 2), _mc._height / 2));
_mc.unloadMovie();
}
static function AddRectSF(_mc) {
engine.addSurface(new org.cove.flade.surfaces.RectangleTile(_mc._x + (_mc._width / 2), _mc._y + (_mc._height / 2), _mc._width, _mc._height));
_mc.unloadMovie();
}
static function AddFriend(_mc) {
var _local2 = new org.cove.flade.primitives.RectangleParticle(_mc._x + (_mc._width / 2), _mc._y + (_mc._height / 2), _mc._width, _mc._height);
engine.addPrimitive(_local2);
_local2.linkMc = _mc;
friends.push(_local2);
_mc.unloadMovie();
}
static function markAGun(x, y, _vx, _vy, _type) {
_root.mm._visible = false;
_root.web._visible = false;
_root.ee._visible = false;
_root.forbit._visible = false;
trace("markAGun :" + _root.useW);
_root.ballFace._visible = true;
trace((x + ":") + y);
if (Math.abs(_vx) > 500) {
_vx = (400 * _vx) / Math.abs(_vx);
}
if (Math.abs(_vy) > 500) {
_vy = (400 * _vy) / Math.abs(_vy);
}
y = y - 20;
_root.ballFace.swapDepths(_root.getNextHighestDepth());
_root.ballFace._rotation = 0;
_root.weparr[_root.useW]--;
_root.updateItem();
if (_root.useW == 4) {
_root.ballFace.link = null;
_root.ballFace._x = x;
_root.ballFace._y = y;
currentBall = _root.ballFace;
shotby4();
} else if (_root.useW == 5) {
var _local4 = new org.cove.flade.primitives.CircleParticle(x, y - 50, 10);
_local4.prev.x = _local4.prev.x + ((-_vx) / 10);
_local4.prev.y = _local4.prev.y + ((-_vy) / 10);
_root.ballFace.link = _local4;
_local4.setVisible(false);
engine.addPrimitive(_local4);
currentBall = _local4;
shotby5();
} else if (_root.useW == 3) {
var _local4 = new org.cove.flade.primitives.CircleParticle(x, y, 10);
_local4.prev.x = _local4.prev.x + ((-_vx) / 10);
_local4.prev.y = _local4.prev.y + ((-_vy) / 10);
_root.ballFace.link = _local4;
_local4.setVisible(false);
engine.addPrimitive(_local4);
currentBall = _local4;
shotby3();
} else if (_root.useW == 2) {
var _local4 = new org.cove.flade.primitives.CircleParticle(x, y, 10);
_local4.prev.x = _local4.prev.x + ((-_vx) / 10);
_local4.prev.y = _local4.prev.y + ((-_vy) / 10);
_root.ballFace.link = _local4;
_local4.setVisible(false);
engine.addPrimitive(_local4);
currentBall = _local4;
shotby2();
} else {
var _local4 = new org.cove.flade.primitives.CircleParticle(x, y, 10);
_local4.prev.x = _local4.prev.x + ((-_vx) / 10);
_local4.prev.y = _local4.prev.y + ((-_vy) / 10);
_root.ballFace.link = _local4;
_local4.setVisible(false);
engine.addPrimitive(_local4);
currentBall = _local4;
}
}
function run() {
engine.timeStep();
engine.paintPrimitives();
engine.paintConstraints();
}
static function main(mc) {
var c = new CarExample();
mc.onEnterFrame = function () {
c.run();
_root.minimap.swapDepths(_root.getNextHighestDepth());
for (var _local5 in CarExample.links) {
CarExample.links[_local5].b._x = CarExample.links[_local5].a.curr.x;
CarExample.links[_local5].b._y = CarExample.links[_local5].a.curr.y;
}
if (CarExample.currentBall == null) {
return(undefined);
}
if (CarExample.isplayerTurn) {
for (var _local5 in CarExample.emnemys) {
if ((CarExample.currentBall != CarExample.emnemys[_local5]) && (CarExample.emnemys[_local5].lineMc.mc.isdead != true)) {
if (((CarExample.emnemys[_local5].ishit != true) && (Math.abs(CarExample.currentBall.curr.x - CarExample.emnemys[_local5].curr.x) < ((CarExample.emnemys[_local5].width / 2) + CarExample.currentBall.radius))) && (Math.abs(CarExample.currentBall.curr.y - CarExample.emnemys[_local5].curr.y) < ((CarExample.emnemys[_local5].height / 2) + CarExample.currentBall.radius))) {
trace("hit emenmy" + CarExample.emnemys[_local5].lineMc.mc);
_root.scores = _root.scores + 100;
CarExample.dispather.broadcastMessage("onHit");
CarExample.emnemys[_local5].ishit = true;
CarExample.emnemys[_local5].lineMc.mc.gotoAndStop("hit");
trace("hit" + CarExample.emnemys[_local5].lineMc);
if (CarExample.emnemys[_local5].lineMc.mc.hp.hitBy(_root.ballFace)) {
trace("emnemys dead");
_root.scores = _root.scores + 200;
CarExample.emnemys[_local5].lineMc.mc.isdead = true;
}
var _local3 = CarExample.emnemys[_local5].lineMc.mc.whenHitV;
if (_local3 > 0) {
CarExample.emnemys[_local5].prev.x = CarExample.emnemys[_local5].curr.x - 10;
CarExample.emnemys[_local5].prev.y = CarExample.emnemys[_local5].curr.y + 10;
}
if (CarExample.currentBall.lineMc.mc.whenHitV.x != 0) {
CarExample.currentBall.prev.x = CarExample.currentBall.curr.x + 10;
}
CarExample.currentBall = CarExample.emnemys[_local5];
}
}
}
} else {
for (var _local5 in CarExample.friends) {
if ((((CarExample.friends[_local5].linkMc.isHit != true) && (CarExample.friends[_local5].linkMc.isdead != true)) && (CarExample.currentBall != CarExample.friends[_local5])) && (CarExample.currentBall.curr.distance(CarExample.friends[_local5].curr) <= (CarExample.currentBall.radius + CarExample.friends[_local5].radius))) {
trace("hit mao mao");
CarExample.friends[_local5].linkMc.isHit = true;
trace((CarExample.currentBall.curr.distance(CarExample.friends[_local5].curr) + ":") + (CarExample.currentBall.radius + CarExample.friends[_local5].radius));
CarExample.dispather.broadcastMessage("onHit");
CarExample.friends[_local5].linkMc.mc.gotoAndStop("hit");
if (CarExample.friends[_local5].linkMc.hp.hitBy(_root.ballFace)) {
if ((_local5 == 0) && (_root.Life > 0)) {
trace("maomao lose life:" + CarExample.friends[_local5].linkMc);
_root.Life--;
CarExample.friends[_local5].linkMc.hp.setHP(100);
CarExample.friends[_local5].linkMc.onEnterFrame = function () {
if (this._visicount == undefined) {
this._visicount = 0;
}
this._visicount++;
if ((this._visicount % 5) == 0) {
this._visible = !this._visible;
}
if (this._visicount == 50) {
this._visicount = 0;
this._visible = true;
delete this.onEnterFrame;
}
};
} else {
trace("maomao dead:" + CarExample.friends[_local5].linkMc);
CarExample.friends[_local5].linkMc.isdead = true;
CarExample.friends[_local5].linkMc.linkObject = CarExample.friends[_local5];
CarExample.friends[_local5].linkMc.engine = CarExample.engine;
CarExample.friends[_local5].linkMc.onEnterFrame = function () {
trace("in mao mao");
this._alpha = this._alpha - 2;
if (this._alpha <= 0) {
delete this.onEnterFrame;
this.engine.removePrimitive(this.linkObject);
}
};
if (CarExample.friend_mcs.length > 1) {
for (var _local4 in CarExample.friend_mcs) {
trace((("find:" + CarExample.friend_mcs[_local4]) + ":") + CarExample.friends[_local5].linkMc);
if (CarExample.friend_mcs[_local4] == CarExample.friends[_local5].linkMc) {
CarExample.friend_mcs.splice(_local4, 1);
}
}
_root.attackRight = CarExample.friend_mcs[CarExample.friend_mcs.length - 1];
} else {
clearInterval(_root.gameOVerInter);
_root.gameOVerInter = setInterval(CarExample.GameOver, 2000);
return(undefined);
}
}
}
var _local3 = new org.cove.flade.util.Vector(0, 0);
CarExample.friends[_local5].prev.plus(_local3);
CarExample.currentBall.prev.x = CarExample.currentBall.curr.x - 10;
}
}
}
if (((CarExample.currentBall != null) && (CarExample.currentBall.curr.x > 0)) && (CarExample.currentBall.curr.y < 400)) {
var _local7 = 275 - CarExample.currentBall.curr.x;
_root._x = _local7;
if (_root._x > 0) {
_root._x = 0;
} else if (_root._x < (-_root.mathWidth)) {
_root._x = -_root.mathWidth;
}
} else if (CarExample.currentBall == null) {
trace("null" + CarExample.currentBall);
CarExample.nextPlayer();
CarExample.currentBall = null;
}
if (!isNaN(Math.abs(CarExample.currentBall.prev.x - CarExample.currentBall.curr.x))) {
if ((CarExample.currentBall != null) && ((((CarExample.currentBall.curr.x < -100) || (CarExample.currentBall.curr.x > (_root.mathWidth + 700))) || (CarExample.currentBall.curr.y > 500)) || (Math.abs(CarExample.currentBall.prev.x - CarExample.currentBall.curr.x) < 1))) {
trace("in====================================");
trace((("currentBall" + CarExample.currentBall) + ": ") + Math.abs(CarExample.currentBall.prev.x - CarExample.currentBall.curr.x));
if (CarExample.currentBall.curr.y > 400) {
CarExample.engine.removePrimitive(CarExample.currentBall);
}
CarExample.currentBall = null;
var _local6 = function () {
clearInterval(_root.nextPlayerinter);
trace("go nextPlayer");
CarExample.nextPlayer();
};
clearInterval(_root.nextPlayerinter);
_root.nextPlayerinter = setInterval(_local6, 1000);
}
}
};
}
static function SetMiniMap(_mc, _type) {
if (_type != 1) {
_mc.useHandCursor = false;
_mc.onPress = {};
}
_mc._type = _type;
_mc.engine = engine;
_mc.actives = actives;
_mc.friends = friends;
}
static function linkAtb(_p, _h) {
_h.linkObject = emnemys[_p - 1];
_h.mc.linkObject = emnemys[_p - 1];
emnemys[_p - 1].lineMc = _h;
links.push({a:emnemys[_p - 1], b:_h});
}
static function breakLink(_thismc) {
for (var _local2 in links) {
trace((links[_local2].b + " ") + _thismc);
if (links[_local2].b == _thismc) {
trace("delete............................");
links.splice(_local2, 1);
break;
}
}
}
static function setE(_obj, _str) {
if (_obj.active) {
return(undefined);
}
_obj.active = true;
if (_str == "houzi") {
trace("add:" + _obj);
_obj.hp = new xuecao(_obj);
_obj.hp.setXY(0, -50);
_obj.whenHitV = 0;
_obj.attackType = 1;
actives.push(_obj);
inithouZi(_obj);
} else if (_str == "fashi") {
_obj.hp = new xuecao(_obj);
_obj.hp.setXY(0, -50);
_obj.whenHitV = 0;
_obj.attackType = 1;
actives.push(_obj);
initfashi(_obj);
} else if (_str == "xinxin") {
trace("add:" + _obj);
_obj.hp = new xuecao(_obj);
_obj.hp.setXY(0, -50);
_obj.whenHitV = 0;
_obj.attackType = 2;
actives.push(_obj);
inithouZi(_obj);
} else if (_str == "jqh") {
_obj.hp = new xuecao(_obj);
_obj.hp.setXY(0, 0);
_obj.whenHitV = 0;
_obj.attackType = 3;
actives.push(_obj);
inithouZi(_obj);
} else if (_str == "huli") {
_obj.hp = new xuecao(_obj);
_obj.hp.setXY(0, 0);
_obj.whenHitV = 0;
_obj.attackType = 3;
actives.push(_obj);
inithuli(_obj);
} else if (_str == "bear") {
_obj.hp = new xuecao(_obj);
_obj.hp.setXY(0, -80);
_obj.whenHitV = 0;
_obj.attackType = 8;
actives.push(_obj);
inithouZi(_obj);
} else if (_str == "wxr") {
_obj.hp = new xuecao(_obj);
_obj.hp.setXY(0, -80);
_obj.whenHitV = 0;
_obj.attackType = 1;
actives.push(_obj);
initwxr(_obj);
}
}
static function GameOver() {
trace("GameOver....");
_root._x = 0;
isplayerTurn = true;
clearInterval(_root.gameOVerInter);
while (_root.maobaby.length > 0) {
_root.maobaby.shift().removeMovieClip();
}
gotoAndStop (4);
_root.ballFace.removeMovieClip();
_root.ballFace.unloadMovie();
_root.miniMap._y = 1000;
_root.miniMap.unloadMovie();
_root.miniMap.removeMovieClip();
}
static function addHouZi(__x) {
if (_root.m1 != undefined) {
__x = 880;
} else {
__x = __x - 50;
}
trace("00000:" + __x);
var _local2 = new Object();
_local2._x = __x;
_local2._y = 100;
_local2._width = 60;
_local2._height = 70;
var _local3 = AddEmnemy(_local2);
var aa = _root.attachMovie("houzi", "houzi" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_root.kaohao = aa;
aa._x = _local2._x;
aa._name = "houzi";
aa.linkObject = _local3;
aa.mc.linkObject = _local3;
aa.xpower = 300;
aa.ypower = 300;
_local3.lineMc = aa;
aa.actives = actives;
aa.onEnterFrame = function () {
delete aa.onEnterFrame;
var _local2 = CarExample.actives.pop();
CarExample.actives = [_local2].concat(CarExample.actives);
_root.miniMap.actives = CarExample.actives;
_root.aimmc.actives = CarExample.actives;
};
links.push({a:_local3, b:aa});
trace("-----------:" + actives[0]);
}
static function initwxr(_obj) {
_obj.attack = function () {
var a = (random(3) + 1);
_root["m" + a].play();
_root._x = 0;
_root["m" + a].nextAction = function () {
a = a - 1;
if (CarExample.friends[a].linkMc.isdead != true) {
CarExample.friends[a].linkMc.mc.gotoAndStop("hit");
if (CarExample.friends[a].linkMc.hp.hitBy(_root.ballFace)) {
if ((a == 0) && (_root.Life > 0)) {
trace("maomao lose life:" + CarExample.friends[a].linkMc);
_root.Life--;
CarExample.friends[a].linkMc.hp.setHP(100);
CarExample.friends[a].linkMc.onEnterFrame = function () {
if (this._visicount == undefined) {
this._visicount = 0;
}
this._visicount++;
if ((this._visicount % 5) == 0) {
this._visible = !this._visible;
}
if (this._visicount == 50) {
this._visicount = 0;
this._visible = true;
delete this.onEnterFrame;
}
};
} else {
trace("maomao dead:" + CarExample.friends[a].linkMc);
CarExample.friends[a].linkMc.isdead = true;
CarExample.friends[a].linkMc.linkObject = CarExample.friends[a];
CarExample.friends[a].linkMc.engine = CarExample.engine;
CarExample.friends[a].linkMc.onEnterFrame = function () {
trace("in mao mao");
this._alpha = this._alpha - 2;
if (this._alpha <= 0) {
delete this.onEnterFrame;
this.engine.removePrimitive(this.linkObject);
}
};
if (CarExample.friend_mcs.length > 1) {
for (var _local3 in CarExample.friend_mcs) {
trace((("find:" + CarExample.friend_mcs[_local3]) + ":") + CarExample.friends[a].linkMc);
if (CarExample.friend_mcs[_local3] == CarExample.friends[a].linkMc) {
CarExample.friend_mcs.splice(_local3, 1);
}
}
_root.attackRight = CarExample.friend_mcs[CarExample.friend_mcs.length - 1];
} else {
clearInterval(_root.gameOVerInter);
_root.gameOVerInter = setInterval(CarExample.GameOver, 2000);
return(undefined);
}
}
}
}
CarExample.nextPlayer();
};
};
}
static function initfashi(_obj) {
_obj.attack = function () {
this.play();
};
_obj.addHouZi = addHouZi;
_obj.doit = function () {
CarExample.addHouZi(_obj._parent._x - 100);
clearInterval(_root.nextPlayerinter);
_root.nextPlayerinter = setInterval(CarExample.nextPlayer, 1000);
};
}
static function inithuli(_obj) {
_obj.attack = function () {
_root.ballFace2.ishit = false;
_root.ballFace1.ishit = false;
_root.ballFace.ishit = false;
delete _root.web.onEnterFrame;
var pparr = new Array();
_root.resetWeapon();
_root.ballFace.gotoAndStop("t" + this.attackType);
_obj.shotpx = -(_obj.xpower + (random(100) - 50));
_obj.shotpy = -(_obj.ypower + (random(100) - 50));
var _local9 = _obj.shotpx + _obj.shotpy;
var _local7 = new org.cove.flade.primitives.CircleParticle(_obj.linkObject.curr.x, _obj.linkObject.curr.y, 10);
_local7.prev.x = _local7.prev.x + ((-_obj.shotpx) / 10);
_local7.prev.y = _local7.prev.y + ((-_obj.shotpy) / 10);
CarExample.engine.addPrimitive(_local7);
CarExample.currentBall = _local7;
_local7.linkmc = _root.ballFace;
_local7.setVisible(false);
_root.ballFace.link = _local7;
pparr.push(_local7);
_obj.shotpx = _obj.shotpx - 15;
_obj.shotpy = _obj.shotpy - 15;
_local7 = new org.cove.flade.primitives.CircleParticle(_obj.linkObject.curr.x, _obj.linkObject.curr.y, 10);
_local7.prev.x = _local7.prev.x + ((-_obj.shotpx) / 10);
_local7.prev.y = _local7.prev.y + ((-_obj.shotpy) / 10);
CarExample.engine.addPrimitive(_local7);
_local7.setVisible(false);
if (_local9 > (_obj.shotpx + _obj.shotpy)) {
CarExample.currentBall = _local7;
}
_local7.linkmc = _root.ballFace1;
_root.ballFace1.link = _local7;
pparr.push(_local7);
_obj.shotpx = _obj.shotpx + 30;
_obj.shotpy = _obj.shotpy + 30;
_local7 = new org.cove.flade.primitives.CircleParticle(_obj.linkObject.curr.x, _obj.linkObject.curr.y, 10);
_local7.prev.x = _local7.prev.x + ((-_obj.shotpx) / 10);
_local7.prev.y = _local7.prev.y + ((-_obj.shotpy) / 10);
CarExample.engine.addPrimitive(_local7);
_local7.setVisible(false);
if (_local9 > (_obj.shotpx + _obj.shotpy)) {
CarExample.currentBall = _local7;
}
pparr.push(_local7);
_local7.linkmc = _root.ballFace2;
_root.ballFace2.link = _local7;
_root.ballFace.gotoAndStop("t3");
_root.ballFace1.gotoAndStop("t3");
_root.ballFace2.gotoAndStop("t3");
_root.web.onEnterFrame = function () {
_root.ballFace2._rotation = 180 + (57.3248407643312 * Math.atan2(_root.ballFace2.link.prev.y - _root.ballFace2.link.curr.y, _root.ballFace2.link.prev.x - _root.ballFace2.link.curr.x));
_root.ballFace1._rotation = 180 + (57.3248407643312 * Math.atan2(_root.ballFace1.link.prev.y - _root.ballFace1.link.curr.y, _root.ballFace1.link.prev.x - _root.ballFace1.link.curr.x));
_root.ballFace._rotation = 180 + (57.3248407643312 * Math.atan2(_root.ballFace.link.prev.y - _root.ballFace.link.curr.y, _root.ballFace.link.prev.x - _root.ballFace.link.curr.x));
if (_root.ballFace._y > 500) {
org.cove.flade.surfaces.AbstractTile.dispather.broadcastMessage("onHit", _root.ballFace.link);
}
if (_root.ballFace1._y > 500) {
org.cove.flade.surfaces.AbstractTile.dispather.broadcastMessage("onHit", _root.ballFace1.link);
}
if (_root.ballFace2._y > 500) {
org.cove.flade.surfaces.AbstractTile.dispather.broadcastMessage("onHit", _root.ballFace2.link);
}
if ((_root.ballFace.ishit && (_root.ballFace2.ishit)) && (_root.ballFace1.ishit)) {
CarExample.nextPlayer();
}
for (var _local7 in CarExample.friends) {
var _local4 = [_root.ballFace2.link, _root.ballFace1.link, _root.ballFace.link];
for (var _local6 in _local4) {
var _local3 = _local4[_local6];
trace((((((_local6 + ":") + ((CarExample.friends[_local7].linkMc.isHit != true) && (CarExample.friends[_local7].linkMc.isdead != true))) + ":") + _local3.curr.distance(CarExample.friends[_local7].curr)) + "|||||") + ((_local3.radius + CarExample.friends[_local7].radius) + 20));
if (((CarExample.friends[_local7].linkMc.isHit != true) && (CarExample.friends[_local7].linkMc.isdead != true)) && (_local3.curr.distance(CarExample.friends[_local7].curr) <= (_local3.radius + CarExample.friends[_local7].radius))) {
trace("hit mao mao:" + CarExample.friends[_local7].linkMc);
CarExample.friends[_local7].linkMc.isHit = true;
if (CarExample.friends[_local7].linkMc.hp.hitBy(_root.ballFace)) {
trace("maomao dead:" + CarExample.friends[_local7].linkMc);
CarExample.friends[_local7].linkMc.linkObject = CarExample.friends[_local7];
CarExample.friends[_local7].linkMc.engine = CarExample.engine;
CarExample.friends[_local7].linkMc.onEnterFrame = function () {
trace("in mao mao");
this._alpha = this._alpha - 2;
if (this._alpha <= 0) {
delete this.onEnterFrame;
this.engine.removePrimitive(this.linkObject);
}
};
CarExample.friends[_local7].linkMc.isdead = true;
if (CarExample.friend_mcs.length > 1) {
for (var _local5 in CarExample.friend_mcs) {
trace((("find:" + CarExample.friend_mcs[_local5]) + ":") + CarExample.friends[_local7].linkMc);
if (CarExample.friend_mcs[_local5] == CarExample.friends[_local7].linkMc) {
CarExample.friend_mcs.splice(_local5, 1);
}
}
_root.attackRight = CarExample.friend_mcs[CarExample.friend_mcs.length - 1];
} else {
CarExample.GameOver();
}
}
}
}
}
};
var myListener2 = new Object();
myListener2.onHit = function (myp) {
trace("myListener2.onHit");
myp.linkmc.ishit = true;
myp.linkmc.gotoAndStop("roketBoom");
CarExample.engine.removePrimitive(myp);
if (myp == CarExample.currentBall) {
CarExample.currentBall = null;
}
if ((_root.ballFace2.ishit && (_root.ballFace.ishit)) && (_root.ballFace1.ishit)) {
_root.ballFace2.ishit = false;
_root.ballFace1.ishit = false;
_root.ballFace.ishit = false;
delete _root.web.onEnterFrame;
org.cove.flade.surfaces.AbstractTile.dispather.removeListener(myListener2);
myp.linkmc.Broning = function () {
_root.ballFace2._y = 1000;
_root.ballFace1._y = 1000;
_root.ballFace._y = 1000;
trace("nextByPlayer");
CarExample.nextPlayer();
_root.ballFace2.Broning = null;
_root.ballFace1.Broning = null;
_root.ballFace0.Broning = null;
};
}
};
org.cove.flade.surfaces.AbstractTile.dispather.addListener(myListener2);
var myListener1 = new Object();
myListener1.onNextPlay = function () {
for (var _local1 in pparr) {
trace((("removeing" + CarExample.engine) + " ") + pparr[_local1]);
CarExample.engine.removePrimitive(pparr[_local1]);
}
CarExample.dispather.removeListener(myListener1);
org.cove.flade.surfaces.AbstractTile.dispather.removeListener(myListener2);
};
CarExample.dispather.addListener(myListener1);
};
}
static function inithouZi(_obj) {
_obj.dead = function () {
};
_obj.attack = function () {
trace("===============t" + this.attackType);
_root.resetWeapon();
_root.ballFace.gotoAndStop("t" + this.attackType);
if (this.attackType == 3) {
var myListener1 = new Object();
myListener1.onHit = function () {
CarExample.dispather.removeListener(myListener1);
org.cove.flade.surfaces.AbstractTile.dispather.removeListener(myListener1);
delete _root.web.onEnterFrame;
_root.ballFace.link = null;
CarExample.engine.removePrimitive(CarExample.currentBall);
CarExample.currentBall = null;
_root.ballFace.gotoAndStop("roketBoom");
_root.ballFace.Broning = function () {
CarExample.nextPlayer();
_root.ballFace.Broning = null;
};
};
myListener1.onNextPlay = function () {
CarExample.dispather.removeListener(myListener1);
};
CarExample.dispather.addListener(myListener1);
_root.web.onEnterFrame = function () {
_root.ballFace._rotation = 180 + (57.3248407643312 * Math.atan2(CarExample.currentBall.prev.y - CarExample.currentBall.curr.y, CarExample.currentBall.prev.x - CarExample.currentBall.curr.x));
};
}
_obj.shotpx = -((_obj.xpower + random(100)) - 50);
_obj.shotpy = -((_obj.ypower + random(100)) - 50);
_obj.delay = 0;
_obj.needTo = Math.round(Math.atan2(-_obj.shotpy, -_obj.shotpx) * 10);
if (_obj.needTo > 13) {
_obj.needTo == 13;
} else if (_obj.needTo < 3) {
_obj.needTo = 3;
}
trace("needTO" + _obj.needTo);
_obj.gotoAndStop(2);
_obj.play();
_obj.onEnterFrame = function () {
trace((((("deleay:" + _obj) + ":") + _obj.needTo) + ":") + _obj._currentframe);
if (_obj._currentframe == _obj.needTo) {
_obj.stop();
_obj.delay++;
_obj.shot.play();
if (_obj.delay == 10) {
_root.ballFace._visible = true;
delete _obj.onEnterFrame;
trace("_obj.linkObject.curr.x:" + _obj.linkObject.curr.x);
CarExample.markAGun(_obj.linkObject.curr.x, _obj.linkObject.curr.y, _obj.shotpx, _obj.shotpy, _obj.attackType);
}
} else {
_obj.play();
}
};
};
}
static function nextPlayer() {
trace("nextPlayer");
clearInterval(_root.nextPlayerinter);
_root.ballFace._visible = false;
_root.ballFace._y = 1000;
dispather.broadcastMessage("onNextPlay");
isplayerTurn = !isplayerTurn;
_root.useW = 1;
if (isplayerTurn) {
_root.mm._visible = true;
_root.web._visible = true;
_root.ee._visible = true;
if (_root.mySound.getVolume() > 0) {
_root.forbit._visible = false;
} else {
_root.forbit._visible = true;
}
_root.web._visible = true;
_root.resetWeapon();
var _local4 = false;
var _local3 = 0;
while (_local3 < actives.length) {
if ((actives[_local3].linkObject.curr.y < 400) && (actives[_local3].isdead != true)) {
_local4 = true;
}
_local3++;
}
if (_local4) {
showling = true;
for (_local3 in emnemys) {
emnemys[_local3].ishit = false;
}
_root._x = 0;
} else {
trace("nextLevel");
nextLevel();
}
} else {
_root.web._visible = false;
for (var _local3 in friends) {
friends[_local3].linkMc.isHit = false;
}
trace("attack");
showling = false;
var _local3 = 0;
while (_local3 < actives.length) {
actives[_local3].gotoAndStop(2);
if (actives[_local3].isdead) {
breakLink(actives[_local3]);
engine.removePrimitive(actives[_local3].linkObject);
actives[_local3].onEnterFrame = function () {
this._alpha = this._alpha - 2;
if (this._alpha <= 0) {
delete this.onEnterFrame;
this._visible = false;
}
};
}
_local3++;
}
var _local4 = false;
_local3 = 0;
while (_local3 < actives.length) {
trace("aaaa:" + actives[_local3]);
if ((actives[_local3].linkObject.curr.y < 400) && (actives[_local3].isdead != true)) {
_local4 = true;
_root._x = 275 - actives[_local3].linkObject.curr.x;
if (_root._x < (-_root.mathWidth)) {
_root._x = -_root.mathWidth;
}
actives[_local3].attack();
break;
}
actives[_local3].isdead = true;
engine.removePrimitive(actives[_local3].linkObject);
_local3++;
}
if (!_local4) {
trace("nextLevel");
nextLevel();
}
}
}
static function addFriend(_obj, _linkfg) {
if (_linkfg == 1) {
_root.attackRight = _obj;
}
friend_mcs.push(_obj);
_obj.hp = new xuecao(_obj);
_obj.hp.setXY(0, -80);
friends[_linkfg - 1].linkMc = _obj;
trace((("======" + _linkfg) + ",") + friends[_linkfg - 1].linkMc);
links.push({a:friends[_linkfg - 1], b:_obj});
}
static function nextLevel() {
Clear();
isplayerTurn = true;
_root._x = 0;
currentBall = null;
_root.useW = 1;
_root.ballFace.link = null;
_root.ballFace.removeMovieClip();
_root.miniMap._y = 1000;
_root.miniMap.unloadMovie();
_root.miniMap.removeMovieClip();
showling = true;
_root.play();
}
static function shotby3() {
var myListener1 = new Object();
myListener1.onHit = function () {
CarExample.dispather.removeListener(myListener1);
delete _root.web.onEnterFrame;
_root.ballFace.link = null;
CarExample.engine.removePrimitive(CarExample.currentBall);
CarExample.currentBall = null;
_root.ballFace.gotoAndStop("roketBoom");
_root.ballFace.Broning = function () {
CarExample.nextPlayer();
_root.ballFace.Broning = null;
};
};
myListener1.onNextPlay = function () {
CarExample.dispather.removeListener(myListener1);
delete _root.web.onEnterFrame;
};
dispather.addListener(myListener1);
_root.web.onEnterFrame = function () {
_root.ballFace._rotation = 180 + (57.3248407643312 * Math.atan2(CarExample.currentBall.prev.y - CarExample.currentBall.curr.y, CarExample.currentBall.prev.x - CarExample.currentBall.curr.x));
};
}
static function shotby5() {
for (var _local2 in emnemys) {
emnemys[_local2].ishit = true;
}
var myListener1 = new Object();
var _local3 = new Object();
myListener1.onHit = function (_p) {
if (_p != CarExample.currentBall) {
return(undefined);
}
trace("hit.......................");
_root.ballFace.gotoAndStop("borning");
CarExample.dispather.removeListener(myListener1);
org.cove.flade.surfaces.AbstractTile.dispather.removeListener(myListener1);
_root.ballFace.link = null;
CarExample.engine.removePrimitive(CarExample.currentBall);
CarExample.currentBall = null;
for (var _local2 in CarExample.emnemys) {
if (_root.ballFace.hitTest(CarExample.emnemys[_local2].lineMc.mc)) {
if (CarExample.emnemys[_local2].lineMc.mc.hp.hitBy(_root.ballFace)) {
trace("emnemys dead");
CarExample.emnemys[_local2].lineMc.isdead = true;
}
}
}
_root.ballFace.Broning = function () {
CarExample.nextPlayer();
_root.ballFace.Broning = null;
};
};
_local3 = new Object();
_local3.onNextPlay = function () {
CarExample.dispather.removeListener(myListener1);
org.cove.flade.surfaces.AbstractTile.dispather.removeListener(myListener1);
};
dispather.addListener(_local3);
org.cove.flade.surfaces.AbstractTile.dispather.addListener(myListener1);
}
static function shotby2() {
var myListener1 = new Object();
myListener1.onHit = function () {
trace("hit.......................");
org.cove.flade.surfaces.AbstractTile.dispather.removeListener(myListener1);
_root.ballFace.gotoAndStop("roketBoom");
};
myListener1.onNextPlay = function () {
CarExample.dispather.removeListener(myListener1);
};
dispather.addListener(myListener1);
}
static function shotby4() {
trace("shot by 4 : " + emnemys);
var myListener1 = new Object();
myListener1.onHit = function () {
_root.aimtarget = null;
_root.ballFace.gotoAndStop("roketBoom");
delete _root.web.onEnterFrame;
CarExample.dispather.removeListener(myListener1);
CarExample.currentBall = null;
};
dispather.addListener(myListener1);
_root.web.onEnterFrame = function () {
if (_root.aimtargetmc) {
for (var _local2 in CarExample.emnemys) {
trace((_root.aimtargetmc + ":") + CarExample.emnemys[_local2].lineMc.mc);
if (CarExample.emnemys[_local2].lineMc.mc == _root.aimtargetmc) {
_root.aimtarget = _local2;
}
}
_root.aimtargetmc = "";
}
if (_root.aimtarget == undefined) {
return(undefined);
}
if ((_root.ballFace._y < -50) || ((CarExample.emnemys[_root.aimtarget].curr.x - _root.ballFace._x) < 100)) {
if ((CarExample.emnemys[_root.aimtarget].curr.x - _root.ballFace._x) < 100) {
_root.ballFace._x = _root.ballFace._x + 10;
_root.ballFace._y = _root.ballFace._y + ((CarExample.emnemys[_root.aimtarget].curr.y + 50) / 10);
} else {
_root.ballFace._rotation = 90;
_root.ballFace._x = _root.ballFace._x + 30;
}
if (_root.ballFace._y > 600) {
CarExample.nextPlayer();
_root.aimtarget = null;
delete _root.web.onEnterFrame;
CarExample.dispather.removeListener(myListener1);
CarExample.currentBall = null;
}
} else {
_root.ballFace._x = _root.ballFace._x + 5;
_root.ballFace._y = _root.ballFace._y - 20;
}
};
}
static var dispather = new Object();
static var emnemys = new Array();
static var friends = new Array();
static var friend_mcs = new Array();
static var actives = new Array();
static var isplayerTurn = true;
static var showling = true;
static var links = new Array();
}
Symbol 773 MovieClip [__Packages.org.cove.flade.DynamicsEngine] Frame 0
class org.cove.flade.DynamicsEngine
{
var primitives, surfaces, constraints, gravity, coeffRest, coeffFric, coeffDamp;
function DynamicsEngine () {
primitives = new Array();
surfaces = new Array();
constraints = new Array();
gravity = new org.cove.flade.util.Vector(0, 1);
coeffRest = 1.5;
coeffFric = 0.01;
coeffDamp = 0.99;
}
function addPrimitive(p) {
primitives.push(p);
}
function removePrimitive(p) {
for (var _local2 in primitives) {
if (primitives[_local2] == p) {
primitives.splice(_local2, 1);
}
}
}
function addSurface(s) {
surfaces.push(s);
}
function addConstraint(c) {
constraints.push(c);
}
function paintSurfaces() {
var _local2 = 0;
while (_local2 < surfaces.length) {
surfaces[_local2].paint();
_local2++;
}
}
function paintPrimitives() {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].paint();
_local2++;
}
}
function paintConstraints() {
var _local2 = 0;
while (_local2 < constraints.length) {
constraints[_local2].paint();
_local2++;
}
}
function timeStep() {
verlet();
satisfyConstraints();
checkCollisions();
}
function setSurfaceBounce(kfr) {
coeffRest = 1 + kfr;
}
function setSurfaceFriction(f) {
coeffFric = f;
}
function setDamping(d) {
coeffDamp = d;
}
function setGravity(gx, gy) {
gravity.x = gx;
gravity.y = gy;
}
function verlet() {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].verlet(this);
_local2++;
}
}
function satisfyConstraints() {
var _local2 = 0;
while (_local2 < constraints.length) {
constraints[_local2].resolve();
_local2++;
}
}
function checkCollisions() {
var _local4 = 0;
while (_local4 < surfaces.length) {
var _local3 = surfaces[_local4];
if (_local3.getActiveState()) {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].checkCollision(_local3, this);
_local2++;
}
}
_local4++;
}
}
}
Symbol 774 MovieClip [__Packages.org.cove.flade.util.Vector] Frame 0
class org.cove.flade.util.Vector
{
var x, y;
function Vector (px, py) {
x = px;
y = py;
}
function setTo(px, py) {
x = px;
y = py;
}
function copy(v) {
x = v.x;
y = v.y;
}
function dot(v) {
return((x * v.x) + (y * v.y));
}
function cross(v) {
return((x * v.y) - (y * v.x));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
return(this);
}
function plusNew(v) {
return(new org.cove.flade.util.Vector(x + v.x, y + v.y));
}
function minus(v) {
x = x - v.x;
y = y - v.y;
return(this);
}
function minusNew(v) {
return(new org.cove.flade.util.Vector(x - v.x, y - v.y));
}
function mult(s) {
x = x * s;
y = y * s;
return(this);
}
function multNew(s) {
return(new org.cove.flade.util.Vector(x * s, y * s));
}
function distance(v) {
var _local3 = x - v.x;
var _local2 = y - v.y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function normalize() {
var _local2 = Math.sqrt((x * x) + (y * y));
x = x / _local2;
y = y / _local2;
return(this);
}
function magnitude() {
return(Math.sqrt((x * x) + (y * y)));
}
function project(b) {
var _local5 = dot(b);
var _local4 = (b.x * b.x) + (b.y * b.y);
var _local3 = new org.cove.flade.util.Vector(0, 0);
_local3.x = (_local5 / _local4) * b.x;
_local3.y = (_local5 / _local4) * b.y;
return(_local3);
}
}
Symbol 775 MovieClip [__Packages.org.cove.flade.primitives.Particle] Frame 0
class org.cove.flade.primitives.Particle
{
var init, curr, prev, temp, extents, bmin, bmax, mtd, isVisible, dmc;
function Particle (posX, posY) {
init = new org.cove.flade.util.Vector(posX, posY);
curr = new org.cove.flade.util.Vector(posX, posY);
prev = new org.cove.flade.util.Vector(posX, posY);
temp = new org.cove.flade.util.Vector(0, 0);
extents = new org.cove.flade.util.Vector(0, 0);
bmin = 0;
bmax = 0;
mtd = new org.cove.flade.util.Vector(0, 0);
initializeContainer();
isVisible = true;
}
function initializeContainer() {
var _local3 = _root.getNextHighestDepth();
var _local4 = "_" + _local3;
dmc = _root.createEmptyMovieClip(_local4, _local3);
}
function setVisible(v) {
isVisible = v;
}
function verlet(sysObj) {
temp.x = curr.x;
temp.y = curr.y;
curr.x = curr.x + ((sysObj.coeffDamp * (curr.x - prev.x)) + sysObj.gravity.x);
curr.y = curr.y + ((sysObj.coeffDamp * (curr.y - prev.y)) + sysObj.gravity.y);
prev.x = temp.x;
prev.y = temp.y;
}
function pin() {
curr.x = init.x;
curr.y = init.y;
prev.x = init.x;
prev.y = init.y;
}
function setPos(px, py) {
curr.x = px;
curr.y = py;
prev.x = px;
prev.y = py;
}
function getCardXProjection() {
bmin = curr.x - extents.x;
bmax = curr.x + extents.x;
}
function getCardYProjection() {
bmin = curr.y - extents.y;
bmax = curr.y + extents.y;
}
function getAxisProjection(axis) {
var _local5 = new org.cove.flade.util.Vector(Math.abs(axis.x), Math.abs(axis.y));
var _local2 = curr.dot(axis);
var _local3 = extents.dot(_local5);
bmin = _local2 - _local3;
bmax = _local2 + _local3;
}
function setMTD(depthX, depthY, depthN, surfNormal) {
var _local4 = Math.abs(depthX);
var _local3 = Math.abs(depthY);
var _local2 = Math.abs(depthN);
if ((_local4 < _local3) && (_local4 < _local2)) {
mtd.setTo(depthX, 0);
} else if ((_local3 < _local4) && (_local3 < _local2)) {
mtd.setTo(0, depthY);
} else if ((_local2 < _local4) && (_local2 < _local3)) {
mtd = surfNormal.multNew(depthN);
}
}
function setXYMTD(depthX, depthY) {
var _local3 = Math.abs(depthX);
var _local2 = Math.abs(depthY);
if (_local3 < _local2) {
mtd.setTo(depthX, 0);
} else {
mtd.setTo(0, depthY);
}
}
function resolveCollision(normal, sysObj) {
var _local2 = curr.minusNew(prev);
var _local3 = normal.dot(_local2);
var _local8 = _local2.minusNew(normal.multNew(_local3));
var _local4 = _local8.multNew(sysObj.coeffFric);
var _local5 = normal.multNew(_local3 * sysObj.coeffRest);
var _local6 = _local5.plusNew(_local4);
var _local7 = _local2.minusNew(_local6);
curr.plus(mtd);
prev = curr.minusNew(_local7);
}
function paint() {
}
function checkCollision(surface, sysObj) {
}
}
Symbol 776 MovieClip [__Packages.org.cove.flade.surfaces.Surface] Frame 0
interface org.cove.flade.surfaces.Surface
{
}
Symbol 777 MovieClip [__Packages.org.cove.flade.primitives.CircleParticle] Frame 0
class org.cove.flade.primitives.CircleParticle extends org.cove.flade.primitives.Particle
{
var radius, contactRadius, extents, closestPoint, isVisible, dmc, curr;
function CircleParticle (px, py, r) {
super(px, py);
radius = r;
contactRadius = r;
extents = new org.cove.flade.util.Vector(r, r);
closestPoint = new org.cove.flade.util.Vector(0, 0);
}
function get width() {
return(radius);
}
function get height() {
return(radius);
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 6710886, 100);
org.cove.flade.graphics.Graphics.paintCircle(dmc, curr.x, curr.y, radius);
}
}
function checkCollision(surface, sysObj) {
surface.resolveCircleCollision(this, sysObj);
}
}
Symbol 778 MovieClip [__Packages.org.cove.flade.graphics.Graphics] Frame 0
class org.cove.flade.graphics.Graphics
{
function Graphics () {
}
static function paintLine(dmc, x0, y0, x1, y1) {
dmc.moveTo(x0, y0);
dmc.lineTo(x1, y1);
}
static function paintCircle(dmc, x, y, r) {
var mtp8r = (0.414213562373095 * r);
var msp4r = (0.707106781186547 * r);
with (dmc) {
moveTo(x + r, y);
curveTo(r + x, mtp8r + y, msp4r + x, msp4r + y);
curveTo(mtp8r + x, r + y, x, r + y);
curveTo((-mtp8r) + x, r + y, (-msp4r) + x, msp4r + y);
curveTo((-r) + x, mtp8r + y, (-r) + x, y);
curveTo((-r) + x, (-mtp8r) + y, (-msp4r) + x, (-msp4r) + y);
curveTo((-mtp8r) + x, (-r) + y, x, (-r) + y);
curveTo(mtp8r + x, (-r) + y, msp4r + x, (-msp4r) + y);
curveTo(r + x, (-mtp8r) + y, r + x, y);
}
}
static function paintRectangle(dmc, x, y, w, h) {
var w2 = (w / 2);
var h2 = (h / 2);
with (dmc) {
moveTo(x - w2, y - h2);
lineTo(x + w2, y - h2);
lineTo(x + w2, y + h2);
lineTo(x - w2, y + h2);
lineTo(x - w2, y - h2);
}
}
}
Symbol 779 MovieClip [__Packages.org.cove.flade.primitives.RectangleParticle] Frame 0
class org.cove.flade.primitives.RectangleParticle extends org.cove.flade.primitives.Particle
{
var width, height, vertex, extents, isVisible, dmc, curr;
function RectangleParticle (px, py, w, h) {
super(px, py);
width = w;
height = h;
vertex = new org.cove.flade.util.Vector(0, 0);
extents = new org.cove.flade.util.Vector(w / 2, h / 2);
}
function get radius() {
return(width);
}
function paint() {
if (isVisible) {
dmc.clear();
org.cove.flade.graphics.Graphics.paintRectangle(dmc, curr.x, curr.y, width, height);
}
}
function checkCollision(surface, sysObj) {
surface.resolveRectangleCollision(this, sysObj);
}
}
Symbol 780 MovieClip [__Packages.org.cove.flade.constraints.Constraint] Frame 0
interface org.cove.flade.constraints.Constraint
{
}
Symbol 781 MovieClip [__Packages.org.cove.flade.surfaces.AbstractTile] Frame 0
class org.cove.flade.surfaces.AbstractTile
{
static var dispather;
var center, verts, normal, isVisible, isActivated, dmc, minX, maxX, minY, maxY;
function AbstractTile (cx, cy) {
if (dispather == null) {
dispather = new Object();
AsBroadcaster.initialize(dispather);
}
center = new org.cove.flade.util.Vector(cx, cy);
verts = new Array();
normal = new org.cove.flade.util.Vector(0, 0);
isVisible = true;
isActivated = true;
initializeContainer();
}
function initializeContainer() {
var _local3 = _root.getNextHighestDepth();
var _local4 = "_" + _local3;
dmc = _root.createEmptyMovieClip(_local4, _local3);
}
function setVisible(v) {
isVisible = v;
}
function setActiveState(a) {
isActivated = a;
}
function getActiveState() {
return(isActivated);
}
function createBoundingRect(rw, rh) {
var _local2 = center.y - (rh / 2);
var _local3 = center.y + (rh / 2);
var _local5 = center.x - (rw / 2);
var _local4 = center.x + (rw / 2);
verts.push(new org.cove.flade.util.Vector(_local4, _local3));
verts.push(new org.cove.flade.util.Vector(_local4, _local2));
verts.push(new org.cove.flade.util.Vector(_local5, _local2));
verts.push(new org.cove.flade.util.Vector(_local5, _local3));
setCardProjections();
}
function testIntervals(boxMin, boxMax, tileMin, tileMax) {
if (boxMax < tileMin) {
return(0);
}
if (tileMax < boxMin) {
return(0);
}
var _local2 = tileMax - boxMin;
var _local1 = tileMin - boxMax;
if (Math.abs(_local2) < Math.abs(_local1)) {
return(_local2);
}
return(_local1);
}
function setCardProjections() {
getCardXProjection();
getCardYProjection();
}
function getCardXProjection() {
minX = verts[0].x;
var _local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].x < minX) {
minX = verts[_local2].x;
}
_local2++;
}
maxX = verts[0].x;
_local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].x > maxX) {
maxX = verts[_local2].x;
}
_local2++;
}
}
function getCardYProjection() {
minY = verts[0].y;
var _local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].y < minY) {
minY = verts[_local2].y;
}
_local2++;
}
maxY = verts[0].y;
_local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].y > maxY) {
maxY = verts[_local2].y;
}
_local2++;
}
}
function onContact() {
}
}
Symbol 782 MovieClip [__Packages.org.cove.flade.surfaces.CircleTile] Frame 0
class org.cove.flade.surfaces.CircleTile extends org.cove.flade.surfaces.AbstractTile implements org.cove.flade.surfaces.Surface
{
var createBoundingRect, radius, isVisible, dmc, center, onContact, normal, testIntervals, minX, maxX, minY, maxY;
function CircleTile (cx, cy, r) {
super(cx, cy);
createBoundingRect(r * 2, r * 2);
radius = r;
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 2237064, 100);
org.cove.flade.graphics.Graphics.paintCircle(dmc, center.x, center.y, radius);
}
}
function resolveCircleCollision(p, sysObj) {
if (isCircleColliding(p)) {
onContact();
p.resolveCollision(normal, sysObj);
}
}
function resolveRectangleCollision(p, sysObj) {
if (isRectangleColliding(p)) {
onContact();
p.resolveCollision(normal, sysObj);
}
}
function isCircleColliding(p) {
p.getCardXProjection();
var _local8 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local8 == 0) {
return(false);
}
p.getCardYProjection();
var _local7 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local7 == 0) {
return(false);
}
var _local4 = center.x - p.curr.x;
var _local3 = center.y - p.curr.y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6 = (p.radius + radius) - _local5;
if (_local6 > 0) {
_local4 = _local4 / _local5;
_local3 = _local3 / _local5;
p.mtd.setTo((-_local4) * _local6, (-_local3) * _local6);
normal.setTo(-_local4, -_local3);
return(true);
}
return(false);
}
function isRectangleColliding(p) {
p.getCardXProjection();
var _local6 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local6 == 0) {
return(false);
}
p.getCardYProjection();
var _local5 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local5 == 0) {
return(false);
}
var _local11 = Math.abs(_local6) < radius;
var _local12 = Math.abs(_local5) < radius;
if (_local11 && (_local12)) {
var _local10 = p.curr.x + (sign(center.x - p.curr.x) * (p.width / 2));
var _local9 = p.curr.y + (sign(center.y - p.curr.y) * (p.height / 2));
p.vertex.setTo(_local10, _local9);
var _local4 = p.vertex.x - center.x;
var _local3 = p.vertex.y - center.y;
var _local8 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = radius - _local8;
if (_local7 > 0) {
_local4 = _local4 / _local8;
_local3 = _local3 / _local8;
p.mtd.setTo(_local4 * _local7, _local3 * _local7);
normal.setTo(_local4, _local3);
return(true);
}
return(false);
}
p.setXYMTD(_local6, _local5);
normal.setTo(p.mtd.x / Math.abs(_local6), p.mtd.y / Math.abs(_local5));
return(true);
}
function sign(val) {
if (val < 0) {
return(-1);
}
if (val > 0) {
return(1);
}
}
}
Symbol 783 MovieClip [__Packages.org.cove.flade.surfaces.RectangleTile] Frame 0
class org.cove.flade.surfaces.RectangleTile extends org.cove.flade.surfaces.AbstractTile implements org.cove.flade.surfaces.Surface
{
var rectWidth, rectHeight, createBoundingRect, isVisible, dmc, center, onContact, normal, testIntervals, minX, maxX, minY, maxY;
function RectangleTile (cx, cy, rw, rh) {
super(cx, cy);
rectWidth = rw;
rectHeight = rh;
createBoundingRect(rw, rh);
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 2237064, 100);
org.cove.flade.graphics.Graphics.paintRectangle(dmc, center.x, center.y, rectWidth, rectHeight);
}
}
function resolveCircleCollision(p, sysObj) {
if (isCircleColliding(p)) {
onContact();
p.resolveCollision(normal, sysObj);
}
}
function resolveRectangleCollision(p, sysObj) {
if (isRectangleColliding(p)) {
onContact();
p.resolveCollision(normal, sysObj);
}
}
function isCircleColliding(p) {
p.getCardXProjection();
var _local6 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local6 == 0) {
return(false);
}
p.getCardYProjection();
var _local5 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local5 == 0) {
return(false);
}
var _local11 = Math.abs(_local6) < p.radius;
var _local12 = Math.abs(_local5) < p.radius;
if (_local11 && (_local12)) {
var _local10 = center.x + (sign(p.curr.x - center.x) * (rectWidth / 2));
var _local9 = center.y + (sign(p.curr.y - center.y) * (rectHeight / 2));
var _local4 = p.curr.x - _local10;
var _local3 = p.curr.y - _local9;
var _local8 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = p.radius - _local8;
if (_local7 > 0) {
_local4 = _local4 / _local8;
_local3 = _local3 / _local8;
p.mtd.setTo(_local4 * _local7, _local3 * _local7);
normal.setTo(_local4, _local3);
org.cove.flade.surfaces.AbstractTile.dispather.broadcastMessage("onHit", p);
return(true);
}
return(false);
}
p.setXYMTD(_local6, _local5);
normal.setTo(p.mtd.x / Math.abs(_local6), p.mtd.y / Math.abs(_local5));
org.cove.flade.surfaces.AbstractTile.dispather.broadcastMessage("onHit", p);
return(true);
}
function isRectangleColliding(p) {
p.getCardXProjection();
var _local4 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local4 == 0) {
return(false);
}
p.getCardYProjection();
var _local3 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local3 == 0) {
return(false);
}
p.setXYMTD(_local4, _local3);
normal.setTo(p.mtd.x / Math.abs(_local4), p.mtd.y / Math.abs(_local3));
return(true);
}
function sign(val) {
if (val < 0) {
return(-1);
}
if (val > 0) {
return(1);
}
}
}
Symbol 784 MovieClip [__Packages.xuecao] Frame 0
class xuecao
{
var mymc, lockmc;
function xuecao (_mc) {
trace("attack for:" + _mc);
mymc = _mc.attachMovie("xuecao", nextID(), _mc.getNextHighestDepth());
trace(mymc);
mymc.stop();
mymc._xscale = 50;
mymc._yscale = 50;
}
function get _hp() {
return(mymc._currentframe);
}
function nextID() {
return("xuecao" + (ID++));
}
function setHP(_num) {
trace("setHP call:" + _num);
if (_num == 100) {
delete eval (mymc.onEnterFrame());
mymc.gotoAndStop(1);
}
var _local2 = Math.round(_num / 2);
if (_local2 > 49) {
_local2 = 49;
} else if (_local2 < 0) {
_local2 = 0;
}
mymc.goto = 50 - _local2;
if (mymc.goto > 50) {
mymc.goto = 50;
} else if (mymc.goto < 1) {
mymc.goto = 1;
}
mymc.loseHP = oldHP - _num;
oldHP = _num;
mymc.txt.play();
mymc.txt.txt.num = -mymc.loseHP;
mymc.play();
mymc.onEnterFrame = function () {
if (this._currentframe >= this.goto) {
this.stop();
delete eval (this.mymc.onEnterFrame());
}
};
}
function showText(_str) {
trace("lose:" + _str);
}
function setVisible(_v) {
}
function setXY(__x, __y) {
mymc._x = __x;
mymc._y = __y;
trace(("call" + __x) + __y);
}
function lockMC(_mc) {
lockmc = _mc;
_mc.lockbyHP = true;
}
function hitBy(_o) {
trace("hit byu call:" + setHP);
var _local2 = oldHP - (random(10) + _o.attack);
if (_local2 < 0) {
_local2 = 0;
}
setHP(_local2);
if (_local2 == 0) {
return(true);
}
return(false);
}
static var ID = 0;
var oldHP = 100;
}
Symbol 122 Button
on (press) {
trace("Scene " + _root.needToLevel);
_root.play();
}
Symbol 130 Button
on (press) {
getURL ("http://sillybull.com", "_blank");
}
Symbol 145 Button
on (press) {
if (_root.mySound.getVolume() > 0) {
_root.mySound.setVolume(0);
} else {
_root.mySound.setVolume(100);
}
_root.forbit.makeMe();
}
Symbol 147 MovieClip Frame 1
function makeMe() {
if (_root.mySound.getVolume() > 0) {
this._visible = false;
} else {
this._visible = true;
}
}
makeMe();
this.enabled = false;
Symbol 156 Button
on (press) {
gotoAndStop (2);
}
Symbol 228 MovieClip Frame 10
_parent.gotoAndStop(1);
Symbol 229 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
if (!noinit) {
this.onMouseUp = function () {
if (((CarExample.showling && (this.canShot)) && (!_root.aimmc._visible)) && (_root._x == 0)) {
CarExample.markAGun(144, 289, this._xmouse, this._ymouse);
CarExample.showling = false;
}
};
noinit = true;
}
this.clear();
if (CarExample.showling && (_root._x == 0)) {
var _local3 = Math.atan2(this._ymouse, this._xmouse) / (Math.PI/180);
if (_local3 > 0) {
_local3 = 0;
this.canShot = false;
} else if (_local3 < -90) {
_local3 = -90;
this.canShot = false;
} else {
this.canShot = true;
h._rotation = _local3;
g._rotation = _local3;
this.lineStyle(5, 0);
this.lineTo(this._xmouse, this._ymouse);
}
}
};
Symbol 230 MovieClip Frame 1
Symbol 230 MovieClip Frame 49
gotoAndPlay (2);
Symbol 238 MovieClip Frame 1
mc.xpower = 300;
mc.ypower = 300;
Symbol 238 MovieClip Frame 30
gotoAndPlay (2);
Symbol 240 MovieClip Frame 1
CarExample.addFriend(mao, 1);
CarExample.linkAtb(1, h1);
CarExample.linkAtb(2, h2);
h2.xpower = 350;
h2.ypower = 300;
Symbol 256 MovieClip Frame 7
stop();
Symbol 257 MovieClip Frame 20
stop();
_parent.Broning();
Symbol 263 MovieClip Frame 15
_parent.Broning();
Symbol 264 MovieClip Frame 1
var curr = new Object();
onEnterFrame = function () {
if (link != null) {
this._x = link.curr.x;
this._y = link.curr.y;
}
curr.x = this._x;
curr.y = this._y;
};
stop();
attack = 20;
radius = 15;
attack = 20;
Symbol 264 MovieClip Frame 2
w.onEnterFrame = function () {
this._rotation = _x;
};
Symbol 264 MovieClip Frame 3
w.onEnterFrame = function () {
this._rotation = _x;
};
attack = 40;
Symbol 264 MovieClip Frame 4
attack = 200;
Symbol 264 MovieClip Frame 5
attack = 50;
Symbol 264 MovieClip Frame 6
attack = 100;
attack = 50;
Symbol 270 MovieClip Frame 1
hp._visible = false;
Symbol 271 MovieClip Frame 1
onEnterFrame = function () {
this.swapDepths(_root.getNextHighestDepth());
if (engine != undefined) {
if (_type != 1) {
this._x = -_root._x;
}
for (var _local5 in actives) {
var _local3 = "";
var _local4;
if (actives[_local5]._name != "mc") {
_local3 = actives[_local5]._name;
_local4 = actives[_local5]._x;
} else {
_local4 = actives[_local5]._parent._x;
_local3 = actives[_local5]._parent._name;
}
this[_local3].hp.gotoAndStop(actives[_local5].mc.hp._hp);
this[_local3].follwmc = actives[_local5];
this[_local3].hp._visible = true;
_root.aimmc[_local3].enabled = true;
if (actives[_local5].mc.isdead || (this[_local3].hp._currentframe >= 50)) {
this[_local3]._visible = false;
_root.aimmc[_local3].enabled = false;
}
}
mao1.hp._visible = true;
mao1.hp.gotoAndStop(friends[0].linkMc.hp._hp);
}
};
Instance of Symbol 270 MovieClip "h1" in Symbol 271 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 270 MovieClip "h2" in Symbol 271 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Symbol 283 MovieClip Frame 1
function clearAll() {
var _local2 = 1;
while (_local2 <= 6) {
this["ww" + _local2].filters = [];
_local2++;
}
}
var defFir = ww1.filters;
var i = 1;
while (i <= 6) {
this["ww" + i].id = i;
this["ww" + i].onPress = function () {
trace(_root.weparr[this.id]);
if (_root.weparr[this.id] > 0) {
_root.ballFace.gotoAndStop("w" + this.id);
clearAll();
if (this.id == 4) {
_root.aimmc._visible = true;
} else {
_root.aimmc._visible = false;
}
_root.useW = this.id;
this.filters = defFir;
}
};
this["ww" + i].onRollOver = function () {
CarExample.showling = false;
};
this["ww" + i].onRollOut = function () {
CarExample.showling = true;
};
i++;
}
_this = this;
_root.updateItem = function () {
_this.w2 = _root.weparr[2];
_this.w3 = _root.weparr[3];
_this.w4 = _root.weparr[4];
_this.w5 = _root.weparr[5];
_this.w6 = _root.weparr[6];
};
_root.resetWeapon = function () {
ww1.onPress();
_root.useW = 1;
_root.ballFace.gotoAndStop(1);
delete _root.web.onEnterFrame;
_root.ballFace._rotation = 0;
};
_root.updateItem();
mm.onRollOver = (ee.onRollOver = function () {
CarExample.showling = false;
});
mm.onRollOut = (ee.onRollOut = function () {
CarExample.showling = true;
});
Symbol 288 Button
on (press) {
_root.aimtargetmc = _root.miniMap.h1.follwmc;
_visible = false;
}
Symbol 289 Button
on (press) {
_root.aimtargetmc = _root.miniMap.h2.follwmc;
_visible = false;
}
Symbol 291 MovieClip Frame 1
onEnterFrame = function () {
if (_parent[this._name].enabled == false) {
this._visible = true;
} else {
this._visible = false;
}
};
Symbol 293 Button
on (release) {
if (_root.mySound.getVolume() > 0) {
_root.mySound.setVolume(0);
} else {
_root.mySound.setVolume(100);
}
_root.forbit.makeMe();
}
on (rollOver) {
CarExample.showling = false;
}
on (rollOut) {
CarExample.showling = true;
}
Symbol 294 Button
on (press) {
if (_root._x != 0) {
return(undefined);
}
gotoAndStop (2);
}
on (rollOver) {
CarExample.showling = false;
}
on (rollOut) {
CarExample.showling = true;
}
Symbol 312 Button
on (press) {
_root.play();
}
Symbol 326 Button
on (press) {
if (_root.scores >= 100) {
_root.weparr[2]++;
_root.scores = _root.scores - 100;
}
_root.updateItem2();
}
Symbol 328 Button
on (release) {
if (_root.mySound.getVolume() > 0) {
_root.mySound.setVolume(0);
} else {
_root.mySound.setVolume(100);
}
_root.forbit2.makeMe();
}
on (rollOver) {
CarExample.showling = false;
}
on (rollOut) {
CarExample.showling = true;
}
Symbol 329 Button
on (press) {
gotoAndPlay (2);
}
Symbol 378 MovieClip Frame 15
_parent.gotoAndStop(2);
Symbol 379 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 10
gotoAndStop (2);
Symbol 380 MovieClip Frame 1
CarExample.setE(this, "xinxin");
mc = this;
Symbol 380 MovieClip Frame 2
Symbol 380 MovieClip Frame 14
gotoAndPlay (2);
Symbol 381 MovieClip Frame 1
CarExample.addFriend(mao, 1);
CarExample.linkAtb(1, h1);
CarExample.linkAtb(2, h2);
CarExample.linkAtb(3, h3);
h2.xpower = 280;
h2.ypower = 200;
h1.xpower = 250;
h1.ypower = 200;
h3.xpower = 350;
h3.ypower = 280;
Symbol 387 MovieClip Frame 1
onEnterFrame = function () {
this.swapDepths(_root.getNextHighestDepth());
if (engine != undefined) {
if (_type != 1) {
this._x = -_root._x;
}
for (var _local5 in actives) {
var _local3 = "";
var _local4;
if (actives[_local5]._name != "mc") {
_local3 = actives[_local5]._name;
} else {
trace("in here ");
_local3 = actives[_local5]._parent._name;
}
_local4 = actives[_local5].mc.linkObject.curr.x;
this[_local3].hp.gotoAndStop(actives[_local5].mc.hp._hp);
this[_local3].follwmc = actives[_local5];
this[_local3].hp._visible = true;
if (actives[_local5].mc.isdead || (this[_local3].hp._currentframe >= 50)) {
this[_local3]._visible = false;
_root.aimmc[_local3].enabled = false;
}
}
mao1.hp.gotoAndStop(friends[0].linkMc.hp._hp);
}
};
Instance of Symbol 270 MovieClip "h1" in Symbol 387 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 270 MovieClip "h2" in Symbol 387 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 386 MovieClip "h3" in Symbol 387 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Symbol 388 Button
on (press) {
_root.aimtargetmc = _root.miniMap.h3.follwmc;
_visible = false;
}
Symbol 420 MovieClip Frame 8
_parent.gotoAndStop(1);
Symbol 421 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
if (!noinit) {
this.onMouseUp = function () {
if ((((!_root.aimmc._visible) && (_root._x == 0)) && (_root.attackRight == _parent)) && ((CarExample.showling && (this.canShot)) || (_root.aimmc.hitTest(_root._xmouse, _root._ymouse, true) && (_root.aimmc._visible)))) {
CarExample.markAGun(_parent._x, _parent._y, this._xmouse, this._ymouse);
CarExample.showling = false;
}
};
noinit = true;
}
this.clear();
if (((_root.attackRight == _parent) && (CarExample.showling)) && (_root._x == 0)) {
var _local4 = Math.atan2(this._ymouse, this._xmouse) / (Math.PI/180);
if (_local4 > 0) {
_local4 = 0;
this.canShot = false;
} else if (_local4 < -90) {
_local4 = -90;
this.canShot = false;
} else {
this.canShot = true;
h._rotation = _local4;
g._rotation = _local4;
this.lineStyle(5, 0);
this.lineTo(this._xmouse, this._ymouse);
}
}
};
Symbol 422 MovieClip Frame 1
stop();
Symbol 435 MovieClip Frame 1
CarExample.addFriend(mao, 1);
CarExample.linkAtb(1, h1);
CarExample.linkAtb(2, h2);
CarExample.linkAtb(3, h3);
h2.xpower = 250;
h2.ypower = 300;
h1.xpower = 220;
h1.ypower = 300;
h3.xpower = 300;
h3.ypower = 300;
Symbol 438 MovieClip Frame 1
onEnterFrame = function () {
this.swapDepths(_root.getNextHighestDepth());
if (engine != undefined) {
if (_type != 1) {
this._x = -_root._x;
}
for (var _local5 in actives) {
var _local3 = "";
var _local4;
if (actives[_local5]._name != "mc") {
_local3 = actives[_local5]._name;
} else {
trace("in here ");
_local3 = actives[_local5]._parent._name;
}
_local4 = actives[_local5].mc.linkObject.curr.x;
this[_local3].hp.gotoAndStop(actives[_local5].mc.hp._hp);
this[_local3].follwmc = actives[_local5];
this[_local3].hp._visible = true;
if (actives[_local5].mc.isdead || (this[_local3].hp._currentframe >= 50)) {
_root.aimmc[_local3].enabled = false;
this[_local3]._visible = false;
}
}
mao1.hp.gotoAndStop(friends[0].linkMc.hp._hp);
if (friends[1]) {
mao2.hp.gotoAndStop(friends[1].linkMc.hp._hp);
} else {
mao2._visible = false;
}
if (friends[2]) {
mao3._visible = true;
}
mao3.hp.gotoAndStop(friends[2].linkMc.hp._hp);
} else {
mao3._visible = false;
}
};
mao3._visible = false;
Instance of Symbol 270 MovieClip "h1" in Symbol 438 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 386 MovieClip "h3" in Symbol 438 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 386 MovieClip "h2" in Symbol 438 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Symbol 499 MovieClip Frame 1
stop();
CarExample.setE(this, "jqh");
mc = this;
Symbol 499 MovieClip Frame 19
gotoAndPlay (2);
Symbol 500 MovieClip Frame 1
stop();
Symbol 501 MovieClip Frame 1
CarExample.addFriend(mao, 1);
CarExample.linkAtb(1, h1);
CarExample.linkAtb(2, h2);
CarExample.linkAtb(3, h3);
h2.xpower = 250;
h2.ypower = 300;
h1.xpower = 220;
h1.ypower = 300;
h3.mc.xpower = 450;
h3.mc.ypower = 200;
Symbol 504 MovieClip Frame 1
onEnterFrame = function () {
this.swapDepths(_root.getNextHighestDepth());
if (engine != undefined) {
if (_type != 1) {
this._x = -_root._x;
}
for (var _local5 in actives) {
var _local3 = "";
var _local4;
if (actives[_local5]._name != "mc") {
_local3 = actives[_local5]._name;
} else {
_local3 = actives[_local5]._parent._name;
}
_local4 = actives[_local5].mc.linkObject.curr.x;
this[_local3]._x = _local4 / 7;
this[_local3].hp.gotoAndStop(actives[_local5].mc.hp._hp);
this[_local3].follwmc = actives[_local5];
this[_local3].hp._visible = true;
if (actives[_local5].mc.isdead || (this[_local3].hp._currentframe >= 50)) {
_root.aimmc[_local3].enabled = false;
this[_local3]._visible = false;
}
}
mao1.hp.gotoAndStop(friends[0].linkMc.hp._hp);
if (friends[1]) {
mao2.hp.gotoAndStop(friends[1].linkMc.hp._hp);
} else {
mao2._visible = false;
}
if (friends[2]) {
mao3._visible = true;
}
mao3.hp.gotoAndStop(friends[2].linkMc.hp._hp);
} else {
mao3._visible = false;
}
};
mao3._visible = false;
Instance of Symbol 386 MovieClip "h3" in Symbol 504 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 386 MovieClip "h2" in Symbol 504 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 386 MovieClip "h1" in Symbol 504 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Symbol 540 MovieClip Frame 1
stop();
CarExample.setE(this, "huli");
mc = this;
Symbol 541 MovieClip Frame 1
stop();
Symbol 551 MovieClip Frame 1
CarExample.addFriend(mao, 1);
CarExample.linkAtb(1, h1);
CarExample.linkAtb(2, h2);
CarExample.linkAtb(3, h3);
h2.mc.xpower = 250;
h2.mc.ypower = 300;
h1.mc.xpower = 200;
h1.mc.ypower = 300;
h3.mc.xpower = 250;
h3.mc.ypower = 300;
Symbol 557 MovieClip Frame 1
onEnterFrame = function () {
this.swapDepths(_root.getNextHighestDepth());
if (engine != undefined) {
if (_type != 1) {
this._x = -_root._x;
}
for (var _local5 in actives) {
var _local3 = "";
var _local4;
if (actives[_local5]._name != "mc") {
_local3 = actives[_local5]._name;
} else {
_local3 = actives[_local5]._parent._name;
}
_local4 = actives[_local5].mc.linkObject.curr.x;
this[_local3]._x = _local4 / 7;
this[_local3].hp.gotoAndStop(actives[_local5].mc.hp._hp);
this[_local3].follwmc = actives[_local5];
this[_local3].hp._visible = true;
if (actives[_local5].mc.isdead || (this[_local3].hp._currentframe >= 50)) {
_root.aimmc[_local3].enabled = false;
this[_local3]._visible = false;
}
}
mao1.hp.gotoAndStop(friends[0].linkMc.hp._hp);
if (friends[1]) {
mao2.hp.gotoAndStop(friends[1].linkMc.hp._hp);
} else {
mao2._visible = false;
}
if (friends[2]) {
mao3._visible = true;
}
mao3.hp.gotoAndStop(friends[2].linkMc.hp._hp);
} else {
mao3._visible = false;
}
};
mao3._visible = false;
Instance of Symbol 386 MovieClip "h2" in Symbol 557 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 386 MovieClip "h1" in Symbol 557 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 556 MovieClip "h3" in Symbol 557 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Symbol 586 MovieClip Frame 1
stop();
mc = this;
CarExample.setE(this, "bear");
Symbol 588 MovieClip Frame 1
CarExample.addFriend(mao, 1);
CarExample.linkAtb(1, h1);
CarExample.linkAtb(2, h2);
CarExample.linkAtb(3, h3);
CarExample.linkAtb(4, h4);
h2.mc.xpower = 300;
h2.mc.ypower = 280;
h1.mc.xpower = 250;
h1.mc.ypower = 250;
h3.xpower = 350;
h3.ypower = 300;
h4.xpower = 350;
h4.ypower = 250;
Symbol 589 Button
on (press) {
_root.aimtarget = 0;
_visible = false;
}
Symbol 590 Button
on (press) {
_root.aimtarget = 1;
_visible = false;
}
Symbol 591 Button
on (press) {
_root.aimtarget = 2;
_visible = false;
}
Symbol 592 Button
on (press) {
_root.aimtarget = 3;
_visible = false;
}
Symbol 598 MovieClip Frame 1
onEnterFrame = function () {
this.swapDepths(_root.getNextHighestDepth());
if (engine != undefined) {
if (_type != 1) {
this._x = -_root._x;
}
for (var _local5 in actives) {
var _local3 = "";
var _local4;
if (actives[_local5]._name != "mc") {
_local3 = actives[_local5]._name;
} else {
_local3 = actives[_local5]._parent._name;
}
_local4 = actives[_local5].mc.linkObject.curr.x;
this[_local3]._x = _local4 / 7;
this[_local3].hp.gotoAndStop(actives[_local5].mc.hp._hp);
this[_local3].follwmc = actives[_local5];
this[_local3].hp._visible = true;
if (actives[_local5].mc.isdead || (this[_local3].hp._currentframe >= 50)) {
_root.aimmc[_local3].enabled = false;
this[_local3]._visible = false;
}
}
mao1.hp.gotoAndStop(friends[0].linkMc.hp._hp);
if (friends[1]) {
mao2.hp.gotoAndStop(friends[1].linkMc.hp._hp);
} else {
mao2._visible = false;
}
if (friends[2]) {
mao3._visible = true;
}
mao3.hp.gotoAndStop(friends[2].linkMc.hp._hp);
} else {
mao3._visible = false;
}
};
mao3._visible = false;
Instance of Symbol 556 MovieClip "h1" in Symbol 598 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 556 MovieClip "h2" in Symbol 598 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 597 MovieClip "h3" in Symbol 598 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 597 MovieClip "h4" in Symbol 598 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Symbol 653 MovieClip Frame 1
stop();
CarExample.setE(this, "fashi");
mc = this;
Symbol 653 MovieClip Frame 31
doit();
Symbol 653 MovieClip Frame 51
gotoAndStop (1);
Symbol 654 MovieClip Frame 1
stop();
Symbol 655 MovieClip Frame 1
CarExample.addFriend(mao1, 1);
CarExample.linkAtb(1, h1);
CarExample.linkAtb(2, h2);
CarExample.linkAtb(3, h3);
CarExample.linkAtb(4, h4);
h2.mc.xpower = 250;
h2.mc.ypower = 300;
h1.xpower = 200;
h1.ypower = 300;
h3.mc.xpower = 300;
h3.mc.ypower = 300;
h4.xpower = 150;
h4.ypower = 100;
Symbol 656 Button
on (press) {
_root.aimtargetmc = _root.miniMap.h4.follwmc;
_visible = false;
}
Symbol 659 Button
on (press) {
_root.aimtargetmc = _root.miniMap.hou.follwmc;
_visible = false;
}
Symbol 660 MovieClip Frame 1
hou1._visible = false;
hou.enabled = false;
houzi._visible = false;
Symbol 664 MovieClip Frame 1
onEnterFrame = function () {
this.swapDepths(_root.getNextHighestDepth());
if (engine != undefined) {
if (_type != 1) {
this._x = -_root._x;
}
this.hou._visible = false;
for (var _local5 in actives) {
var _local3 = "";
var _local4;
if (actives[_local5]._name != "mc") {
_local3 = actives[_local5]._name;
} else {
_local3 = actives[_local5]._parent._name;
}
_local4 = actives[_local5].mc.linkObject.curr.x;
this[_local3].hp.gotoAndStop(actives[_local5].mc.hp._hp);
this[_local3].follwmc = actives[_local5];
this[_local3].hp._visible = true;
if (actives[_local5].mc.isdead || (this[_local3].hp._currentframe >= 50)) {
this[_local3]._visible = false;
_root.aimmc[_local3].enabled = false;
_root.aimmc.houzi._visible = false;
_root.aimmc.hou.enabled = false;
}
if (actives[_local5]._name.indexOf("houzi") >= 0) {
if (actives[_local5].mc.isdead) {
this.hou._visible = false;
} else {
this.hou._visible = true;
this.hou._x = actives[_local5]._x / 7;
this.hou.hp._visible = true;
this.hou.hp.gotoAndStop(actives[_local5].mc.hp._hp);
this.hou.follwmc = actives[_local5];
_root.aimmc.houzi._visible = true;
_root.aimmc.hou.enabled = true;
}
}
}
mao1.hp.gotoAndStop(friends[0].linkMc.hp._hp);
if (friends[1]) {
mao2.hp.gotoAndStop(friends[1].linkMc.hp._hp);
} else {
mao2._visible = false;
}
if (friends[2]) {
mao3._visible = true;
}
mao3.hp.gotoAndStop(friends[2].linkMc.hp._hp);
} else {
mao3._visible = false;
}
};
mao3._visible = false;
Instance of Symbol 386 MovieClip "h3" in Symbol 664 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 556 MovieClip "h2" in Symbol 664 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 597 MovieClip "h1" in Symbol 664 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 663 MovieClip "h4" in Symbol 664 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 270 MovieClip "hou" in Symbol 664 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Symbol 692 MovieClip Frame 1
stop();
Symbol 692 MovieClip Frame 36
nextAction();
Symbol 719 MovieClip Frame 1
stop();
stop();
CarExample.setE(this, "wxr");
mc = this;
Symbol 720 MovieClip Frame 1
CarExample.addFriend(mao1, 1);
CarExample.linkAtb(1, h1);
CarExample.linkAtb(2, h2);
CarExample.linkAtb(3, h3);
CarExample.linkAtb(4, h4);
h2.xpower = 150;
h2.ypower = 100;
h1.xpower = 150;
h1.ypower = 100;
h3.xpower = 150;
h3.ypower = 100;
h4.xpower = 150;
h4.ypower = 100;
Symbol 722 MovieClip Frame 1
hou.enabled = false;
hou2.enabled = false;
houzi._visible = false;
houzi2._visible = false;
Symbol 726 MovieClip Frame 1
onEnterFrame = function () {
this.swapDepths(_root.getNextHighestDepth());
if (engine != undefined) {
if (_type != 1) {
this._x = -_root._x;
}
this.hou._visible = false;
for (var _local5 in actives) {
var _local3 = "";
var _local4;
if (actives[_local5]._name != "mc") {
_local3 = actives[_local5]._name;
} else {
_local3 = actives[_local5]._parent._name;
}
_local4 = actives[_local5].mc.linkObject.curr.x;
this[_local3].hp.gotoAndStop(actives[_local5].mc.hp._hp);
this[_local3].follwmc = actives[_local5];
this[_local3].hp._visible = true;
if (actives[_local5].mc.isdead || (this[_local3].hp._currentframe >= 50)) {
this[_local3]._visible = false;
_root.aimmc[_local3].enabled = false;
}
if (actives[_local5]._name.indexOf("houzi") >= 0) {
if (actives[_local5].mc.isdead) {
this.hou._visible = false;
_root.aimmc.houzi._visible = false;
_root.aimmc.houzi2._visible = false;
_root.aimmc.hou.enabled = false;
_root.aimmc.hou2.enabled = false;
} else {
this.hou._visible = true;
this.hou._x = actives[_local5]._x / 7;
if (this.hou._x < 100) {
_root.aimmc.houzi._visible = true;
_root.aimmc.houzi2._visible = false;
_root.aimmc.hou.enabled = true;
_root.aimmc.hou2.enabled = false;
} else {
_root.aimmc.houzi._visible = false;
_root.aimmc.houzi2._visible = true;
_root.aimmc.hou.enabled = false;
_root.aimmc.hou2.enabled = true;
}
this.hou.hp._visible = true;
this.hou.hp.gotoAndStop(actives[_local5].mc.hp._hp);
this.hou.follwmc = actives[_local5];
}
}
}
mao1.hp.gotoAndStop(friends[0].linkMc.hp._hp);
if (friends[1]) {
mao2.hp.gotoAndStop(friends[1].linkMc.hp._hp);
} else {
mao2._visible = false;
}
if (friends[2]) {
mao3._visible = true;
}
mao3.hp.gotoAndStop(friends[2].linkMc.hp._hp);
} else {
mao3._visible = false;
}
};
mao3._visible = false;
Instance of Symbol 663 MovieClip "h1" in Symbol 726 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 270 MovieClip "hou" in Symbol 726 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 663 MovieClip "h2" in Symbol 726 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 725 MovieClip "h3" in Symbol 726 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Instance of Symbol 725 MovieClip "h4" in Symbol 726 MovieClip Frame 1
on (press) {
_root.aimtargetmc = follwmc;
_parent._visible = false;
}
Symbol 750 Button
on (press) {
gotoAndPlay (2);
}
Symbol 761 Button
on (press) {
getURL ("http://sillybull.com", "_blank");
}