Frame 1
play();
Frame 2
_percent = int((100 * getBytesLoaded()) / getBytesTotal());
if (_percent >= 100) {
play();
} else {
prevFrame();
}
Frame 3
function startGame() {
return(1);
}
gotoAndStop (5);
Frame 5
play();
Frame 30
play();
Frame 64
persoRouge.gotoAndStop(persoRouge._totalframes);
persoBleu.gotoAndStop(persoRouge._totalframes);
Frame 76
stop();
Frame 77
stop();
Frame 83
stop();
call("fonctions");
start();
Frame 92
if (lchangewind != 1) {
_windMax = random(2) + 1;
_windAngle = random(360);
}
lchangewind = 1;
_xoffset = 144;
mcsounds.gotoAndPlay("start");
mcgameManager.gotoAndPlay("start");
stop();
Frame 100
if (lchangewind != 1) {
_windMax = random(3) + 2;
_windAngle = random(360);
}
lchangewind = 1;
_xoffset = 272;
mcsounds.gotoAndPlay("start");
mcgameManager.gotoAndPlay("start");
stop();
Frame 108
if (lchangewind != 1) {
_windMax = random(4) + 2;
_windAngle = random(360);
}
lchangewind = 1;
_xoffset = 75.2;
mcsounds.gotoAndPlay("start");
mcgameManager.gotoAndPlay("start");
stop();
Frame 116
if (lchangewind != 1) {
_windMax = random(5) + 2;
_windAngle = random(360);
}
lchangewind = 1;
_xoffset = 280.6;
mcsounds.gotoAndPlay("start");
mcgameManager.gotoAndPlay("start");
stop();
Frame 124
if (lchangewind != 1) {
_windMax = random(5) + 3;
_windAngle = random(360);
}
lchangewind = 1;
_xoffset = 60.8;
mcsounds.gotoAndPlay("start");
mcgameManager.gotoAndPlay("start");
stop();
Frame 132
if (lchangewind != 1) {
_windMax = random(5) + 3;
_windAngle = random(360);
}
lchangewind = 1;
_xoffset = 220.6;
mcsounds.gotoAndPlay("start");
mcgameManager.gotoAndPlay("start");
stop();
Frame 140
if (lchangewind != 1) {
_windMax = random(5) + 3;
_windAngle = random(360);
}
lchangewind = 1;
_xoffset = 192.8;
mcsounds.gotoAndPlay("start");
mcgameManager.gotoAndPlay("start");
stop();
Frame 148
if (lchangewind != 1) {
_windMax = random(6) + 3;
_windAngle = random(360);
}
lchangewind = 1;
_xoffset = 95.8;
mcsounds.gotoAndPlay("start");
mcgameManager.gotoAndPlay("start");
stop();
Frame 156
if (lchangewind != 1) {
_windMax = random(6) + 3;
_windAngle = random(360);
}
lchangewind = 1;
_xoffset = 190.8;
mcsounds.gotoAndPlay("start");
mcgameManager.gotoAndPlay("start");
stop();
Frame 164
if (0 < _NBEssais) {
this.gotoAndStop("niveau" + _niveau);
} else {
this.gotoAndStop("wait");
mcInterface.gotoAndStop("gameOver");
}
Frame 170
stop();
Frame 176
function Start() {
_NBNiveaux = 9;
_niveau = 1;
_niveau2 = (_niveau + "/") + _NBNiveaux;
_NBEssais = 10;
_score = 0;
_bonus = 50;
_bonus2 = 10;
this.gotoAndStop("niveau" + _niveau);
}
function replay() {
lchangewind = 0;
_NBEssais = 10;
_niveau = 1;
_niveau2 = (_niveau + "/") + _NBNiveaux;
this.gotoAndStop("init");
mcelli2.gotoAndStop(1);
_score = 0;
}
function restart() {
this.gotoAndStop("init");
mcelli2.gotoAndStop(1);
}
function nextLevel() {
lchangewind = 0;
_niveau2 = (_niveau + "/") + _NBNiveaux;
this.gotoAndStop("init");
mcelli2.gotoAndStop(1);
}
function replay2() {
mcgameManager.gotoAndStop("replay");
}
Symbol 21 MovieClip Frame 5
gotoAndPlay (1);
Symbol 23 MovieClip Frame 9
gotoAndPlay (1);
Symbol 23 MovieClip Frame 10
play();
Symbol 23 MovieClip Frame 13
stop();
Symbol 28 MovieClip Frame 9
gotoAndPlay (1);
Symbol 28 MovieClip Frame 10
stop();
Symbol 45 Button
on (release, keyPress "<Space>") {
nextFrame();
}
Symbol 47 Button
on (release, keyPress "<Space>") {
this.gotoAndStop("game");
}
Symbol 55 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 7
play();
Symbol 55 MovieClip Frame 9
stop();
_parent.ecran.nextFrame();
Symbol 59 Button
on (release) {
this.gotoAndStop("rules");
}
Symbol 65 MovieClip Frame 1
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 9
play();
Symbol 70 MovieClip Frame 15
gotoAndPlay (9);
Symbol 70 MovieClip Frame 20
stop();
Symbol 70 MovieClip Frame 28
play();
Symbol 70 MovieClip Frame 45
stop();
Symbol 70 MovieClip Frame 47
play();
Symbol 70 MovieClip Frame 64
stop();
Symbol 70 MovieClip Frame 66
play();
Symbol 70 MovieClip Frame 83
stop();
Symbol 70 MovieClip Frame 85
play();
Symbol 70 MovieClip Frame 100
stop();
Symbol 70 MovieClip Frame 102
play();
Symbol 70 MovieClip Frame 117
stop();
Symbol 77 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 7
stop();
Symbol 79 Button
on (release) {
_parent.mcgameManager.gotoAndStop("resolution");
gotoAndStop (2);
}
Symbol 80 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 1
live = true;
stop();
Symbol 82 MovieClip Frame 9
play();
Symbol 82 MovieClip Frame 13
gotoAndStop (1);
Symbol 87 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 10
play();
Symbol 87 MovieClip Frame 18
gotoAndPlay (10);
Symbol 87 MovieClip Frame 20
play();
Symbol 87 MovieClip Frame 29
stop();
Symbol 88 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 10
play();
Symbol 88 MovieClip Frame 18
gotoAndPlay (10);
Symbol 88 MovieClip Frame 20
play();
Symbol 88 MovieClip Frame 26
stop();
Symbol 89 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 10
play();
Symbol 89 MovieClip Frame 18
gotoAndPlay (10);
Symbol 89 MovieClip Frame 20
play();
Symbol 89 MovieClip Frame 29
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 10
stop();
Symbol 90 MovieClip Frame 24
stop();
Symbol 90 MovieClip Frame 34
stop();
Symbol 90 MovieClip Frame 48
stop();
Symbol 94 Button
on (release) {
_parent.restart();
play();
}
Symbol 98 Button
on (release) {
_parent.replay2();
}
Symbol 100 Button
on (release) {
_parent.replay2();
}
Symbol 107 Button
on (release) {
_parent.nextLevel();
play();
}
Symbol 114 Button
on (release) {
_parent.gotoAndStop("rules");
}
Symbol 117 MovieClip Frame 1
_visible = false;
stop();
Symbol 117 MovieClip Frame 8
play();
Symbol 117 MovieClip Frame 80
stop();
Symbol 117 MovieClip Frame 88
_visible = false;
stop();
Symbol 117 MovieClip Frame 101
play();
Symbol 117 MovieClip Frame 141
stop();
Symbol 117 MovieClip Frame 150
_visible = false;
stop();
Symbol 117 MovieClip Frame 159
play();
Symbol 117 MovieClip Frame 192
Symbol 117 MovieClip Frame 204
stop();
Symbol 117 MovieClip Frame 212
_visible = false;
stop();
Symbol 117 MovieClip Frame 218
play();
Symbol 117 MovieClip Frame 260
Symbol 117 MovieClip Frame 275
stop();
Symbol 117 MovieClip Frame 284
_visible = false;
stop();
Symbol 128 MovieClip Frame 1
stop();
temps = 3;
Symbol 128 MovieClip Frame 2
play();
Symbol 128 MovieClip Frame 6
play();
Symbol 128 MovieClip Frame 21
temps--;
if (0 < temps) {
gotoAndPlay (6);
}
Symbol 132 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 1
stop();
this._visible = false;
Symbol 136 MovieClip Frame 2
_scale = 50;
_focale = 20;
_Yfloor = 20;
if (_parent._yoffset == undefined) {
_yoffset = -150;
} else {
_yoffset = _parent._yoffset;
}
if (_parent._xoffset == undefined) {
_xoffset = 176;
} else {
_xoffset = _parent._xoffset;
}
ldball = 0.22;
ldpot = 0.12;
ldzone = 10;
ldwall = 0.8;
lplayerHeight = 1.8;
call("collisions");
call("fonctions");
call("goal");
call("wall");
call("wind");
v3DPoint = new Object();
v3DPoint.x = 0;
v3DPoint.y = 0;
v3DPoint.z = 0;
v3DPoint.scale = 0;
v2DPoint = new Object();
v2DPoint.x = 0;
v2DPoint.y = 0;
v2DPoint.z = 0;
vxbut = 0;
vybut = _Yfloor;
vzbut = 50;
lScale = (_scale * _Focale) / (_Focale + vzbut);
vsxbut = (lScale * vxbut) + _xoffset;
vsybut = (lScale * vybut) + _yoffset;
gotoAndPlay (8);
Symbol 136 MovieClip Frame 7
play();
Symbol 136 MovieClip Frame 8
xm = _parent._xmouse;
ym = _parent._ymouse;
v3DPoint = screenToWorld(xm, ym, _Yfloor, _Focale, _scale, _xoffset, _yoffset);
vsplayer = v3DPoint.scale;
vxplayer = v3DPoint.x;
vyplayer = v3DPoint.y;
vzplayer = v3DPoint.z;
_parent.mcPlayer._x = xm;
_parent.mcPlayer._y = ym;
_parent.mcPlayer._xscale = vsplayer * lplayerHeight;
_parent.mcPlayer._yscale = vsplayer * lplayerHeight;
_parent.mcline2._x = _parent.mcBall._x;
_parent.mcline2._y = _parent.mcBall._y;
_parent.mcline2._xscale = vsxbut - _parent.mcBall._x;
_parent.mcline2._yscale = vsybut - _parent.mcBall._y;
v3DPoint = screenToWorld(_parent.mcBall._x, _parent.mcBall._y, _Yfloor, _Focale, _scale, _xoffset, _yoffset);
lsball = v3DPoint.scale;
lxball = v3DPoint.x;
lyball = v3DPoint.y;
lzball = v3DPoint.z;
ls1 = (_scale * _Focale) / ((_Focale + lzball) - (ldzone / 2));
ls2 = (_scale * _Focale) / ((_Focale + lzball) + (ldzone / 2));
lj1 = (ls1 * lyball) + _yoffset;
lj2 = (ls2 * lyball) + _yoffset;
_parent.mcBall._xscale = lsball * ldball;
_parent.mcBall._yscale = lsball * ldball;
lxshadow = lxball;
lyshadow = _yfloor;
lzshadow = lzball;
v2DPoint = WorldToScreen(lxshadow, lyshadow, lzshadow, _Focale, _scale, _xoffset, _yoffset);
_parent.mcshadow._x = v2DPoint.x;
_parent.mcshadow._y = v2DPoint.y;
_parent.mcshadow._xscale = (lsball * ldball) * 2;
_parent.mcshadow._yscale = (lsball * ldball) * 1;
_parent.mcelli2._x = _parent.mcBall._x;
_parent.mcelli2._y = (lj2 + lj1) / 2;
_parent.mcelli2._xscale = lsball * ldzone;
_parent.mcelli2._yscale = lj1 - lj2;
langle = Math.atan2(lxball, lzball - 50);
lyball2 = lyball;
lxball2 = lxball + ((ldzone / 2) * Math.cos(-lAngle));
lzball2 = lzball + ((ldzone / 2) * Math.sin(-lAngle));
v2DPoint = WorldToScreen(lxball2, lyball2, lzball2, _Focale, _scale, _xoffset, _yoffset);
_parent.mcelli2.mcCircle._rotation = (langle * 180) / Math.PI;
ldist = Math.sqrt((((vxplayer - lxball) * (vxplayer - lxball)) + ((vyplayer - lyball) * (vyplayer - lyball))) + ((vzplayer - lzball) * (vzplayer - lzball)));
ldx1 = lxball - vxplayer;
ldy1 = lzball - vzplayer;
ldx2 = lxball2 - vxplayer;
ldy2 = lzball2 - vzplayer;
lDir = ((((ldx2 * ldy1) - (ldy2 * ldx1)) < 0) ? 1 : -1);
if (lDir == 1) {
if ((ldzone / 2) < ldist) {
lxnew = lxball - (((ldzone / 2) * (lxball - vxplayer)) / ldist);
lznew = lzball - (((ldzone / 2) * (lzball - vzplayer)) / ldist);
lynew = _Yfloor;
v2DPoint = WorldToScreen(lxnew, lynew, lznew, _Focale, _scale, _xoffset, _yoffset);
_parent.mcPlayer._x = v2DPoint.x;
_parent.mcPlayer._y = v2DPoint.y;
_parent.mcPlayer._xscale = (v2DPoint.z * 2) * lplayerHeight;
_parent.mcPlayer._yscale = (v2DPoint.z * 2) * lplayerHeight;
} else {
lxnew = vxplayer;
lznew = vzplayer;
lynew = _Yfloor;
}
} else {
lxnew = vxplayer;
lznew = vzplayer;
lynew = _Yfloor;
if ((lzball - lzball2) != 0) {
var a = ((lzball - lzball2) / (lxball - lxball2));
var b = (lzball2 - (a * lxball2));
var x4 = lxnew;
var z4 = ((a * x4) + b);
} else {
var x4 = lxnew;
var z4 = lzball;
}
lxnew = x4;
lznew = z4;
lynew = _Yfloor;
ldist2 = Math.sqrt((((lxnew - lxball) * (lxnew - lxball)) + ((lynew - lyball) * (lynew - lyball))) + ((lznew - lzball) * (lznew - lzball)));
if ((ldzone / 2) < ldist2) {
lxnew = lxball - (((ldzone / 2) * (lxball - lxnew)) / ldist2);
lznew = lzball - (((ldzone / 2) * (lzball - lznew)) / ldist2);
lynew = _Yfloor;
v2DPoint = WorldToScreen(lxnew, lynew, lznew, _Focale, _scale, _xoffset, _yoffset);
_parent.mcPlayer._x = v2DPoint.x;
_parent.mcPlayer._y = v2DPoint.y;
_parent.mcPlayer._xscale = (v2DPoint.z * 2) * lplayerHeight;
_parent.mcPlayer._yscale = (v2DPoint.z * 2) * lplayerHeight;
} else {
v2DPoint = WorldToScreen(lxnew, lynew, lznew, _Focale, _scale, _xoffset, _yoffset);
_parent.mcPlayer._x = v2DPoint.x;
_parent.mcPlayer._y = v2DPoint.y;
_parent.mcPlayer._xscale = (v2DPoint.z * 2) * lplayerHeight;
_parent.mcPlayer._yscale = (v2DPoint.z * 2) * lplayerHeight;
}
}
langle2 = Math.atan2(lxnew - lxball, lzball - lznew);
langle3 = 180 - ((Math.abs(langle + langle2) * 180) / Math.PI);
langle4 = ((langle2 * 180) / Math.PI) + 90;
if (langle4 < 36) {
_parent.mcPlayer.gotoAndStop("playerLeft");
} else if (langle4 < 72) {
_parent.mcPlayer.gotoAndStop("playerMediumLeft");
} else if (langle4 < 108) {
_parent.mcPlayer.gotoAndStop("playerBack");
} else if (langle4 < 144) {
_parent.mcPlayer.gotoAndStop("playerMediumRight");
} else {
_parent.mcPlayer.gotoAndStop("playerRight");
}
if (((langle * 180) / Math.PI) < 0) {
lSens = 1;
} else {
lSens = -1;
}
prevFrame();
Symbol 136 MovieClip Frame 13
vAngleMin = 10;
vAngleMax = 40;
vLenghtMin = 0.3;
vLenghtMax = 0.95;
vGravity = 0.0098;
vDiv = 1.5;
vDivEffect = 1.1;
vDivBut = 10;
vDivGoal = 5;
lGoalSide = 0;
lcol1 = 0;
lcol2 = 0;
lcol3 = 0;
_parent.mcbut.gotoAndStop("game");
ltest = 0;
lbut = 0;
ltestBut = 0;
var i = 1;
while (vNBWall >= i) {
vTestWall[i] = 0;
i++;
}
vTestGoal = 0;
vTestgoal2 = 0;
vTestgoal3 = 0;
v2DPoint = WorldToScreen(vxgoal, vygoal, vzgoal, _Focale, _scale, _xoffset, _yoffset);
_parent.mcgoal.gotoAndStop("stand-up");
_parent.mcgoal._x = v2DPoint.x;
_parent.mcgoal._y = v2DPoint.y;
_parent.mcgoal._xscale = (v2DPoint.z * 2) * lplayerHeight;
_parent.mcgoal._yscale = (v2DPoint.z * 2) * lplayerHeight;
lgoalleft = 0;
lgoalright = 0;
vXPlayer = lxnew;
vYPlayer = lynew;
vZPlayer = lznew;
vXPlayerStart = lxnew;
vYPlayerStart = lynew;
vZPlayerStart = lznew;
vXBall = lxball;
vYBall = lyball;
vZBall = lzball;
vXBallStart = lxball;
vYBallStart = lyball;
vZBallStart = lzball;
vangle = langle3 * lsens;
vanglebut = langle;
vangleplayer = langle2;
vdist = Math.sqrt((((vXPlayer - vXBall) * (vXPlayer - vXBall)) + ((vYPlayer - vYBall) * (vYPlayer - vYBall))) + ((vZPlayer - vZBall) * (vZPlayer - vZBall)));
vdistbut = Math.sqrt((vXBall * vXBall) + ((vZBall - 50) * (vZBall - 50)));
vVectorLenght = vLenghtMin + (((vLenghtMax - vLenghtMin) * vdist) / (ldzone / 2));
vVectorRot = vAngleMax - (((vAngleMax - vAngleMin) * vdist) / (ldzone / 2));
vVectorRot = (vVectorRot / 180) * Math.PI;
vYVector = (0 * Math.cos(-vVectorRot)) + (vVectorLenght * Math.sin(-vVectorRot));
vZVector = (vVectorLenght * Math.cos(-vVectorRot)) + (0 * Math.sin(-vVectorRot));
var lZvector = vZVector;
vXVector = (0 * Math.cos(-vanglebut)) + (lZvector * Math.sin(-vanglebut));
vZVector = ((-lZvector) * Math.cos(-vanglebut)) + (0 * Math.sin(-vanglebut));
vXVectorEffect = vangle / 100;
vmaxframes = 18;
vnbframes = int((vmaxframes * vdist) / (ldzone / 2));
if (0 >= vnbFrames) {
vnbframes = 1;
}
vnbframes2 = vnbframes;
vx2 = (vXBall - vXPlayer) / vnbframes;
vz2 = (vZBall - vZPlayer) / vnbframes;
_parent.mcInterface._visible = true;
if (1 < _parent._NBEssais) {
_parent.mcInterface.gotoAndStop("restart");
}
_parent._NBEssais--;
_parent.mcplayer.mcanim.gotoAndStop("run");
gotoAndStop (52);
Symbol 136 MovieClip Frame 22
vAngleMin = 10;
vAngleMax = 40;
vLenghtMin = 0.3;
vLenghtMax = 0.95;
vGravity = 0.0098;
vDiv = 1.5;
vDivEffect = 1.1;
vDivBut = 10;
vDivGoal = 5;
lGoalSide = 0;
lcol1 = 0;
lcol2 = 0;
lcol3 = 0;
_parent.mcbut.gotoAndStop("game");
ltest = 0;
lbut = 0;
ltestBut = 0;
var i = 1;
while (vNBWall >= i) {
vTestWall[i] = 0;
i++;
}
vTestGoal = 0;
vTestgoal2 = 0;
vTestgoal3 = 0;
vxgoal = 0;
v2DPoint = WorldToScreen(vxgoal, vygoal, vzgoal, _Focale, _scale, _xoffset, _yoffset);
_parent.mcgoal.gotoAndStop("stand-up");
_parent.mcgoal._x = v2DPoint.x;
_parent.mcgoal._y = v2DPoint.y;
_parent.mcgoal._xscale = (v2DPoint.z * 2) * lplayerHeight;
_parent.mcgoal._yscale = (v2DPoint.z * 2) * lplayerHeight;
lgoalleft = 0;
lgoalright = 0;
vXPlayer = vXPlayerStart;
vYPlayer = vYPlayerStart;
vZPlayer = vZPlayerStart;
vXBall = vXBallStart;
vYBall = vYBallStart;
vZBall = vZBallStart;
vxgoal = v3DPoint2.x;
vygoal = v3DPoint2.y;
vzgoal = v3DPoint2.z;
vrgoal = v3DPoint2.scale;
vtestgoal = 0;
v2DPoint = WorldToScreen(vXBall, vYBall, vZBall, _Focale, _scale, _xoffset, _yoffset);
_parent.mcball._x = v2DPoint.x;
_parent.mcball._y = v2DPoint.y;
_parent.mcball._xscale = (v2DPoint.z * 2) * ldball;
_parent.mcball._yscale = (v2DPoint.z * 2) * ldball;
v2DPoint = WorldToScreen(vXBall, _Yfloor + 0.05, vZBall, _Focale, _scale, _xoffset, _yoffset);
_parent.mcShadow._x = v2DPoint.x;
_parent.mcShadow._y = v2DPoint.y;
_parent.mcShadow._xscale = (v2DPoint.z * 4) * ldball;
_parent.mcShadow._yscale = (v2DPoint.z * 2) * ldball;
vangle = langle3 * lsens;
vanglebut = langle;
vangleplayer = langle2;
vdist = Math.sqrt((((vXPlayer - vXBall) * (vXPlayer - vXBall)) + ((vYPlayer - vYBall) * (vYPlayer - vYBall))) + ((vZPlayer - vZBall) * (vZPlayer - vZBall)));
vdistbut = Math.sqrt((vXBall * vXBall) + ((vZBall - 50) * (vZBall - 50)));
vVectorLenght = vLenghtMin + (((vLenghtMax - vLenghtMin) * vdist) / (ldzone / 2));
vVectorRot = vAngleMax - (((vAngleMax - vAngleMin) * vdist) / (ldzone / 2));
vVectorRot = (vVectorRot / 180) * Math.PI;
vYVector = (0 * Math.cos(-vVectorRot)) + (vVectorLenght * Math.sin(-vVectorRot));
vZVector = (vVectorLenght * Math.cos(-vVectorRot)) + (0 * Math.sin(-vVectorRot));
var lZvector = vZVector;
vXVector = (0 * Math.cos(-vanglebut)) + (lZvector * Math.sin(-vanglebut));
vZVector = ((-lZvector) * Math.cos(-vanglebut)) + (0 * Math.sin(-vanglebut));
vXVectorEffect = vangle / 100;
vmaxframes = 18;
vnbframes = int((vmaxframes * vdist) / (ldzone / 2));
if (0 >= vnbFrames) {
vnbframes = 1;
}
vnbframes2 = vnbframes;
vx2 = (vXBall - vXPlayer) / vnbframes;
vz2 = (vZBall - vZPlayer) / vnbframes;
_parent.mcplayer.mcanim.gotoAndStop("run");
this.gotoAndStop("run2");
Symbol 136 MovieClip Frame 29
play();
Symbol 136 MovieClip Frame 30
vxplayer = vxplayer + vx2;
vzplayer = vzplayer + vz2;
v2DPoint = WorldToScreen(vxplayer, vyplayer, vzplayer, _Focale, _scale, _xoffset, _yoffset);
_parent.mcPlayer._x = v2DPoint.x;
_parent.mcPlayer._y = v2DPoint.y;
_parent.mcPlayer._xscale = (v2DPoint.z * 2) * lplayerHeight;
_parent.mcPlayer._yscale = (v2DPoint.z * 2) * lplayerHeight;
vnbframes--;
if (0 >= vnbframes) {
_parent.mcsounds.gotoAndPlay("shoot");
_parent.mcplayer.mcanim.gotoAndStop("shoot");
gotoAndStop (37);
} else {
prevFrame();
}
Symbol 136 MovieClip Frame 36
play();
Symbol 136 MovieClip Frame 37
lWindDiv = vyball - 17.9;
if (lWindDiv < 0) {
lWindDiv = 0;
} else if (2 < lWindDiv) {
lWindDiv = 2;
}
lWindDiv = (2 - lWindDiv) / 2;
vXWind2 = vXWind * lWindDiv;
vZWind2 = vZWind * lWindDiv;
if (lbut != 1) {
vXVector = vXVector + vXWind2;
vZVector = vZVector + vZWind2;
}
vXBall = vXBall + (vXVector - vXVectorEffect);
vYBall = vYBall + vYVector;
vZBall = vZBall + vZVector;
vXVectorEffect = vXVectorEffect / vDivEffect;
if (vYBall < _YFloor) {
vYVector = vYVector + vGravity;
}
if (_YFloor < vYball) {
vYVector = -vYVector;
vYball = _Yfloor;
vXVector = vXVector / vDiv;
vYVector = vYVector / vDiv;
vZVector = vZVector / vDiv;
_parent.mcsounds.gotoAndPlay("hitfloor");
}
lLenght = ((vXVector * vXVector) + (vYVector * vYVector)) + (vZVector * vZVector);
if ((lLenght < 0.001) and ((_YFloor - 0.001) < vYBall)) {
gotoAndStop (44);
}
if (((50 - (ldball + (ldpot / 2))) < vZBall) and (vZBall < (50 + (ldball + (ldpot / 2))))) {
collisions();
}
if ((50 < vZBall) and (ltest != 1)) {
ltest = 1;
if (((lcol1 != 3) and (lcol2 != 3)) and (lcol3 != 3)) {
lxb = vxball;
lyb = vyball;
lzb = vzball;
vXBall = vXBall - ((vXVector - vXVectorEffect) / 2);
vYBall = vYBall - (vYVector / 2);
vZBall = vZBall - (vZVector / 2);
collisions();
if (((lcol1 != 3) and (lcol2 != 3)) and (lcol3 != 3)) {
vXBall = lxb;
vYBall = lyb;
vZBall = lzb;
}
}
}
var i = 1;
while (vNBWall >= i) {
name = eval ("_parent.mcWall" + i);
if (((vZBall < ((vzWall[i] + ldwall) + ldball)) and ((vzWall[i] - (ldwall + ldball)) < vZBall)) and (vTestWall[i] != 1)) {
lxb = vXBall;
lzb = vZBall;
lDistTrans = Math.sqrt(((vxWall[i] - lxb) * (vxWall[i] - lxb)) + ((vzWall[i] - lzb) * (vzWall[i] - lzb)));
if ((((ldball / 2) + (ldwall / 2)) >= lDistTrans) and ((_YFloor - lplayerHeight) < vYball)) {
name.gotoAndStop("stop");
vxslope = lxb - vxWall[i];
vzslope = lzb - vzWall[i];
vXBall = vxWall[i] + ((vxslope / lDistTrans) * ((ldball / 2) + (ldwall / 2)));
vZBall = vzWall[i] + ((vzslope / lDistTrans) * ((ldball / 2) + (ldwall / 2)));
lLenght = Math.sqrt((vxslope * vxslope) + (vzslope * vzslope));
vxslope = vxslope / lLenght;
vzslope = vzslope / lLenght;
lambda = (vXVector * vxslope) + (vZVector * vzslope);
vXVector = ((2 * lambda) * vxslope) - vXVector;
vZVector = ((2 * lambda) * vzslope) - vZVector;
vXVector = vXVector / vDiv;
vZVector = vZVector / vDiv;
vTestWall[i] = 1;
_parent.mcsounds.gotoAndPlay("hitwall");
}
}
i++;
}
if (30 < vZBall) {
lz1 = vzgoal - vZBallStart;
lz2 = vzgoal - vZBall;
lx2 = (lz2 * vXBallStart) / lz1;
lxball2 = vXBall - lx2;
lyball2 = vYBall;
lzball2 = vzgoal;
}
if (((40 + int((vmaxframes - vnbframes2) / 1.5)) < vZBall) and (vTestgoal != 1)) {
if (lxball2 < (vxgoal - 1.22)) {
if (lyball2 < (_yfloor - 1.5)) {
_parent.mcgoal.gotoAndStop("jumpleft");
} else {
_parent.mcgoal.gotoAndStop("diveleft");
}
lGoalSide = 1;
} else if ((vxgoal + 1.22) < lxball2) {
if (lyball2 < (_yfloor - 1.5)) {
_parent.mcgoal.gotoAndStop("jumpright");
} else {
_parent.mcgoal.gotoAndStop("diveright");
}
lGoalSide = 2;
} else {
if (lyball2 < (_yfloor - 1.5)) {
_parent.mcgoal.gotoAndStop("jump");
} else {
_parent.mcgoal.gotoAndStop("front");
}
lGoalSide = 3;
}
vTestGoal = 1;
}
if ((((vTestgoal2 == 50) and (lGoalSide != 2)) and (lGoalSide != 1)) or ((((lGoalSide != 3) and (lGoalSide != 2)) and (lGoalSide != 1)) and (50 < vzball))) {
_parent.mcgoal.gotoAndStop("front");
}
if ((((35 < vZBall) and (50 >= vZBall)) and (vTestgoal2 < 60)) or ((50 < vZBall) and (vTestgoal2 < 20))) {
if (vTestgoal2 < 1) {
_parent.mcgoal.gotoAndStop("walk");
}
if ((vxgoal < lxball2) and (lGoalSide != 1)) {
if ((lxball2 - vxgoal) < 0.1) {
vxgoal = vxgoal + (lxball2 - vxgoal);
} else {
vxgoal = vxgoal + 0.1;
}
} else if ((lxball2 < vxgoal) and (lGoalSide != 2)) {
if ((vxgoal - lxball2) < 0.1) {
vxgoal = vxgoal - (vxgoal - lxball2);
} else {
vxgoal = vxgoal - 0.1;
}
}
v2DPoint = WorldToScreen(vxgoal, vygoal, vzgoal, _Focale, _scale, _xoffset, _yoffset);
_parent.mcgoal._x = v2DPoint.x;
_parent.mcgoal._y = v2DPoint.y;
vTestgoal2++;
}
if ((((vzgoal - (ldball * 2)) < vZBall) and (vZBall < (vzgoal + (ldball * 2)))) and (vTestgoal3 == 0)) {
v2DPoint = WorldToScreen(lxball2, lyball2, lzball2, _Focale, _scale, _xoffset, _yoffset);
lHitTest = _parent.mcgoal.mccollision.hitTest(v2DPoint.x, v2DPoint.y, true);
if (lHitTest) {
vZVector = -vZVector;
vectorDivGoal();
vTestgoal3 = 1;
_parent.mcsounds.gotoAndPlay("hitgoal");
}
}
if (((50 + (ldball / 2)) < vZBall) and (ltestBut < 2)) {
if (lbut != 1) {
if (((-3.66 + ((ldball / 2) + (ldpot / 2))) < vXBall) and (vXBall < (3.66 - ((ldball / 2) + (ldpot / 2))))) {
if (((_YFloor - 2.44) + ((ldball / 2) + (ldpot / 2))) < vYBall) {
lbut = 1;
_parent.mcbut.gotoAndStop("but");
_parent.mcsounds.gotoAndPlay("but");
}
}
}
if (lbut != 1) {
if ((-3.66 < (vXBall - ((vXVector - vXVectorEffect) / 2))) and ((vXBall - ((vXVector - vXVectorEffect) / 2)) < 3.66)) {
if ((_YFloor - 2.44) < (vYBall - (vYVector / 2))) {
vXBall = vXBall - ((vXVector - vXVectorEffect) / 2);
vYBall = vYBall - (vYVector / 2);
vZBall = vZBall - (vZVector / 2);
lbut = 1;
_parent.mcbut.gotoAndStop("but");
_parent.mcsounds.gotoAndPlay("but");
}
}
}
ltestBut++;
}
if ((lbut == 1) and (50 < vZBall)) {
if ((vXBall < -3.66) and (vXVector < 0)) {
vXBall = -3.66;
vXVector = -vXVector;
VectorDiv();
}
if ((3.66 < vXBall) and (0 < vXVector)) {
vXBall = 3.66;
vXVector = -vXVector;
vectorDiv();
}
if ((vYBall < (_YFloor - 2.44)) and (vYVector < 0)) {
vYBall = _YFloor - 2.44;
vYVector = -vYVector;
vectorDiv();
}
if ((52 < vZBall) and (0 < vZVector)) {
vZBall = 52;
vZVector = -vZVector;
vectorDiv();
}
}
if ((lbut != 1) and (50 < vZBall)) {
if ((60 < vZBall) and (0 < vZVector)) {
vZBall = 60;
vZVector = -vZVector;
vectorDivGoal();
_parent.mcsounds.gotoAndPlay("hitwall");
}
}
v2DPoint = WorldToScreen(vXBall, vYBall, vZBall, _Focale, _scale, _xoffset, _yoffset);
_parent.mcball._x = v2DPoint.x;
_parent.mcball._y = v2DPoint.y;
_parent.mcball._xscale = (v2DPoint.z * 2) * ldball;
_parent.mcball._yscale = (v2DPoint.z * 2) * ldball;
v2DPoint = WorldToScreen(vXBall, _Yfloor + 0.05, vZBall, _Focale, _scale, _xoffset, _yoffset);
_parent.mcShadow._x = v2DPoint.x;
_parent.mcShadow._y = v2DPoint.y;
_parent.mcShadow._xscale = (v2DPoint.z * 4) * ldball;
_parent.mcShadow._yscale = (v2DPoint.z * 2) * ldball;
prevFrame();
Symbol 136 MovieClip Frame 44
stop();
Symbol 136 MovieClip Frame 51
play();
Symbol 136 MovieClip Frame 52
vxplayer = vxplayer + vx2;
vzplayer = vzplayer + vz2;
v2DPoint = WorldToScreen(vxplayer, vyplayer, vzplayer, _Focale, _scale, _xoffset, _yoffset);
_parent.mcPlayer._x = v2DPoint.x;
_parent.mcPlayer._y = v2DPoint.y;
_parent.mcPlayer._xscale = (v2DPoint.z * 2) * lplayerHeight;
_parent.mcPlayer._yscale = (v2DPoint.z * 2) * lplayerHeight;
vnbframes--;
if (0 >= vnbframes) {
_parent.mcsounds.gotoAndPlay("shoot");
_parent.mcplayer.mcanim.gotoAndStop("shoot");
gotoAndStop (60);
} else {
prevFrame();
}
Symbol 136 MovieClip Frame 59
play();
Symbol 136 MovieClip Frame 60
lWindDiv = vyball - 17.9;
if (lWindDiv < 0) {
lWindDiv = 0;
} else if (2 < lWindDiv) {
lWindDiv = 2;
}
lWindDiv = (2 - lWindDiv) / 2;
vXWind2 = vXWind * lWindDiv;
vZWind2 = vZWind * lWindDiv;
if (lbut != 1) {
vXVector = vXVector + vXWind2;
vZVector = vZVector + vZWind2;
}
vXBall = vXBall + (vXVector - vXVectorEffect);
vYBall = vYBall + vYVector;
vZBall = vZBall + vZVector;
vXVectorEffect = vXVectorEffect / vDivEffect;
if (vYBall < _YFloor) {
vYVector = vYVector + vGravity;
}
if (_YFloor < vYball) {
vYVector = -vYVector;
vYball = _Yfloor;
vXVector = vXVector / vDiv;
vYVector = vYVector / vDiv;
vZVector = vZVector / vDiv;
_parent.mcsounds.gotoAndPlay("hitfloor");
}
lLenght = ((vXVector * vXVector) + (vYVector * vYVector)) + (vZVector * vZVector);
if ((lLenght < 0.001) and ((_YFloor - 0.001) < vYBall)) {
gotoAndStop (67);
}
if (((50 - (ldball + (ldpot / 2))) < vZBall) and (vZBall < (50 + (ldball + (ldpot / 2))))) {
collisions();
}
if ((50 < vZBall) and (ltest != 1)) {
ltest = 1;
if (((lcol1 != 3) and (lcol2 != 3)) and (lcol3 != 3)) {
lxb = vxball;
lyb = vyball;
lzb = vzball;
vXBall = vXBall - ((vXVector - vXVectorEffect) / 2);
vYBall = vYBall - (vYVector / 2);
vZBall = vZBall - (vZVector / 2);
collisions();
if (((lcol1 != 3) and (lcol2 != 3)) and (lcol3 != 3)) {
vXBall = lxb;
vYBall = lyb;
vZBall = lzb;
}
}
}
var i = 1;
while (vNBWall >= i) {
name = eval ("_parent.mcWall" + i);
if (((vZBall < ((vzWall[i] + ldwall) + ldball)) and ((vzWall[i] - (ldwall + ldball)) < vZBall)) and (vTestWall[i] != 1)) {
lxb = vXBall;
lzb = vZBall;
lDistTrans = Math.sqrt(((vxWall[i] - lxb) * (vxWall[i] - lxb)) + ((vzWall[i] - lzb) * (vzWall[i] - lzb)));
if ((((ldball / 2) + (ldwall / 2)) >= lDistTrans) and ((_YFloor - lplayerHeight) < vYball)) {
name.gotoAndStop("stop");
vxslope = lxb - vxWall[i];
vzslope = lzb - vzWall[i];
vXBall = vxWall[i] + ((vxslope / lDistTrans) * ((ldball / 2) + (ldwall / 2)));
vZBall = vzWall[i] + ((vzslope / lDistTrans) * ((ldball / 2) + (ldwall / 2)));
lLenght = Math.sqrt((vxslope * vxslope) + (vzslope * vzslope));
vxslope = vxslope / lLenght;
vzslope = vzslope / lLenght;
lambda = (vXVector * vxslope) + (vZVector * vzslope);
vXVector = ((2 * lambda) * vxslope) - vXVector;
vZVector = ((2 * lambda) * vzslope) - vZVector;
vXVector = vXVector / vDiv;
vZVector = vZVector / vDiv;
vTestWall[i] = 1;
_parent.mcsounds.gotoAndPlay("hitwall");
}
}
i++;
}
if (30 < vZBall) {
lz1 = vzgoal - vZBallStart;
lz2 = vzgoal - vZBall;
lx2 = (lz2 * vXBallStart) / lz1;
lxball2 = vXBall - lx2;
lyball2 = vYBall;
lzball2 = vzgoal;
}
if (((40 + int((vmaxframes - vnbframes2) / 1.5)) < vZBall) and (vTestgoal != 1)) {
if (lxball2 < (vxgoal - 1.22)) {
if (lyball2 < (_yfloor - 1.5)) {
_parent.mcgoal.gotoAndStop("jumpleft");
} else {
_parent.mcgoal.gotoAndStop("diveleft");
}
lGoalSide = 1;
} else if ((vxgoal + 1.22) < lxball2) {
if (lyball2 < (_yfloor - 1.5)) {
_parent.mcgoal.gotoAndStop("jumpright");
} else {
_parent.mcgoal.gotoAndStop("diveright");
}
lGoalSide = 2;
} else {
if (lyball2 < (_yfloor - 1.5)) {
_parent.mcgoal.gotoAndStop("jump");
} else {
_parent.mcgoal.gotoAndStop("front");
}
lGoalSide = 3;
}
vTestGoal = 1;
}
if ((((vTestgoal2 == 50) and (lGoalSide != 2)) and (lGoalSide != 1)) or ((((lGoalSide != 3) and (lGoalSide != 2)) and (lGoalSide != 1)) and (50 < vzball))) {
_parent.mcgoal.gotoAndStop("front");
}
if ((((35 < vZBall) and (50 >= vZBall)) and (vTestgoal2 < 60)) or ((50 < vZBall) and (vTestgoal2 < 20))) {
if (vTestgoal2 < 1) {
_parent.mcgoal.gotoAndStop("walk");
}
if ((vxgoal < lxball2) and (lGoalSide != 1)) {
if ((lxball2 - vxgoal) < 0.1) {
vxgoal = vxgoal + (lxball2 - vxgoal);
} else {
vxgoal = vxgoal + 0.1;
}
} else if ((lxball2 < vxgoal) and (lGoalSide != 2)) {
if ((vxgoal - lxball2) < 0.1) {
vxgoal = vxgoal - (vxgoal - lxball2);
} else {
vxgoal = vxgoal - 0.1;
}
}
v2DPoint = WorldToScreen(vxgoal, vygoal, vzgoal, _Focale, _scale, _xoffset, _yoffset);
_parent.mcgoal._x = v2DPoint.x;
_parent.mcgoal._y = v2DPoint.y;
vTestgoal2++;
}
if ((((vzgoal - (ldball * 2)) < vZBall) and (vZBall < (vzgoal + (ldball * 2)))) and (vTestgoal3 == 0)) {
v2DPoint = WorldToScreen(lxball2, lyball2, lzball2, _Focale, _scale, _xoffset, _yoffset);
lHitTest = _parent.mcgoal.mccollision.hitTest(v2DPoint.x, v2DPoint.y, true);
if (lHitTest) {
vZVector = -vZVector;
vectorDivGoal();
vTestgoal3 = 1;
_parent.mcsounds.gotoAndPlay("hitgoal");
}
}
if (((50 + (ldball / 2)) < vZBall) and (ltestBut < 2)) {
if (lbut != 1) {
if (((-3.66 + ((ldball / 2) + (ldpot / 2))) < vXBall) and (vXBall < (3.66 - ((ldball / 2) + (ldpot / 2))))) {
if (((_YFloor - 2.44) + ((ldball / 2) + (ldpot / 2))) < vYBall) {
lbut = 1;
_parent.mcbut.gotoAndStop("but");
if (_parent._niveau == _parent._NBNiveaux) {
_parent._NBEssais++;
_parent._score = _parent._score + (_parent._bonus + (_parent._NBEssais * _parent._bonus2));
_parent.mcInterface.gotoAndStop("youWin");
} else {
_parent._NBEssais++;
_parent._niveau++;
_parent._score = _parent._score + _parent._bonus;
_parent.mcInterface.gotoAndStop("nextLevel");
}
_parent.mcsounds.gotoAndPlay("but");
}
}
}
if (lbut != 1) {
if ((-3.66 < (vXBall - ((vXVector - vXVectorEffect) / 2))) and ((vXBall - ((vXVector - vXVectorEffect) / 2)) < 3.66)) {
if ((_YFloor - 2.44) < (vYBall - (vYVector / 2))) {
vXBall = vXBall - ((vXVector - vXVectorEffect) / 2);
vYBall = vYBall - (vYVector / 2);
vZBall = vZBall - (vZVector / 2);
lbut = 1;
if (_parent._niveau == _parent._NBNiveaux) {
_parent._NBEssais++;
_parent._score = _parent._score + (_parent._bonus + (_parent._NBEssais * _parent._bonus2));
_parent.mcInterface.gotoAndStop("youWin");
} else {
_parent._NBEssais++;
_parent._score = _parent._score + _parent._bonus;
_parent._niveau++;
_parent.mcInterface.gotoAndStop("nextLevel");
}
_parent.mcbut.gotoAndStop("but");
_parent.mcsounds.gotoAndPlay("but");
}
}
}
ltestBut++;
}
if ((lbut == 1) and (50 < vZBall)) {
if ((vXBall < -3.66) and (vXVector < 0)) {
vXBall = -3.66;
vXVector = -vXVector;
VectorDiv();
}
if ((3.66 < vXBall) and (0 < vXVector)) {
vXBall = 3.66;
vXVector = -vXVector;
vectorDiv();
}
if ((vYBall < (_YFloor - 2.44)) and (vYVector < 0)) {
vYBall = _YFloor - 2.44;
vYVector = -vYVector;
vectorDiv();
}
if ((52 < vZBall) and (0 < vZVector)) {
vZBall = 52;
vZVector = -vZVector;
vectorDiv();
}
}
if ((lbut != 1) and (50 < vZBall)) {
if ((60 < vZBall) and (0 < vZVector)) {
vZBall = 60;
vZVector = -vZVector;
vectorDivGoal();
_parent.mcsounds.gotoAndPlay("hitwall");
}
}
v2DPoint = WorldToScreen(vXBall, vYBall, vZBall, _Focale, _scale, _xoffset, _yoffset);
_parent.mcball._x = v2DPoint.x;
_parent.mcball._y = v2DPoint.y;
_parent.mcball._xscale = (v2DPoint.z * 2) * ldball;
_parent.mcball._yscale = (v2DPoint.z * 2) * ldball;
v2DPoint = WorldToScreen(vXBall, _Yfloor + 0.05, vZBall, _Focale, _scale, _xoffset, _yoffset);
_parent.mcShadow._x = v2DPoint.x;
_parent.mcShadow._y = v2DPoint.y;
_parent.mcShadow._xscale = (v2DPoint.z * 4) * ldball;
_parent.mcShadow._yscale = (v2DPoint.z * 2) * ldball;
prevFrame();
Symbol 136 MovieClip Frame 67
if (_parent._NBEssais == 0) {
_parent.mcInterface.gotoAndStop("gameOver");
}
stop();
Symbol 136 MovieClip Frame 73
function collisions() {
lDistTrans = Math.sqrt((((_Yfloor - 2.44) - vYBall) * ((_Yfloor - 2.44) - vYBall)) + ((50 - vZBall) * (50 - vZBall)));
if (((((ldball / 2) + (ldpot / 2)) >= lDistTrans) and ((-3.66 - ((ldball / 2) + (ldpot / 2))) < vXball)) and (vXball < (3.66 + ((ldball / 2) + (ldpot / 2))))) {
if (lcol1 != 1) {
lypot = _YFloor - 2.44;
lzpot = 50;
vyslope = vYBall - lypot;
vzslope = vZBall - lzpot;
vYBall = lypot + ((vyslope / lDistTrans) * ((ldball / 2) + (ldpot / 2)));
vZBall = lzpot + ((vzslope / lDistTrans) * ((ldball / 2) + (ldpot / 2)));
lLenght = Math.sqrt((vyslope * vyslope) + (vzslope * vzslope));
vyslope = vyslope / lLenght;
vzslope = vzslope / lLenght;
lambda = (vYVector * vyslope) + (vZVector * vzslope);
vYVector = ((2 * lambda) * vyslope) - vYVector;
vZVector = ((2 * lambda) * vzslope) - vZVector;
vYVector = vYVector / vDiv;
vZVector = vZVector / vDiv;
lcol1 = 4;
_parent.mcsounds.gotoAndPlay("hitbut");
}
}
if (0 < lcol1) {
lcol1--;
}
lDistTrans = Math.sqrt(((-3.66 - vXBall) * (-3.66 - vXBall)) + ((50 - vZBall) * (50 - vZBall)));
if ((((ldball / 2) + (ldpot / 2)) >= lDistTrans) and ((_YFloor - (2.44 + ((ldball / 2) + (ldpot / 2)))) < vYball)) {
if (lcol2 != 1) {
lxpot = -3.66;
lzpot = 50;
vxslope = vXBall - lxpot;
vzslope = vZBall - lzpot;
vXBall = lxpot + ((vxslope / lDistTrans) * ((ldball / 2) + (ldpot / 2)));
vZBall = lzpot + ((vzslope / lDistTrans) * ((ldball / 2) + (ldpot / 2)));
lLenght = Math.sqrt((vxslope * vxslope) + (vzslope * vzslope));
vxslope = vxslope / lLenght;
vzslope = vzslope / lLenght;
lambda = (vXVector * vxslope) + (vZVector * vzslope);
vXVector = ((2 * lambda) * vxslope) - vXVector;
vZVector = ((2 * lambda) * vzslope) - vZVector;
vXVector = vXVector / vDiv;
vZVector = vZVector / vDiv;
lcol2 = 4;
_parent.mcsounds.gotoAndPlay("hitbut");
}
}
if (0 < lcol2) {
lcol2--;
}
lDistTrans = Math.sqrt(((3.66 - vXBall) * (3.66 - vXBall)) + ((50 - vZBall) * (50 - vZBall)));
if ((((ldball / 2) + (ldpot / 2)) >= lDistTrans) and ((_YFloor - (2.44 + ((ldball / 2) + (ldpot / 2)))) < vYball)) {
if (lcol3 != 1) {
lxpot = 3.66;
lzpot = 50;
vxslope = vXBall - lxpot;
vzslope = vZBall - lzpot;
vXBall = lxpot + ((vxslope / lDistTrans) * ((ldball / 2) + (ldpot / 2)));
vZBall = lzpot + ((vzslope / lDistTrans) * ((ldball / 2) + (ldpot / 2)));
lLenght = Math.sqrt((vxslope * vxslope) + (vzslope * vzslope));
vxslope = vxslope / lLenght;
vzslope = vzslope / lLenght;
lambda = (vXVector * vxslope) + (vZVector * vzslope);
vXVector = ((2 * lambda) * vxslope) - vXVector;
vZVector = ((2 * lambda) * vzslope) - vZVector;
vXVector = vXVector / vDiv;
vZVector = vZVector / vDiv;
lcol3 = 4;
_parent.mcsounds.gotoAndPlay("hitbut");
}
}
if (0 < lcol3) {
lcol3--;
}
}
Symbol 136 MovieClip Frame 81
function screenToWorld(px, py, pycamera, pfocale, pscale, pxoffset, pyoffset) {
var lpoint = new Object();
lpoint.scale = (py - pyoffset) / pycamera;
lpoint.x = (px - pxoffset) / lpoint.scale;
lpoint.y = pycamera;
lpoint.z = ((pscale * pfocale) / lpoint.scale) - pfocale;
return(lpoint);
}
function worldToScreen(px, py, pz, pfocale, pscale, pxoffset, pyoffset) {
var lpoint = new Object();
var lScale = ((pscale * pfocale) / (pfocale + pz));
lpoint.x = (lScale * px) + pxoffset;
lpoint.y = (lScale * py) + pyoffset;
lpoint.z = Math.abs(lScale) / 2;
return(lpoint);
}
function vectorDiv() {
vXVector = vXVector / vDivBut;
vYVector = vYVector / vDivBut;
vZVector = vZVector / vDivBut;
}
function vectorDivGoal() {
vXVector = vXVector / vDivGoal;
vYVector = vYVector / vDivGoal;
vZVector = vZVector / vDivGoal;
}
Symbol 136 MovieClip Frame 89
v3DPoint = screenToWorld(_parent.mcgoal._x, _parent.mcgoal._y, _Yfloor, _Focale, _scale, _xoffset, _yoffset);
v3DPoint2 = v3DPoint;
vxgoal = v3DPoint.x;
vygoal = v3DPoint.y;
vzgoal = v3DPoint.z;
vrgoal = v3DPoint.scale;
vtestgoal = 0;
v2DPoint = WorldToScreen(vxgoal, vygoal, vzgoal, _Focale, _scale, _xoffset, _yoffset);
_parent.mcgoal.gotoAndStop("stand-up");
_parent.mcgoal._x = v2DPoint.x;
_parent.mcgoal._y = v2DPoint.y;
_parent.mcgoal._xscale = (v2DPoint.z * 2) * lplayerHeight;
_parent.mcgoal._yscale = (v2DPoint.z * 2) * lplayerHeight;
Symbol 136 MovieClip Frame 97
vNBWall = 0;
var i = 1;
while (20 >= i) {
name = eval ("_parent.mcWall" + i);
if (name.live == true) {
vNBWall++;
}
i++;
}
vxWall = new Array();
vyWall = new Array();
vzWall = new Array();
vrWall = new Array();
vTestWall = new Array();
var i = 1;
while (vNBWall >= i) {
name = eval ("_parent.mcWall" + i);
v3DPoint = screenToWorld(name._x, name._y, _Yfloor, _Focale, _scale, _xoffset, _yoffset);
vxWall[i] = v3DPoint.x;
vyWall[i] = v3DPoint.y;
vzWall[i] = v3DPoint.z;
vrWall[i] = v3DPoint.scale;
vTestWall[i] = 0;
name._xscale = vrWall[i] * lplayerHeight;
name._yscale = vrWall[i] * lplayerHeight;
i++;
}
Symbol 136 MovieClip Frame 103
lWindRotation = (_parent._windAngle / 180) * Math.PI;
lWindForce = _parent._windMax / 1000;
vXWind = -(lWindForce * Math.sin(-lWindRotation));
vZWind = lWindForce * Math.cos(-lWindRotation);
_parent.mcWind.mcArrow._rotation = (lWindRotation * 180) / Math.PI;
_parent.mcWind.mcArrow.gotoAndStop(int(((lWindForce * 1000) * _parent.mcWind.mcArrow._totalframes) / 9));
Symbol 141 MovieClip Frame 1
stop();
this._visible = false;
Symbol 141 MovieClip Frame 5
gotoAndStop (1);
Symbol 141 MovieClip Frame 11
gotoAndStop (1);
Symbol 141 MovieClip Frame 19
gotoAndStop (1);
Symbol 141 MovieClip Frame 26
gotoAndStop (1);
Symbol 141 MovieClip Frame 33
gotoAndStop (1);
Symbol 141 MovieClip Frame 40
gotoAndStop (1);
Symbol 141 MovieClip Frame 48
gotoAndStop (1);