Frame 1
var xml = new XML("<RESSOURCES><PANZOOMROTATE URL=\"\" TX=\"0.650000000000001\" TY=\"-28.5\" ZOOM=\"30.8811881188119\" ROTATION=\"7.12871287128712\" /><DETOURAGE_TP><POINT X=\"31.5\" Y=\"0\" /><POINT X=\"34.8\" Y=\"-46.85\" /><POINT X=\"17.5\" Y=\"-77.85\" /><POINT X=\"-20.5\" Y=\"-77.85\" /><POINT X=\"-38.4\" Y=\"-46.85\" /><POINT X=\"-31.5\" Y=\"0\" /><POINT X=\"-1.3\" Y=\"24\" /></DETOURAGE_TP><START_MESSAGE TEXT=\"\" /><END_MESSAGE TEXT=\"\" /></RESSOURCES>");
gameplay.init(400, 300, xml.firstChild);
gameplay.onRelease = function () {
delete gameplay.onRelease;
this.startGame();
this.mc_bt_play._visible = false;
};
gameplay.btReplayEndPanel.onRelease = function () {
this._parent.init(400, 300, xml.firstChild);
this._parent.restartGame();
this._visible = false;
};
Symbol 20 MovieClip [PanZoomRotate] Frame 1
#initclip 20
Object.registerClass("PanZoomRotate", tools.panzoomrotate.PanZoomRotate);
#endinitclip
Symbol 25 MovieClip [ball] Frame 1
stop();
Symbol 25 MovieClip [ball] Frame 70
this._parent.onEndCursorAnimation();
Symbol 36 MovieClip [tete] Frame 1
#initclip 18
Object.registerClass("tete", tools.detourage.DetourageTP);
#endinitclip
stop();
Symbol 36 MovieClip [tete] Frame 19
gotoAndPlay ("perd");
Symbol 36 MovieClip [tete] Frame 29
gotoAndPlay ("gagne");
Symbol 36 MovieClip [tete] Frame 35
gotoAndPlay ("stamina");
Symbol 36 MovieClip [tete] Frame 102
this.gotoAndStop("static");
Symbol 36 MovieClip [tete] Frame 178
stop();
Symbol 43 MovieClip [foule] Frame 100
gotoAndPlay ("calme");
Symbol 43 MovieClip [foule] Frame 138
gotoAndPlay ("xcite");
Symbol 43 MovieClip [foule] Frame 165
gotoAndPlay ("perd");
Symbol 65 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 16
gotoAndPlay (2);
Symbol 89 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 15
gotoAndPlay ("stam");
Symbol 93 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 13
gotoAndPlay ("tilt");
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 6
this.tete.gotoAndPlay("win");
Symbol 96 MovieClip Frame 60
this._parent.onOpponentAnimationEnd();
this.gotoAndStop(1);
Symbol 96 MovieClip Frame 61
this.tete.gotoAndPlay("win");
Symbol 96 MovieClip Frame 115
this._parent.onOpponentAnimationEnd();
this.gotoAndStop(2);
Symbol 96 MovieClip Frame 116
this.tete.gotoAndPlay("win");
Symbol 96 MovieClip Frame 172
this._parent.onOpponentAnimationEnd();
this.gotoAndStop(3);
Symbol 96 MovieClip Frame 173
this.tete.gotoAndPlay("win");
Symbol 96 MovieClip Frame 227
this._parent.onOpponentAnimationEnd();
this.gotoAndStop(4);
Symbol 96 MovieClip Frame 228
this.tete.gotoAndPlay("win");
Symbol 96 MovieClip Frame 285
this._parent.onOpponentAnimationEnd();
this.gotoAndStop(5);
Symbol 96 MovieClip Frame 286
this.tete.gotoAndPlay("lose");
Symbol 96 MovieClip Frame 340
this._parent.onOpponentAnimationEnd();
this.gotoAndStop(1);
Symbol 96 MovieClip Frame 341
this.tete.gotoAndPlay("lose");
Symbol 96 MovieClip Frame 395
this._parent.onOpponentAnimationEnd();
this.gotoAndStop(2);
Symbol 96 MovieClip Frame 396
this.tete.gotoAndPlay("lose");
Symbol 96 MovieClip Frame 452
this._parent.onOpponentAnimationEnd();
this.gotoAndStop(3);
Symbol 96 MovieClip Frame 453
this.tete.gotoAndPlay("lose");
Symbol 96 MovieClip Frame 507
this._parent.onOpponentAnimationEnd();
this.gotoAndStop(4);
Symbol 96 MovieClip Frame 508
this.tete.gotoAndPlay("lose");
Symbol 96 MovieClip Frame 565
this._parent.onOpponentAnimationEnd();
this.gotoAndStop(5);
Symbol 101 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 2
stop();
Symbol 111 MovieClip Frame 3
stop();
Symbol 111 MovieClip Frame 4
stop();
Symbol 111 MovieClip Frame 5
stop();
Symbol 117 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 2
stop();
Symbol 117 MovieClip Frame 3
stop();
Symbol 117 MovieClip Frame 4
stop();
Symbol 117 MovieClip Frame 5
stop();
Symbol 128 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 17
this.gotoAndPlay(3);
Symbol 131 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
Symbol 148 MovieClip Frame 11
gotoAndPlay (2);
Symbol 159 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 37
barre_rebond._xscale = (100 * (_parent.rebond - 0.03)) / -0.022;
barre_force._xscale = (100 * (_parent.forceEnnemi - 10)) / 6;
barre_friction._xscale = (100 * (_parent.friction - 0.4)) / 1.6;
barre_delay._xscale = (100 * (_parent.delayPichenette - 2000)) / -1400;
barre_glissement._xscale = (100 * (_parent.maxGlissement - 1.5)) / 2.5;
this.pt.gotoAndStop("pt" + this._parent.gameLevel);
Symbol 179 MovieClip Frame 122
_parent.rebours();
Symbol 196 MovieClip Frame 1
btBegin.onRelease = function () {
trace(this._parent.pouet);
trace(this._parent.pouet.text);
};
Symbol 218 MovieClip Frame 1
stop();
Symbol 218 MovieClip Frame 75
this._parent.ting.start();
this._parent.indic.gotoAndPlay("clignote");
Symbol 218 MovieClip Frame 104
this._parent.ting.start();
Symbol 218 MovieClip Frame 134
this._parent.ting.start();
Symbol 218 MovieClip Frame 164
this._parent.go.start();
Symbol 218 MovieClip Frame 193
_parent.initGame();
Symbol 242 MovieClip Frame 1
stop();
Symbol 242 MovieClip Frame 21
btContinue.onRelease = function () {
if (_parent.roundWin == 2) {
_parent.levelUp();
} else {
_parent.initMatch();
_parent.rebours();
}
};
stop();
Symbol 271 MovieClip Frame 1
stop();
this.btRetry0.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(0);
};
this.btRetry1.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(1);
};
this.btRetry2.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(2);
};
this.btRetry3.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(3);
};
this.btRetry4.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(4);
};
Symbol 271 MovieClip Frame 2
this.btRetry0.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(0);
};
this.btRetry1.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(1);
};
this.btRetry2.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(2);
};
this.btRetry3.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(3);
};
this.btRetry4.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(4);
};
Symbol 271 MovieClip Frame 3
this.btRetry0.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(0);
};
this.btRetry1.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(1);
};
this.btRetry2.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(2);
};
this.btRetry3.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(3);
};
this.btRetry4.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(4);
};
Symbol 271 MovieClip Frame 4
this.btRetry0.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(0);
};
this.btRetry1.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(1);
};
this.btRetry2.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(2);
};
this.btRetry3.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(3);
};
this.btRetry4.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(4);
};
Symbol 271 MovieClip Frame 5
this.btRetry0.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(0);
};
this.btRetry1.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(1);
};
this.btRetry2.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(2);
};
this.btRetry3.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(3);
};
this.btRetry4.onRelease = function () {
this._parent._parent._parent.onChooseOpponent(4);
};
Symbol 303 Button
on (release) {
this._parent._parent.crowdSound.stop("crowdSound");
this._parent._parent.tutoViewed = true;
this._parent._parent.skipTuto();
}
Symbol 307 Button
on (release) {
this._parent.crowdSound.stop("crowdSound");
this._parent.tutoViewed = true;
this._parent.skipTuto();
}
Symbol 328 MovieClip Frame 1
stop();
Symbol 335 MovieClip Frame 1
stop();
Symbol 335 MovieClip Frame 30
gotoAndPlay ("clik");
Symbol 335 MovieClip Frame 31
stop();
Symbol 337 MovieClip Frame 1
stop();
Symbol 340 MovieClip Frame 1
stop();
Symbol 353 Button
on (release) {
if (this._parent.chooseDifficulty) {
play();
} else {
this._parent._parent.chooseDifficulty = true;
this._parent.gotoAndPlay("instruction");
}
}
Symbol 357 Button
on (release) {
this.gotoAndPlay("tutoStart");
}
Symbol 359 Button
on (release) {
this._parent.crowdSound.stop("crowdSound");
this._parent.tutoViewed = true;
this._parent.skipTuto();
}
Symbol 360 Button
on (release) {
this._parent.crowdSound.stop("crowdSound");
this.gotoAndPlay("tutoStart");
}
Symbol 361 MovieClip Frame 1
this.tonBras.main.gotoAndStop(3);
this.brasMechant.gotoAndStop(3);
this._parent.crowdSound.start();
this._parent.crowdSound.onSoundComplete = function () {
this.start();
};
Symbol 361 MovieClip Frame 78
this._parent.ting.start();
Symbol 361 MovieClip Frame 103
this._parent.ting.start();
Symbol 361 MovieClip Frame 129
this._parent.ting.start();
Symbol 361 MovieClip Frame 377
this.sourie.fleche.gotoAndStop("visibleG");
Symbol 361 MovieClip Frame 415
this.sourie.fleche.gotoAndStop("visibleD");
Symbol 361 MovieClip Frame 431
this.sourie.fleche.gotoAndStop("visibleD");
Symbol 361 MovieClip Frame 466
this.sourie.fleche.gotoAndStop("visibleG");
Symbol 361 MovieClip Frame 528
this.sourie.fleche.gotoAndStop("visibleD");
Symbol 361 MovieClip Frame 541
this.sourie.fleche.gotoAndStop("invisible");
Symbol 361 MovieClip Frame 853
this._parent.soundStaminaPossible.start();
Symbol 361 MovieClip Frame 1015
this.sourie.gotoAndPlay("clik");
this.miniSourie.gotoAndPlay("clik");
Symbol 361 MovieClip Frame 1083
this._parent.enervementSound.start();
this.sourie.gotoAndStop("cliker");
this.miniSourie.gotoAndStop("cliker");
trace(this.tonBras);
this.tonBras.gotoAndPlay("vnr");
Symbol 361 MovieClip Frame 1160
this.tonBras.gotoAndStop("nrml");
Symbol 361 MovieClip Frame 1169
stop();
Symbol 362 MovieClip [OverPicToTopGamePlay] Frame 1
#initclip 19
Object.registerClass("OverPicToTopGamePlay", OverPicToTopGamePlay);
#endinitclip
stop();
Symbol 362 MovieClip [OverPicToTopGamePlay] Frame 2
tutoTest = true;
stop();
Symbol 363 MovieClip [__Packages.tools.detourage.DetourageTP] Frame 0
class tools.detourage.DetourageTP extends MovieClip
{
var mcTop, top, mcBottom, bottom, mcTopContainer, mcTopMask, mcTopPZR, mcBottomContainer, mcBottomMask, mcBottomPZR, anchors, dispatchEvent;
function DetourageTP () {
super();
mx.events.EventDispatcher.initialize(this);
mcTop = top;
mcBottom = bottom;
mcTopContainer = mcTop.createEmptyMovieClip("container", 0);
mcTopMask = mcTopContainer.createEmptyMovieClip("mask", 0);
mcTopPZR = mcTopContainer.attachMovie("PanZoomRotate", "pzr", 1);
mcTopPZR.setMask(mcTopMask);
mcBottomContainer = mcBottom.createEmptyMovieClip("container", 0);
mcBottomMask = mcBottomContainer.createEmptyMovieClip("mask", 0);
mcBottomPZR = mcBottomContainer.attachMovie("PanZoomRotate", "pzr", 1);
mcBottomPZR.setMask(mcBottomMask);
}
function parseXML(pzrNode, detourageNode) {
anchors = new Array();
if (detourageNode.attributes.MIRROR == "TRUE") {
mcTopContainer._xscale = -100;
mcBottomContainer._xscale = -100;
} else {
mcTopContainer._xscale = 100;
mcBottomContainer._xscale = 100;
}
var _local3 = mx.xpath.XPathAPI.selectNodeList(detourageNode, "/DETOURAGE_TP/POINT");
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = {_x:parseInt(_local3[_local2].attributes.X), _y:parseInt(_local3[_local2].attributes.Y)};
anchors.push(_local4);
_local2++;
}
numImageLoad = 0;
mcTopPZR.addEventListener("imageLoad", mx.utils.Delegate.create(this, onImageLoad));
mcTopPZR.init(pzrNode);
mcBottomPZR.addEventListener("imageLoad", mx.utils.Delegate.create(this, onImageLoad));
mcBottomPZR.init(pzrNode);
drawMask();
}
function computeControlPoints(refPoint, tanAngle, distancePrev, distanceNext) {
var _local2 = distancePrev * Math.cos(tanAngle);
var _local1 = (-distancePrev) * Math.sin(tanAngle);
var _local5 = new flash.geom.Point(refPoint.x - _local2, refPoint.y - _local1);
_local2 = distanceNext * Math.cos(tanAngle);
_local1 = (-distanceNext) * Math.sin(tanAngle);
var _local6 = new flash.geom.Point(refPoint.x + _local2, refPoint.y + _local1);
return({previous:_local5, next:_local6});
}
function getControlPointsFromAnchor(anchorNum) {
var _local8 = new flash.geom.Point(anchors[anchorNum]._x, anchors[anchorNum]._y);
var _local3 = ((anchorNum == 0) ? (anchors.length - 1) : (anchorNum - 1));
var _local4 = ((anchorNum == (anchors.length - 1)) ? 0 : (anchorNum + 1));
var _local6 = Math.atan2(anchors[_local3]._y - anchors[_local4]._y, anchors[_local4]._x - anchors[_local3]._x);
var _local9 = Math.sqrt(((anchors[anchorNum]._x - anchors[_local3]._x) * (anchors[anchorNum]._x - anchors[_local3]._x)) + ((anchors[anchorNum]._y - anchors[_local3]._y) * (anchors[anchorNum]._y - anchors[_local3]._y)));
var _local7 = Math.sqrt(((anchors[anchorNum]._x - anchors[_local4]._x) * (anchors[anchorNum]._x - anchors[_local4]._x)) + ((anchors[anchorNum]._y - anchors[_local4]._y) * (anchors[anchorNum]._y - anchors[_local4]._y)));
var _local5 = computeControlPoints(_local8, _local6, _local9 / 3, _local7 / 3);
_local5.x = anchors[anchorNum]._x;
_local5.y = anchors[anchorNum]._y;
return(_local5);
}
function drawMask() {
var _local3 = new Array();
var _local2 = 0;
while (_local2 <= MIDDLE_POINT) {
_local3.push(getControlPointsFromAnchor(_local2));
_local2++;
}
mcTopMask.clear();
mcTopMask.moveTo(anchors[0]._x, anchors[0]._y);
mcTopMask.beginFill(16711680);
tools.math.MathUtils.drawBezierCurve(mcTopMask, _local3, false);
mcTopMask.lineTo(anchors[0]._x, anchors[0]._y);
mcTopMask.endFill();
_local3 = new Array();
_local2 = MIDDLE_POINT;
while (_local2 < anchors.length) {
_local3.push(getControlPointsFromAnchor(_local2));
_local2++;
}
_local3.push(getControlPointsFromAnchor(0));
mcBottomMask.clear();
mcBottomMask.moveTo(anchors[MIDDLE_POINT]._x, anchors[MIDDLE_POINT]._y);
mcBottomMask.beginFill(16711680);
tools.math.MathUtils.drawBezierCurve(mcBottomMask, _local3, false);
mcBottomMask.lineTo(anchors[MIDDLE_POINT]._x, anchors[MIDDLE_POINT]._y);
mcBottomMask.endFill();
}
function onImageLoad() {
if ((++numImageLoad) == 2) {
dispatchImageLoad();
}
}
function dispatchImageLoad() {
dispatchEvent({type:"imageLoad", target:this});
}
var MIDDLE_POINT = 5;
var DEPTH_TOP = 0;
var DEPTH_BOTTOM = 1;
var numImageLoad = 0;
}
Symbol 364 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 365 MovieClip [__Packages.mx.xpath.XPathAPI] Frame 0
class mx.xpath.XPathAPI
{
function XPathAPI () {
}
static function getEvalString(node, path) {
var _local7 = "";
var _local4 = null;
var _local9 = getPathSet(path);
var _local3 = _local9[0].nodeName;
var _local8;
var _local2 = node;
var _local5 = false;
if ((_local3 != undefined) && ((_local3 == "*") || (node.nodeName == _local3))) {
var _local6 = 1;
while (_local6 < _local9.length) {
_local3 = _local9[_local6].nodeName;
_local8 = _local3.indexOf("@");
if (_local8 >= 0) {
_local3 = _local3.substring(_local8 + 1);
_local5 = _local2.attributes[_local3] != undefined;
_local7 = _local7 + (".attributes." + _local3);
} else {
_local5 = false;
var _local1 = 0;
while (_local1 < _local2.childNodes.length) {
_local4 = _local2.childNodes[_local1];
if (_local4.nodeName == _local3) {
_local7 = _local7 + (".childNodes." + _local1);
_local1 = _local2.childNodes.length;
_local2 = _local4;
_local5 = true;
}
_local1++;
}
}
if (!_local5) {
return("");
}
_local6++;
}
if (!_local5) {
_local7 = "";
} else if (_local8 == -1) {
_local7 = _local7 + ".firstChild.nodeValue";
}
} else {
_local7 = "";
}
return(_local7);
}
static function selectNodeList(node, path) {
var _local2 = new Array(node);
var _local5 = getPathSet(path);
var _local4 = _local5[0];
var _local6 = _local4.__get__nodeName();
var _local1 = null;
if ((_local6 != undefined) && ((_local6 == "*") || (node.nodeName == _local6))) {
if (_local4.__get__filter().length > 0) {
_local1 = new mx.xpath.FilterStack(_local4.__get__filter());
_local2 = filterNodes(_local2, _local1);
}
if (_local2.length > 0) {
var _local3 = 1;
while (_local3 < _local5.length) {
_local4 = _local5[_local3];
_local2 = getAllChildNodesByName(_local2, _local4.__get__nodeName());
if (_local4.__get__filter().length > 0) {
_local1 = new mx.xpath.FilterStack(_local4.__get__filter());
} else {
_local1 = null;
}
if ((_local1 != null) && (_local1.__get__exprs().length > 0)) {
_local2 = filterNodes(_local2, _local1);
}
_local3++;
}
}
} else {
_local2 = new Array();
}
return(_local2);
}
static function selectSingleNode(node, path) {
var _local1 = selectNodeList(node, path);
if (_local1.length > 0) {
return(_local1[0]);
}
return(null);
}
static function setNodeValue(node, path, newValue) {
var _local1 = new Array(node);
var _local9 = getPathSet(path);
var _local7 = _local9[_local9.length - 1].nodeName;
if (_local7.charAt(0) == "@") {
_local7 = _local7.substring(1, _local7.length);
_local9.pop();
} else {
_local7 = null;
}
var _local5 = _local9[0];
var _local11 = _local5.__get__nodeName();
var _local3 = null;
if ((_local11 != undefined) && ((_local11 == "*") || (node.nodeName == _local11))) {
if (_local5.__get__filter().length > 0) {
_local3 = new mx.xpath.FilterStack(_local5.__get__filter());
_local1 = filterNodes(_local1, _local3);
}
if (_local1.length > 0) {
var _local2 = 1;
while (_local2 < _local9.length) {
_local5 = _local9[_local2];
_local1 = getAllChildNodesByName(_local1, _local5.__get__nodeName());
if (_local5.__get__filter().length > 0) {
_local3 = new mx.xpath.FilterStack(_local5.__get__filter());
} else {
_local3 = null;
}
if ((_local3 != null) && (_local3.__get__exprs().length > 0)) {
_local1 = filterNodes(_local1, _local3);
}
_local2++;
}
}
} else {
_local1 = new Array();
}
var _local4 = null;
var _local6 = null;
var _local10 = new XML();
var _local2 = 0;
while (_local2 < _local1.length) {
if (_local7 != null) {
_local1[_local2].attributes[_local7] = newValue;
} else {
_local4 = _local1[_local2];
if ((_local4.firstChild == null) || (_local4.firstChild.nodeType != 3)) {
_local6 = _local10.createTextNode(newValue);
_local4.appendChild(_local6);
} else {
_local6 = _local4.firstChild;
_local6.nodeValue = newValue;
}
}
_local2++;
}
return(_local1.length);
}
static function copyStack(toStk, fromStk) {
var _local1 = 0;
while (_local1 < fromStk.length) {
toStk.splice(_local1, 0, fromStk[_local1]);
_local1++;
}
}
static function evalExpr(expr, node) {
var _local2 = true;
if (expr.__get__attr()) {
_local2 = ((expr.__get__value() != null) ? (node.attributes[expr.__get__name()] == expr.__get__value()) : (node.attributes[expr.__get__name()] != null));
} else {
var _local3 = getChildNodeByName(node, expr.__get__name());
if (_local3 != null) {
_local2 = ((expr.__get__value() != null) ? (_local3.firstChild.nodeValue == expr.__get__value()) : true);
} else {
_local2 = false;
}
}
return(_local2);
}
static function filterNodes(nodeList, stack) {
var _local13 = new Array();
var _local2;
var _local3;
var _local9;
var _local6;
var _local10;
var _local1 = true;
var _local4;
var _local5;
var _local8 = 0;
while (_local8 < nodeList.length) {
_local5 = true;
_local2 = new Array();
_local3 = new Array();
copyStack(_local2, stack.__get__exprs());
copyStack(_local3, stack.__get__ops());
_local4 = nodeList[_local8];
while ((_local2.length > 0) && (_local5)) {
if (typeof(_local2[_local2.length - 1]) == "object") {
_local9 = mx.xpath.FilterExpr(_local2.pop());
_local1 = evalExpr(_local9, _local4);
} else {
_local10 = Boolean(_local2.pop());
_local1 = _local10;
}
if (_local3.length > 0) {
var _local7 = _local2.pop();
_local6 = _local7;
switch (_local3[_local3.length - 1]) {
case "and" :
_local1 = _local1 && (evalExpr(_local6, _local4));
_local5 = _local1;
break;
case "or" :
_local1 = _local1 || (evalExpr(_local6, _local4));
_local5 = !_local1;
}
_local3.pop();
_local2.push(_local1);
}
}
if (_local1) {
_local13.push(_local4);
}
_local8++;
}
return(_local13);
}
static function getAllChildNodesByName(nodeList, name) {
var _local5 = new Array();
var _local2;
var _local3 = 0;
while (_local3 < nodeList.length) {
_local2 = nodeList[_local3].childNodes;
if (_local2 != null) {
var _local1 = 0;
while (_local1 < _local2.length) {
if ((name == "*") || (_local2[_local1].nodeName == name)) {
_local5.push(_local2[_local1]);
}
_local1++;
}
}
_local3++;
}
return(_local5);
}
static function getChildNodeByName(node, nodeName) {
var _local2;
var _local3 = node.childNodes;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = _local3[_local1];
if (_local2.nodeName == nodeName) {
return(_local2);
}
_local1++;
}
return(null);
}
static function getKeyValues(node, keySpec) {
var _local5 = "";
var _local3 = new mx.utils.StringTokenParser(keySpec);
var _local2 = _local3.nextToken();
var _local1;
var _local6;
while (_local2 != mx.utils.StringTokenParser.tkEOF) {
_local1 = _local3.token;
_local5 = _local5 + (" " + _local1);
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
if (_local1 == "@") {
_local2 = _local3.nextToken();
_local1 = _local3.token;
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
_local5 = _local5 + (((_local1 + "='") + node.attributes[_local1]) + "'");
}
} else if (_local1 == "/") {
_local2 = _local3.nextToken();
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
_local1 = _local3.token;
node = getChildNodeByName(node, _local1);
if (node != null) {
_local5 = _local5 + _local1;
}
}
} else if ((((_local1 != "and") && (_local1 != "or")) && (_local1 != "[")) && (_local1 != "]")) {
_local6 = getChildNodeByName(node, _local1);
if (_local6 != null) {
_local5 = _local5 + (("='" + _local6.firstChild.nodeValue) + "'");
}
}
}
if (node == null) {
trace(("Invalid keySpec specified. '" + keySpec) + "' Error.");
return("ERR");
}
_local2 = _local3.nextToken();
}
return(_local5.slice(1));
}
static function getPath(node, keySpecs) {
var _local2 = "";
var _local5 = keySpecs[node.nodeName];
if (_local5 == undefined) {
var _local8 = "";
var _local10;
for (_local10 in node.attributes) {
_local8 = _local8 + (((("@" + _local10) + "='") + node.attributes[_local10]) + "' and ");
}
var _local7 = "";
var _local1;
var _local6;
var _local4 = 0;
while (_local4 < node.childNodes.length) {
_local1 = node.childNodes[_local4];
_local6 = _local1.firstChild.nodeValue;
if (_local6 != undefined) {
_local7 = _local7 + (((_local1.nodeName + "='") + _local6) + "' and ");
}
_local4++;
}
if (_local8.length > 0) {
if (_local7.length > 0) {
_local2 = (((("/" + node.nodeName) + "[") + _local8) + _local7.substring(0, _local7.length - 4)) + "]";
} else {
_local2 = ((("/" + node.nodeName) + "[") + _local8.substring(0, _local8.length - 4)) + "]";
}
} else {
_local2 = ((("/" + node.nodeName) + "[") + _local7.substring(0, _local7.length - 4)) + "]";
}
} else {
_local2 = _local2 + (("/" + node.nodeName) + getKeyValues(node, _local5));
}
var _local1 = node.parentNode;
while (_local1.parentNode != null) {
_local5 = keySpecs[_local1.nodeName];
if (_local5 != undefined) {
_local2 = (("/" + _local1.nodeName) + getKeyValues(_local1, _local5)) + _local2;
} else {
_local2 = ("/" + _local1.nodeName) + _local2;
}
_local1 = _local1.parentNode;
}
return(_local2);
}
static function getPathSet(path) {
var _local6 = new Array();
var _local4;
var _local1;
var _local2;
var _local5;
while (path.length > 0) {
_local4 = path.lastIndexOf("/");
_local1 = path.substring(_local4 + 1);
_local2 = _local1.indexOf("[", 0);
_local5 = ((_local2 >= 0) ? (_local1.substring(_local2 + 1, _local1.length - 1)) : "");
_local1 = ((_local2 >= 0) ? (_local1.substring(0, _local2)) : (_local1));
_local6.splice(0, 0, new mx.xpath.NodePathInfo(_local1, _local5));
path = path.substring(0, _local4);
}
return(_local6);
}
}
Symbol 366 MovieClip [__Packages.mx.xpath.NodePathInfo] Frame 0
class mx.xpath.NodePathInfo
{
function NodePathInfo (nodeName, filter) {
__nodeName = nodeName;
__filter = filter;
}
function get nodeName() {
return(__nodeName);
}
function get filter() {
return(__filter);
}
var __nodeName = null;
var __filter = null;
}
Symbol 367 MovieClip [__Packages.mx.xpath.FilterStack] Frame 0
class mx.xpath.FilterStack
{
var __expr, __ops;
function FilterStack (filterVal) {
__expr = new Array();
__ops = new Array();
var _local2 = new mx.utils.StringTokenParser(filterVal);
var _local5 = _local2.nextToken();
var _local4;
var _local3 = _local2.__get__token();
while (_local5 != mx.utils.StringTokenParser.tkEOF) {
if (_local3 == "@") {
_local5 = _local2.nextToken();
_local3 = _local2.token;
_local4 = new mx.xpath.FilterExpr(true, _local3, null);
__expr.splice(0, 0, _local4);
if (_local2.nextToken() == mx.utils.StringTokenParser.tkSymbol) {
if (_local2.__get__token() == "=") {
_local5 = _local2.nextToken();
_local4.__set__value(_local2.token);
}
}
} else if ((_local3 == "and") || (_local3 == "or")) {
__ops.splice(0, 0, _local3);
} else if ((_local3 != ")") && (_local3 != "(")) {
_local4 = new mx.xpath.FilterExpr(false, _local3, null);
__expr.splice(0, 0, _local4);
if (_local2.nextToken() == mx.utils.StringTokenParser.tkSymbol) {
if (_local2.__get__token() == "=") {
_local5 = _local2.nextToken();
_local4.__set__value(_local2.token);
}
}
}
_local5 = _local2.nextToken();
_local3 = _local2.token;
}
}
function get exprs() {
return(__expr);
}
function get ops() {
return(__ops);
}
}
Symbol 368 MovieClip [__Packages.mx.utils.StringTokenParser] Frame 0
class mx.utils.StringTokenParser
{
var _source, _skipChars;
function StringTokenParser (source, skipChars) {
_source = source;
_skipChars = ((skipChars == undefined) ? null : (skipChars));
}
function get token() {
return(_token);
}
function getPos() {
return(_index);
}
function nextToken() {
var _local4;
var _local2;
var _local3 = _source.length;
skipBlanks();
if (_index >= _local3) {
return(tkEOF);
}
_local2 = _source.charCodeAt(_index);
if (((((_local2 >= 65) && (_local2 <= 90)) || ((_local2 >= 97) && (_local2 <= 122))) || ((_local2 >= 192) && (_local2 <= Number.POSITIVE_INFINITY))) || (_local2 == 95)) {
_local4 = _index;
_index++;
_local2 = _source.charCodeAt(_index);
while (((((((_local2 >= 65) && (_local2 <= 90)) || ((_local2 >= 97) && (_local2 <= 122))) || ((_local2 >= 48) && (_local2 <= 57))) || ((_local2 >= 192) && (_local2 <= Number.POSITIVE_INFINITY))) || (_local2 == 95)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
_token = _source.substring(_local4, _index);
return(tkSymbol);
}
if ((_local2 == 34) || (_local2 == 39)) {
_index++;
_local4 = _index;
_local2 = _source.charCodeAt(_local4);
while (((_local2 != 34) && (_local2 != 39)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
_token = _source.substring(_local4, _index);
_index++;
return(tkString);
}
if ((_local2 == 45) || ((_local2 >= 48) && (_local2 <= 57))) {
var _local5 = tkInteger;
_local4 = _index;
_index++;
_local2 = _source.charCodeAt(_index);
while (((_local2 >= 48) && (_local2 <= 57)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
if (_index < _local3) {
if (((((((_local2 >= 48) && (_local2 <= 57)) || (_local2 == 46)) || (_local2 == 43)) || (_local2 == 45)) || (_local2 == 101)) || (_local2 == 69)) {
_local5 = tkFloat;
}
while ((((((((_local2 >= 48) && (_local2 <= 57)) || (_local2 == 46)) || (_local2 == 43)) || (_local2 == 45)) || (_local2 == 101)) || (_local2 == 69)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
}
_token = _source.substring(_local4, _index);
return(_local5);
}
_token = _source.charAt(_index);
_index++;
return(tkSymbol);
}
function skipBlanks() {
if (_index < _source.length) {
var _local2 = _source.charAt(_index);
while ((_local2 == " ") || ((_skipChars != null) && (skipChar(_local2)))) {
_index++;
_local2 = _source.charAt(_index);
}
}
}
function skipChar(ch) {
var _local2 = 0;
while (_local2 < _skipChars.length) {
if (ch == _skipChars[_local2]) {
return(true);
}
_local2++;
}
return(false);
}
static var tkEOF = -1;
static var tkSymbol = 0;
static var tkString = 1;
static var tkInteger = 2;
static var tkFloat = 3;
var _index = 0;
var _token = "";
}
Symbol 369 MovieClip [__Packages.mx.xpath.FilterExpr] Frame 0
class mx.xpath.FilterExpr
{
function FilterExpr (attrInit, nameInit, valueInit) {
__attr = attrInit;
__name = nameInit;
__value = valueInit;
}
function get attr() {
return(__attr);
}
function set attr(newVal) {
__attr = newVal;
//return(attr);
}
function get name() {
return(__name);
}
function set name(newVal) {
__name = newVal;
//return(name);
}
function get value() {
return(__value);
}
function set value(newVal) {
__value = newVal;
//return(value);
}
var __attr = false;
var __value = null;
var __name = null;
}
Symbol 370 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 371 MovieClip [__Packages.tools.math.MathUtils] Frame 0
class tools.math.MathUtils
{
function MathUtils () {
}
static function intersect2Lines(p1, p2, p3, p4) {
var _local1 = p1.x;
var _local3 = p1.y;
var _local2 = p4.x;
var _local8 = p4.y;
var _local7 = p2.x - _local1;
var _local6 = p3.x - _local2;
if (!(_local7 || (_local6))) {
return(NaN);
}
var _local4 = (p2.y - _local3) / _local7;
var _local5 = (p3.y - _local8) / _local6;
if (!_local7) {
return({x:_local1, y:(_local5 * (_local1 - _local2)) + _local8});
}
if (!_local6) {
return({x:_local2, y:(_local4 * (_local2 - _local1)) + _local3});
}
var _local9 = (((((-_local5) * _local2) + _local8) + (_local4 * _local1)) - _local3) / (_local4 - _local5);
var _local10 = (_local4 * (_local9 - _local1)) + _local3;
return({x:_local9, y:_local10});
}
static function midLine(a, b) {
return({x:(a.x + b.x) / 2, y:(a.y + b.y) / 2});
}
static function bezierSplit(p0, p1, p2, p3) {
var _local1 = midLine;
var _local7 = _local1(p0, p1);
var _local4 = _local1(p1, p2);
var _local2 = _local1(p2, p3);
var _local6 = _local1(_local7, _local4);
var _local3 = _local1(_local4, _local2);
var _local5 = _local1(_local6, _local3);
return({b0:{a:p0, b:_local7, c:_local6, d:_local5}, b1:{a:_local5, b:_local3, c:_local2, d:p3}});
}
static function $cBez(mc, a, b, c, d, k) {
var _local2 = intersect2Lines(a, b, c, d);
var _local9 = (((a.x + d.x) + (_local2.x * 4)) - ((b.x + c.x) * 3)) * 0.125;
var _local8 = (((a.y + d.y) + (_local2.y * 4)) - ((b.y + c.y) * 3)) * 0.125;
if (((_local9 * _local9) + (_local8 * _local8)) > k) {
var _local10 = bezierSplit(a, b, c, d);
var _local5 = _local10.b0;
var _local4 = _local10.b1;
$cBez(mc, a, _local5.b, _local5.c, _local5.d, k);
$cBez(mc, _local4.a, _local4.b, _local4.c, d, k);
} else {
mc.curveTo(_local2.x, _local2.y, d.x, d.y);
}
}
static function drawBezierPts(mc, p1, p2, p3, p4, tolerance) {
if (tolerance == undefined) {
tolerance = 5;
}
$cBez(mc, p1, p2, p3, p4, tolerance * tolerance);
}
static function drawBezier(mc, x1, y1, x2, y2, x3, y3, x4, y4, tolerance) {
drawBezierPts(mc, {x:x1, y:y1}, {x:x2, y:y2}, {x:x3, y:y3}, {x:x4, y:y4}, tolerance);
}
static function drawBezierCurve(mc, points, isClosed, tolerance) {
var _local1 = 0;
while (_local1 < (points.length - 1)) {
drawBezierPts(mc, points[_local1], points[_local1].next, points[_local1 + 1].previous, points[_local1 + 1], tolerance);
_local1++;
}
if (isClosed) {
drawBezierPts(mc, points[points.length - 1], points[points.length - 1].next, points[0].previous, points[0], tolerance);
}
}
}
Symbol 372 MovieClip [__Packages.GamePlay] Frame 0
class GamePlay extends MovieClip
{
var sounds, tweens, firstTimeRun, highScoreCookieName, gameWidth, gameHeight, gameId, currentHighScore, dispatchEvent, _parent, desiredGameWidth, desiredGameHeight, gameInnerContainer, _xmouse, _ymouse;
function GamePlay () {
super();
mx.events.EventDispatcher.initialize(this);
sounds = new Array();
tweens = new Array();
firstTimeRun = true;
highScoreCookieName = "highscores";
}
function init(gWidth, gHeight, xmlRessources, _gameId) {
gameWidth = gWidth;
gameHeight = gHeight;
gameId = _gameId;
var _local3 = getCurrentHighScore();
currentHighScore = _local3;
var _local2 = 0;
while (_local2 < tweens.length) {
tweens[_local2].stop();
_local2++;
}
tweens = new Array();
stopSounds();
sounds = new Array();
initRessources(xmlRessources);
}
function initRessources(xmlRessources) {
}
function initialize() {
}
function reinitialize() {
}
function launchGame() {
}
function startGame() {
launchGame();
}
function getSound(name) {
var _local2 = new Sound(this);
_local2.attachSound(name);
_local2.setVolume(volume);
sounds.push(_local2);
return(_local2);
}
function setVolume(volume) {
tools.utils.Utils.debugLog("gameplay.setVolume()");
tools.utils.Utils.debugLog("Array.length : " + sounds.length);
this.volume = volume;
var _local2 = 0;
while (_local2 < sounds.length) {
sounds[_local2].setVolume(volume);
tools.utils.Utils.debugLog("Volume : " + sounds[_local2].getVolume());
_local2++;
}
}
function stopSounds() {
var _local2 = 0;
while (_local2 < sounds.length) {
sounds[_local2].stop();
_local2++;
}
}
function registerTween(tween) {
tweens.push(tween);
}
function gameReady() {
dispatchEvent({type:"gameReady", target:this});
}
function gameOver() {
dispatchEvent({type:"gameOver", target:this});
}
function showStartPanel(startMessage, rules, hideMessage) {
_parent._parent._parent.showStartPanel(startMessage, rules, hideMessage);
}
function showEndPanel(endMessage, hideMessage) {
_parent._parent._parent.showEndPanel(endMessage, hideMessage);
}
function getEncodedChallengeURL(challengeScore, challengeName, challengeParams) {
return(_parent._parent._parent.getEncodedChallengeURL(challengeScore, challengeName, challengeParams));
}
static function buildHighScoreId(gameId) {
return("ID_" + gameId);
}
function findHighScoreBounds(highScores) {
var _local2 = new Object();
_local2.highScoreIndex = highScores.indexOf(buildHighScoreId(gameId) + "=");
if (_local2.highScoreIndex >= 0) {
_local2.firstQuoteIndex = highScores.indexOf("\"", _local2.highScoreIndex);
_local2.lastQuoteIndex = highScores.indexOf("\"", _local2.firstQuoteIndex + 1);
}
return(_local2);
}
function extractHighScore(highScores) {
var _local2 = findHighScoreBounds(highScores);
if ((_local2.highScoreIndex < 0) || (_local2.highScoreIndex == undefined)) {
return(undefined);
}
return(highScores.substring(_local2.firstQuoteIndex + 1, _local2.lastQuoteIndex));
}
function replaceHighScore(highScores, newHighScore) {
var _local4;
var _local2 = findHighScoreBounds(highScores);
if ((_local2.highScoreIndex != undefined) && (_local2.highScoreIndex >= 0)) {
_local4 = (highScores.substring(0, _local2.firstQuoteIndex + 1) + newHighScore) + highScores.substring(_local2.lastQuoteIndex, highScores.length);
} else {
_local4 = (((((highScores != undefined) ? (highScores) : "") + buildHighScoreId(gameId)) + "=\"") + newHighScore) + "\";";
}
return(_local4);
}
function getCurrentHighScore() {
var _local2 = SharedObject.getLocal(highScoreCookieName);
var _local4 = _local2.data.highScores;
var _local3 = extractHighScore(_local4);
var _local5 = parseFloat(_local3);
return(_local5);
}
function setCurrentHighScore(newHighScore) {
var _local2 = SharedObject.getLocal(highScoreCookieName);
var _local4 = _local2.data.highScores;
var _local3 = replaceHighScore(_local4, newHighScore.toString());
_local2.data.highScores = _local3;
var _local5 = _local2.flush();
currentHighScore = newHighScore;
}
function refreshInnerContainerDimensions(desiredWidth, desiredHeight, container) {
desiredGameWidth = desiredWidth;
desiredGameHeight = desiredHeight;
gameInnerContainer = container;
_refreshInnerContainerDimensions();
}
function _refreshInnerContainerDimensions() {
var _local6 = desiredGameWidth / desiredGameHeight;
var _local5 = gameWidth / gameHeight;
var _local2;
var _local4;
var _local3;
if (_local6 > _local5) {
_local2 = gameWidth / desiredGameWidth;
_local4 = 0;
_local3 = (gameHeight - (_local2 * desiredGameHeight)) / 2;
} else {
_local2 = gameHeight / desiredGameHeight;
_local4 = (gameWidth - (_local2 * desiredGameWidth)) / 2;
_local3 = 0;
}
tools.utils.Utils.debugLog((((("refreshing ... s=" + _local2) + " x=") + _local4) + " y=") + _local3);
tools.utils.Utils.debugLog((("refreshing ... w=" + gameWidth) + " h=") + gameHeight);
tools.utils.Utils.debugLog((("refreshing ... dw=" + desiredGameWidth) + " dh=") + desiredGameHeight);
tools.utils.Utils.debugLog((("refreshing ... dr=" + _local6) + " sr=") + _local5);
gameInnerContainer._xscale = _local2 * 100;
gameInnerContainer._yscale = _local2 * 100;
gameInnerContainer._x = _local4;
gameInnerContainer._y = _local3;
}
function hideMouse() {
mustHideMouse = true;
}
function showMouse() {
mustHideMouse = false;
if (isMouseHidden) {
Mouse.show();
isMouseHidden = false;
}
}
function onEnterFrame() {
if (mustHideMouse) {
if ((((_xmouse > 0) && (_xmouse < gameWidth)) && (_ymouse > 0)) && (_ymouse < gameHeight)) {
if (!isMouseHidden) {
Mouse.hide();
isMouseHidden = true;
}
} else if (isMouseHidden) {
Mouse.show();
isMouseHidden = false;
}
}
}
var volume = 100;
var mustHideMouse = false;
var isMouseHidden = false;
}
Symbol 373 MovieClip [__Packages.tools.utils.Utils] Frame 0
class tools.utils.Utils
{
function Utils () {
}
static function debugLog(output) {
var _local1 = (("[" + getTimeOfDay()) + "]-") + output;
trace(_local1);
jsDebug(_local1);
}
static function getTimeOfDay() {
var _local1 = new Date();
var _local3 = _local1.getHours();
var _local4 = _local1.getMinutes();
var _local2 = _local1.getSeconds();
var _local5 = ((((((((_local3 < 10) ? "0" : "") + _local3) + ":") + ((_local4 < 10) ? "0" : "")) + _local4) + ":") + ((_local2 < 10) ? "0" : "")) + _local2;
return(_local5);
}
static function linearTweening(t, b, c, d) {
return(((c * t) / d) + b);
}
static function jsDebug(output) {
flash.external.ExternalInterface.call("addDebug", output);
}
}
Symbol 374 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 375 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 376 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 377 MovieClip [__Packages.OverPicToTopGamePlay] Frame 0
class OverPicToTopGamePlay extends GamePlay
{
var vx, tempsStart, mcIndic, game, glissement, gameLevel, stamina, staminaClick, mcBras, mechantName, mechant, tabMechantName, interval, mcRebours, onPress, onRelease, gotoAndStop, mcCorps, corps, indic, bras, mcMain, mcBrasMechant, brasMechant, mcBarreStamina, barreStamina, mcEcranRouge, ecranrouge, mcAffTemps, affTemps, mcLoupioteP1, loupioteP1, mcLoupioteP2, loupioteP2, mcLoupioteM1, loupioteM1, mcLoupioteM2, loupioteM2, mcHighScore, highscores, mcFoule, foule, staminaIsPossible, stamPossible, btReplayEndPanel, Ttable, mcGameWin, gameWin, mcGameLose, gameLose, mcGameOver, gameOver, mcGameStart, gameStart, ClipRetryGoodLevel, mcGameFinal, gameFinal, gameRebours, mcGameVersus, gameVersus, longueurBrasMechantInit, followMouse, score, gameRound, roundWin, roundLose, totalRoundsWon, totalRoundsLost, force, longueurBras, tabMechantRebond, tabMechantForce, tabMechantFriction, tabMechantDelayPichenette, tabMechantMaxGlissement, testEnervement, musicSound, getSound, crowdSound, crowdSoundXcite, staminaSound, defeatSound, victorySound, startSound, soundStaminaPossible, enervementSound, loseSound, Huss, cry, huhuhu, go, ting, MDR, bimTable, tabEnervementMechantSound, startMessage, endMessage, highScore, getCurrentHighScore, showStartPanel, gameReady, battleRound, tempsJeu, ballIndic, mainX, mainY, longueurBrasMechant, rebond, friction, maxGlissement, forceEnnemi, delayPichenette, staminaPossible, sourieSuisourie, _x, _y, _xmouse, ax, _currentframe, tuto, newTemps, roundBonus, timeBonus, staminaLeft, roundScore, lastRoundVictory, smashG, smashD, showEndPanel, setCurrentHighScore;
function OverPicToTopGamePlay () {
super();
}
function initGame() {
vx = 0;
tempsStart = getTimer();
mcIndic._x = 200;
mcIndic._y = 20;
game = true;
glissement = 3 + (0.15 * gameLevel);
if (Math.random() < 0.5) {
glissement = -glissement;
}
stamina = 0;
staminaClick = false;
mcBras._rotation = 0;
mechantName = tabMechantName[mechant - 1];
interval = setInterval(this, "pichenette", 2000);
mcRebours._visible = false;
onPress = function () {
this.useStamina();
};
onRelease = function () {
this.stopStamina();
};
}
function initializeScene() {
gotoAndStop(1);
mcCorps = corps;
mcIndic = indic;
mcBras = bras;
mcMain = mcBras.main;
mcBrasMechant = brasMechant;
mcBarreStamina = barreStamina.graf;
mcBarreStamina._yscale = 0;
mcEcranRouge = ecranrouge;
mcAffTemps = affTemps;
mcLoupioteP1 = loupioteP1;
mcLoupioteP2 = loupioteP2;
mcLoupioteM1 = loupioteM1;
mcLoupioteM2 = loupioteM2;
mcHighScore = highscores;
mcFoule = foule;
mcFoule.gotoAndPlay(1);
staminaIsPossible = stamPossible;
staminaIsPossible.gotoAndStop("invisible");
btReplayEndPanel._visible = false;
Ttable = Ttable;
mcGameWin = gameWin;
mcGameWin.gotoAndStop(1);
mcGameWin._visible = false;
mcGameLose = gameLose;
mcGameLose.gotoAndStop(1);
mcGameLose._visible = false;
mcGameOver = gameOver;
mcGameOver.gotoAndStop(1);
mcGameOver._visible = false;
mcGameStart = gameStart;
mcGameStart.gotoAndStop(1);
mcGameStart._visible = false;
ClipRetryGoodLevel = mcGameStart.clipRetryGoodLevel;
mcGameFinal = gameFinal;
mcGameFinal.gotoAndStop(1);
mcGameFinal._visible = false;
mcRebours = gameRebours;
mcRebours.gotoAndStop(1);
mcRebours._visible = false;
mcGameVersus = gameVersus;
mcGameVersus.gotoAndStop(1);
mcGameVersus._visible = false;
mcGameVersus.onRelease = function () {
this._parent.onVersusClick();
};
mcBrasMechant._rotation = 30;
longueurBrasMechantInit = 20;
mcGameStart.btBegin.onRelease = function () {
this._parent._visible = false;
this._parent._parent.levelUp();
};
mcGameStart.btHowToPlay.onRelease = function () {
this._parent._parent.initializeNewOpponent(3);
this._parent._parent.longueurBrasMechantInit = this.tabLongueurBrasMechant[2];
this._parent._parent.mcCorps.tete.gotoAndStop("static");
this._parent._visible = false;
this._parent._parent.gotoAndStop(2);
};
mcGameLose.btTryAgain.onRelease = function () {
this._parent._parent.rebours();
};
mcGameOver.btTryAgain.onRelease = (mcGameFinal.btTryAgain.onRelease = function () {
this._parent._parent.initVars();
this._parent._visible = false;
this._parent._parent.mcGameStart._visible = true;
this.initializeNewOpponent(1);
});
initVars();
}
function initVars() {
game = false;
followMouse = false;
initializeNewOpponent(3);
longueurBrasMechantInit = tabLongueurBrasMechant[2];
mcCorps.tete.gotoAndStop("static");
delete onPress;
delete onRelease;
score = 0;
gameLevel = 0;
gameRound = 0;
roundWin = 0;
roundLose = 0;
totalRoundsWon = 0;
totalRoundsLost = 0;
force = 8;
longueurBras = 120;
mechant = 0;
tabMechantName = ["Joe Glass", "T.Boy", "O'Connor", "Tornado", "Da Beast"];
tabMechantRebond = [0.025, 0.023, 0.02, 0.0158, 0.0146];
tabMechantForce = [1.8, 12.5, 13, 13, 14.5];
tabMechantFriction = [0.5, 0.65, 0.72, 0.75, 0.8];
tabMechantDelayPichenette = [2000, 1950, 1700, 1200, 1000];
tabMechantMaxGlissement = [2, 2.5, 3, 3.6, 4];
testEnervement = eNeutre;
sourie();
}
function initializeSound() {
musicSound = getSound("musicSound");
crowdSound = getSound("crowdSound");
crowdSoundXcite = getSound("crowdSound");
staminaSound = getSound("staminaSound");
defeatSound = getSound("defeatSound");
victorySound = getSound("victorySound");
startSound = getSound("startSound");
soundStaminaPossible = getSound("soundStaminaPossible");
enervementSound = getSound("enervementSound");
loseSound = getSound("loseSound");
Huss = getSound("Huss");
cry = getSound("cry");
huhuhu = getSound("huhuhu");
go = getSound("go");
ting = getSound("ting");
MDR = getSound("MDR");
bimTable = getSound("bimTable");
tabEnervementMechantSound = new Array();
var _local2 = 1;
while (_local2 <= 5) {
tabEnervementMechantSound.push(getSound("tabEnervementMechantSound" + _local2));
_local2++;
}
musicSound.start();
musicSound.onSoundComplete = function () {
this.start();
};
}
function initRessources(xmlRessources) {
initializeSound();
initializeScene();
var _local3 = mx.xpath.XPathAPI.selectSingleNode(xmlRessources, "/RESSOURCES/PANZOOMROTATE");
var _local4 = mx.xpath.XPathAPI.selectSingleNode(xmlRessources, "/RESSOURCES/DETOURAGE_TP");
corps.tete.addEventListener("imageLoad", mx.utils.Delegate.create(this, onHeadLoad));
corps.tete.parseXML(_local3, _local4);
startMessage = mx.xpath.XPathAPI.selectSingleNode(xmlRessources, "RESSOURCES/START_MESSAGE").attributes.TEXT;
endMessage = mx.xpath.XPathAPI.selectSingleNode(xmlRessources, "RESSOURCES/END_MESSAGE").attributes.TEXT;
highScore = getCurrentHighScore();
if ((highScore == undefined) || (isNaN(highScore))) {
highScore = 0;
}
showStartPanel((startMessage ? (unescape(startMessage)) : "Come on, fight me!"), "Defeat your opponents in this Arm Wrestling tournament.");
}
function onHeadLoad() {
gameReady();
}
function startGame() {
if (!tutoViewed) {
tutoViewed = true;
gotoAndStop(2);
} else {
initializeNewOpponent(1);
mcGameStart._visible = true;
}
ClipRetryGoodLevel.gotoAndStop(retryGoodLevel + 1);
}
function restartGame() {
initVars();
mcGameOver._visible = false;
mcGameFinal._visible = false;
startGame();
}
function skipTuto() {
gotoAndStop(1);
initializeNewOpponent(1);
mcGameStart._visible = true;
}
function onChooseOpponent(index) {
gameLevel = index;
mechant = index;
mcGameStart._visible = false;
levelUp();
}
function onVersusClick() {
mcGameVersus.gotoAndStop(1);
rebours();
mcRebours.gotoAndPlay("compte");
}
function onEndCursorAnimation() {
followMouse = true;
}
function rebours() {
testEnervement = eNeutre;
gameRound++;
battleRound = (roundWin + roundLose) + 1;
mcRebours.affRound.text = (roundWin + roundLose) + 1;
mcGameStart._visible = false;
mcGameWin._visible = false;
mcGameLose._visible = false;
mcRebours._visible = true;
mcRebours.gotoAndPlay(2);
mcGameVersus._visible = false;
tempsJeu = 0;
mcIndic._x = 200;
mcIndic._y = 20;
mcIndic._rotation = 0;
ballIndic._x = 200;
ballIndic._y = 20;
ballIndic._rotation = 0;
mcBarreStamina._yscale = 0;
mcBras._rotation = 0;
mcCorps.gotoAndStop(gameLevel);
mcBrasMechant.gotoAndStop(gameLevel);
longueurBrasMechantInit = tabLongueurBrasMechant[gameLevel - 1];
mainX = mcBras._x;
mainY = (-longueurBras) + mcBras._y;
mcBrasMechant._rotation = ((Math.atan2(mainY - mcBrasMechant._y, mainX - mcBrasMechant._x) * 180) / Math.PI) + 90;
var _local3 = mainX - mcBrasMechant._x;
var _local2 = mainY - mcBrasMechant._y;
longueurBrasMechant = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
mcBrasMechant.graf._yscale = (100 * longueurBrasMechant) / longueurBrasMechantInit;
mcCorps.tete.gotoAndStop("static");
victorySound.stop();
crowdSound.start();
crowdSound.onSoundComplete = function () {
this.start();
};
mcFoule.gotoAndPlay("calme");
staminaIsPossible.gotoAndStop("invisible");
}
function levelUp() {
gameLevel++;
retryGoodLevel = Math.max(gameLevel - 1, retryGoodLevel);
roundWin = 0;
roundLose = 0;
mechant++;
if (gameLevel == 5) {
force = 9;
}
initializeNewOpponent(mechant);
longueurBrasMechantInit = tabLongueurBrasMechant[mechant - 1];
mechantName = tabMechantName[mechant - 1];
rebond = tabMechantRebond[mechant - 1];
friction = tabMechantFriction[mechant - 1];
maxGlissement = tabMechantMaxGlissement[mechant - 1];
forceEnnemi = tabMechantForce[mechant - 1];
delayPichenette = tabMechantDelayPichenette[mechant - 1];
mcLoupioteP1.gotoAndStop(1);
mcLoupioteP2.gotoAndStop(1);
mcLoupioteM1.gotoAndStop(1);
mcLoupioteM2.gotoAndStop(1);
mcGameVersus._visible = true;
mcGameVersus.gotoAndPlay(2);
mcGameWin._visible = false;
staminaPossible = false;
sourie();
}
function initializeNewOpponent(opponentIndex) {
mcBrasMechant.gotoAndStop(opponentIndex);
mcMain.gotoAndStop(opponentIndex);
mcCorps.gotoAndStop(opponentIndex);
mcBras._rotation = 0;
handleOpponentArmPosition();
mcMain._rotation = 0;
}
function sourie() {
sourieSuisourie._visible = false;
}
function onEnterFrame() {
super.onEnterFrame();
sourie();
if (game) {
tempsJeu = Math.round((getTimer() - tempsStart) / 10) / 100;
if (!staminaClick) {
handleIndicator();
}
handleArmRotation();
handleOpponentArmPosition();
zoneArm();
if (mcBras._rotation <= -70) {
roundWin++;
totalRoundsWon++;
this["mcLoupioteP" + roundWin].gotoAndStop(2);
endGame(true);
}
if (mcBras._rotation >= 70) {
roundLose++;
totalRoundsLost++;
this["mcLoupioteM" + roundLose].gotoAndStop(2);
endGame(false);
}
if ((stamina < 100) and (!staminaClick)) {
stamina = stamina + 0.2;
}
mcBarreStamina._yscale = stamina;
if ((stamina > 30) and (!staminaPossible)) {
staminaPossible = true;
staminaIsPossible.gotoAndPlay("visible");
soundStaminaPossible.start();
} else if ((stamina < 30) and staminaPossible) {
staminaPossible = false;
staminaIsPossible.gotoAndStop("invisible");
}
if (staminaClick) {
stamina = stamina - 1;
_x = _x + ((Math.random() > 0.5) ? (Math.random() * 4) : (Math.random() * -4));
_y = _y + ((Math.random() > 0.5) ? (Math.random() * 4) : (Math.random() * -4));
if (stamina < 0) {
stamina = 0;
stopStamina();
}
}
} else {
handleOpponentArmPosition();
if (followMouse) {
ballIndic._x = _xmouse;
if (ballIndic._x <= 200) {
ballIndic._y = 40 - (ballIndic._x / 10);
ballIndic._rotation = ((10 - ballIndic._y) + 10) * 0.8;
} else {
ballIndic._y = 40 - ((400 - ballIndic._x) / 10);
ballIndic._rotation = ((ballIndic._y - 10) - 10) * 0.8;
}
}
}
}
function handleIndicator() {
ax = ((400 - _xmouse) - mcIndic._x) * rebond;
vx = vx + (ax + glissement);
vx = vx * friction;
mcIndic._x = mcIndic._x + vx;
if (mcIndic._x <= 200) {
mcIndic._y = 40 - (mcIndic._x / 10);
mcIndic._rotation = ((10 - mcIndic._y) + 10) * 0.8;
} else {
mcIndic._y = 40 - ((400 - mcIndic._x) / 10);
mcIndic._rotation = ((mcIndic._y - 10) - 10) * 0.8;
}
ballIndic._x = _xmouse;
if (ballIndic._x <= 200) {
ballIndic._y = 40 - (ballIndic._x / 10);
ballIndic._rotation = ((10 - ballIndic._y) + 10) * 0.8;
} else {
ballIndic._y = 40 - ((400 - ballIndic._x) / 10);
ballIndic._rotation = ((ballIndic._y - 10) - 10) * 0.8;
}
if (((400 - _xmouse) > 200) && (mcIndic._x != 370)) {
glissement = glissement + ((400 - (400 - _xmouse)) / 500);
}
if (((400 - _xmouse) <= 200) && (mcIndic._x != 30)) {
glissement = glissement - ((400 - _xmouse) / 500);
}
if (mcIndic._x < 30) {
mcIndic._x = 30;
vx = 0;
glissement = -1;
}
if (mcIndic._x > 370) {
mcIndic._x = 370;
vx = 0;
glissement = 1;
}
}
function handleArmRotation() {
var _local2 = Math.abs(ballIndic._x - mcIndic._x);
if (_local2 <= 15) {
mcBras._rotation = mcBras._rotation - ((((10 - _local2) * 15) * force) / 1000);
if ((!staminaClick) and ((mcCorps.tete._currentframe < 20) or (mcCorps.tete._currentframe > 30))) {
mcCorps.tete.gotoAndPlay("gagne");
}
} else {
mcBras._rotation = mcBras._rotation + (((_local2 - 10) * forceEnnemi) / 1000);
if ((!staminaClick) and ((mcCorps.tete._currentframe < 10) or (mcCorps.tete._currentframe > 20))) {
mcCorps.tete.gotoAndPlay("perd");
}
}
}
function zoneArm() {
if ((mcBras._rotation >= -70) and (mcBras._rotation <= -40)) {
if (testEnervement == (!ePlayer)) {
testEnervement = ePlayer;
fouleXcite();
enervementSound.start();
enervementSound.onSoundComplete = function () {
this.start();
};
}
}
if ((mcBras._rotation >= -40) and (mcBras._rotation <= 40)) {
if ((testEnervement == ePlayer) or (testEnervement == eEnnemi)) {
testEnervement = eNeutre;
fouleCalm();
}
}
if ((mcBras._rotation <= 70) and (mcBras._rotation >= 40)) {
if (testEnervement == (!eEnnemi)) {
testEnervement = eEnnemi;
fouleXciteLose();
tabEnervementMechantSound[mechant].start();
tabEnervementMechantSound[mechant].onSoundComplete = function () {
this.start();
};
}
}
}
function fouleXciteWin() {
mcFoule.gotoAndPlay("xcite");
if (!staminaClick) {
Calme = false;
crowdSound.stop("crowdSound");
loseSound.stop("loseSound");
if ((roundWin == 2) && (gameLevel == 5)) {
victorySound.start();
victorySound.onSoundComplete = function () {
this.stop();
};
} else {
victorySound.start();
victorySound.onSoundComplete = function () {
this.start();
};
}
}
}
function fouleXcite() {
mcFoule.gotoAndPlay("xcite");
if (!staminaClick) {
Calme = false;
loseSound.stop("loseSound");
crowdSoundXcite.start();
crowdSoundXcite.onSoundComplete = function () {
this.start();
};
Calme = false;
}
}
function fouleCalm() {
mcFoule.gotoAndPlay("calme");
Calme = true;
crowdSoundXcite.stop("crowdSound");
victorySound.stop("victorySound");
loseSound.stop("loseSound");
enervementSound.stop("enervementSound");
tabEnervementMechantSound[mechant].stop();
crowdSound.start();
crowdSound.onSoundComplete = function () {
this.start();
};
}
function fouleXciteLose() {
mcFoule.gotoAndPlay("perd");
if (!staminaClick) {
Calme = false;
crowdSound.stop("crowdSound");
loseSound.start();
loseSound.onSoundComplete = function () {
this.start();
};
}
}
function handleOpponentArmPosition() {
var _local2 = (((-mcBras._rotation) / 180) * Math.PI) + (Math.PI/2);
var _local3 = (longueurBras * Math.cos(_local2)) + mcBras._x;
var _local4 = mcBras._y - (longueurBras * Math.sin(_local2));
if (_currentframe == 2) {
_local2 = (((-tuto.tonBras._rotation) / 180) * Math.PI) + (Math.PI/2);
_local3 = (longueurBras * Math.cos(_local2)) + tuto.tonBras._x;
_local4 = tuto.tonBras._y - (longueurBras * Math.sin(_local2));
}
mcBrasMechant._rotation = ((Math.atan2(_local4 - mcBrasMechant._y, _local3 - mcBrasMechant._x) * 180) / Math.PI) + 90;
var _local6 = _local3 - mcBrasMechant._x;
var _local5 = _local4 - mcBrasMechant._y;
var _local7 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
mcBrasMechant.graf._yscale = (100 * _local7) / longueurBrasMechantInit;
mcMain._rotation = mcBras._rotation / 10;
}
function pichenette() {
if (mcIndic._x < 200) {
glissement = glissement + (Math.random() * maxGlissement);
} else {
glissement = glissement - (Math.random() * maxGlissement);
}
newInterval();
}
function newInterval() {
clearInterval(interval);
newTemps = (Math.random() * 3000) + delayPichenette;
interval = setInterval(this, "pichenette", newTemps);
}
function useStamina() {
if (((stamina > 30) and (!staminaClick)) and (mcEcranRouge._currentframe == 1)) {
Calme = false;
mcEcranRouge.gotoAndPlay(2);
staminaClick = true;
mcIndic._x = 200;
mcIndic._y = 20;
mcIndic._rotation = 0;
ballIndic._x = 200;
ballIndic._y = 20;
ballIndic._rotation = 0;
mcCorps.tete.gotoAndPlay("stamina");
fouleXciteWin();
mcBras.gotoAndPlay("vnr");
mcCorps.mcBierre.gotoAndPlay("stam");
staminaSound.start();
staminaSound.onSoundComplete = function () {
this.start();
};
}
}
function stopStamina() {
if (staminaClick) {
newInterval();
staminaClick = false;
mcIndic.gotoAndStop(1);
_x = (_y = 0);
glissement = 3 + (0.15 * gameLevel);
staminaSound.stop("staminaSound");
mcBras.gotoAndStop("nrml");
if (!Calme) {
fouleCalm();
}
mcCorps.mcBierre.gotoAndStop("nrml");
}
}
function endGame(victory) {
clearInterval(interval);
delete onPress;
delete onRelease;
stopStamina();
staminaIsPossible.gotoAndStop("invisible");
game = false;
followMouse = false;
delete onEnterFrame;
if (victory) {
roundBonus = OPPONENT_SCORE[gameLevel - 1];
timeBonus = Math.round((2 * OPPONENT_SCORE[gameLevel - 1]) * (1.5 - (tempsJeu / (2 * TIME_SCORE[gameLevel - 1]))));
if (timeBonus < 0) {
timeBonus = 0;
}
staminaLeft = Math.round(((stamina * 2) * OPPONENT_SCORE[gameLevel - 1]) / 100);
roundScore = (roundBonus + timeBonus) + staminaLeft;
score = score + roundScore;
}
launchEndRoundAnimation(victory);
}
function launchEndRoundAnimation(victory) {
lastRoundVictory = victory;
Huss.start();
if (victory) {
Ttable.play();
bimTable.start();
smashG.play();
var _local2 = new mx.transitions.Tween(mcBras, "_rotation", mx.transitions.easing.Regular.easeOut, mcBras._rotation - 5, mcBras._rotation + 45, 15, false);
_local2.listener = this;
} else {
Ttable.play();
bimTable.start();
smashD.play();
var _local2 = new mx.transitions.Tween(mcBras, "_rotation", mx.transitions.easing.Regular.easeOut, mcBras._rotation + 10, mcBras._rotation - 45, 15, false);
_local2.listener = this;
}
_local2.onMotionFinished = function () {
this.rewind();
this.listener.launchOpponentEmotion();
};
}
function launchOpponentEmotion() {
if (lastRoundVictory) {
cry.start();
enervementSound.stop("enervementSound");
mcCorps.gotoAndPlay("win" + gameLevel);
} else {
MDR.start();
defeatSound.start();
defeatSound.onSoundComplete = function () {
this.start();
};
mcFoule.gotoAndPlay("perd");
mcCorps.gotoAndPlay("lose" + gameLevel);
}
}
function onOpponentAnimationEnd() {
if (lastRoundVictory) {
if ((roundWin == 2) && (gameLevel == 5)) {
fouleXciteWin();
mcGameFinal._visible = true;
showEndPanel((endMessage ? (unescape(endMessage)) : "What a match!"));
checkHighscore();
} else {
fouleXciteWin();
mcGameWin._visible = true;
mcGameWin.gotoAndPlay(2);
}
} else if (roundLose == 2) {
mcGameOver._visible = true;
showEndPanel((endMessage ? (unescape(endMessage)) : "What a match!"));
checkHighscore();
} else {
mcGameLose._visible = true;
}
}
function checkHighscore() {
btReplayEndPanel._visible = true;
if (score > highScore) {
highScore = score;
setCurrentHighScore(highScore);
}
}
var OPPONENT_SCORE = [100, 200, 400, 1000, 2000];
var TIME_SCORE = [5, 10, 20, 25, 30];
var Calme = true;
var tabLongueurBrasMechant = [20, 20, 30, 30, 30];
var retryGoodLevel = 0;
var tutoViewed = false;
var ePlayer = 1;
var eNeutre = 0;
var eEnnemi = 2;
}
Symbol 378 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 379 MovieClip [__Packages.tools.panzoomrotate.PanZoomRotate] Frame 0
class tools.panzoomrotate.PanZoomRotate extends MovieClip
{
var mcContainer, createEmptyMovieClip, imageURL, mcImage, imageWidth, imageHeight, beginFill, moveTo, lineTo, endFill, onPress, onRelease, onReleaseOutside, dispatchEvent;
function PanZoomRotate () {
super();
mx.events.EventDispatcher.initialize(this);
mcContainer = createEmptyMovieClip("container", DEPTH_CONTAINER);
}
function init(xmlNode) {
imageURL = xmlNode.attributes.URL;
mcImage = mcContainer.createEmptyMovieClip("image", DEPTH_IMAGE);
var _local3 = new MovieClipLoader();
_local3.addListener(this);
_local3.loadClip(imageURL, mcImage);
tX = parseFloat(xmlNode.attributes.TX);
tY = parseFloat(xmlNode.attributes.TY);
zoom = parseFloat(xmlNode.attributes.ZOOM);
rotation = parseFloat(xmlNode.attributes.ROTATION);
}
function onLoadInit(mcTarget) {
imageWidth = mcImage._width;
imageHeight = mcImage._height;
mcImage._x = (-mcImage._width) / 2;
mcImage._y = (-mcImage._height) / 2;
mcContainer._x = tX;
mcContainer._y = tY;
mcContainer._xscale = zoom;
mcContainer._yscale = zoom;
mcContainer._rotation = rotation;
dispatchImageLoad();
}
function getImageWidth() {
return(imageWidth);
}
function getImageHeight() {
return(imageHeight);
}
function getImageURL() {
return(imageURL);
}
function setImage(imgURL) {
imageURL = imgURL;
mcImage = mcContainer.createEmptyMovieClip("image", DEPTH_IMAGE);
var _local2 = new MovieClipLoader();
_local2.addListener(this);
_local2.loadClip(imageURL, mcImage);
}
function setDraggable() {
beginFill(16711680, 0);
moveTo(-100, -100);
lineTo(100, -100);
lineTo(100, 100);
lineTo(-100, 100);
lineTo(-100, -100);
endFill();
onPress = function () {
this.mcContainer.startDrag();
};
onRelease = (onReleaseOutside = function () {
this.mcContainer.stopDrag();
this.tX = this.mcContainer._x;
this.tY = this.mcContainer._y;
this.dispatchImagePan();
});
}
function setImageRotation(angle) {
var _local7 = mcContainer._rotation * PI_180TH;
var _local5 = angle - mcContainer._rotation;
var _local4 = centerX - mcContainer._x;
var _local3 = centerY - mcContainer._y;
mcContainer._rotation = angle;
var _local2 = _local5 * PI_180TH;
if (Math.abs(_local2 % Math.PI) < 0.001) {
_local2 = 0;
}
mcContainer._x = mcContainer._x + ((_local4 * (1 - Math.cos(_local2))) + (_local3 * Math.sin(_local2)));
mcContainer._y = mcContainer._y + (((-_local4) * Math.sin(_local2)) + (_local3 * (1 - Math.cos(_local2))));
rotation = angle;
tX = mcContainer._x;
tY = mcContainer._y;
}
function setImageZoom(zoom) {
if (zoom == 0) {
zoom = 1;
}
var _local6 = mcContainer._xscale;
var _local5 = centerX - mcContainer._x;
var _local4 = centerY - mcContainer._y;
var _local3 = zoom / _local6;
mcContainer._xscale = zoom;
mcContainer._yscale = zoom;
mcContainer._x = mcContainer._x + (_local5 * (1 - _local3));
mcContainer._y = mcContainer._y + (_local4 * (1 - _local3));
this.zoom = zoom;
tX = mcContainer._x;
tY = mcContainer._y;
}
function setCenterPoint(cX, cY) {
centerX = cX;
centerY = cY;
}
function getXML() {
if (imageURL) {
var _local3 = new XML();
var _local2 = _local3.createElement("PANZOOMROTATE");
_local2.attributes.ROTATION = rotation.toString();
_local2.attributes.ZOOM = zoom.toString();
_local2.attributes.TY = tY.toString();
_local2.attributes.TX = tX.toString();
_local2.attributes.URL = imageURL;
return(_local2);
}
return(null);
}
function dispatchImageLoad() {
dispatchEvent({type:"imageLoad", target:this});
}
function dispatchImagePan() {
dispatchEvent({type:"imagePan", target:this});
}
var DEPTH_CONTAINER = 1;
var DEPTH_IMAGE = 2;
var PI_180TH = (Math.PI/180);
var tX = 0;
var tY = 0;
var zoom = 100;
var rotation = 0;
var centerX = 0;
var centerY = 0;
}