Frame 1
var __sSexe = ":P";
var __nHead;
var __nBody;
var __nButtocks;
var __nFeet;
Frame 2
Stage.align = "TL";
if (((this.getBytesLoaded() >= this.getBytesTotal()) && (this.getBytesLoaded() > 4)) && (this.getBytesTotal() > 4)) {
this.gotoAndStop(4);
} else {
this.gotoAndPlay(1);
mProgress._alpha = 100;
tfPreload.text = Math.floor((100 * this.getBytesLoaded()) / this.getBytesTotal()) + " %";
mProgressMask._yscale = Math.floor((100 * this.getBytesLoaded()) / this.getBytesTotal());
}
Frame 4
nextFrame();
Frame 5
var sdSound = new Sound();
sdSound.attachSound("sndFond1");
sdSound.start(0, 1);
sdSound.setVolume(30);
var bEnter = false;
var self = this;
sdSound.onSoundComplete = function () {
if (bEnter) {
self.mPersons.removeMovieClip();
self.mMask.removeMovieClip();
self.gotoAndStop(7);
} else {
this.start(0, 1);
}
};
function goToNext() {
trace("toto");
nextFrame();
}
this.stop();
trcae("zaza");
mcIntro.gotoAndStop(2);
setTimeout(goToNext, 3000);
Frame 6
function createPerson(nId_, oProperties_) {
var _local4 = oProperties_.sexe;
var _local2 = mPersons.createEmptyMovieClip(_local4 + nId_, nId_);
_local2._x = oProperties_.x;
_local2._y = oProperties_.y;
_local2._rotation = oProperties_.rotation;
aCustom[nId_] = oProperties_;
var _local12 = _local2.attachMovie(_local4 + "WalkHead", "head", 4);
var _local8 = _local2.attachMovie(_local4 + "WalkBody", "body", 3);
var _local9 = _local2.attachMovie(_local4 + "WalkArms", "arms", 2);
var _local10 = _local2.attachMovie(_local4 + "WalkButtocks", "buttocks", 1);
var _local11 = _local2.attachMovie(_local4 + "WalkFeet", "feet", 0);
customPerson(_local2, Number(oProperties_.head), Number(oProperties_.body), Number(oProperties_.buttocks), Number(oProperties_.feet));
stopWalk(_local2);
var self = this;
_local2.onRelease = function () {
if (self.bPersonNotChoosen) {
this._parent._parent.jouer_mc._visible = false;
var _local3 = Number(this._name.substr(1, this._name.length));
var _local2 = self.aCustom[_local3];
self.__sSexe = this._name.substr(0, 1);
self.__nHead = _local2.head;
self.__nBody = _local2.body;
self.__nButtocks = _local2.buttocks;
self.__nFeet = _local2.feet;
self.bPersonNotChoosen = false;
self.movePerson(this, _local3);
}
};
}
function movePerson(mc_, n_) {
startWalk(mc_);
var nCurrentFrame = 0;
var nPas = 5;
var aTab = this["path" + n_];
trace(aTab.length);
var self = this;
this.onEnterFrame = function () {
if (nCurrentFrame == (nPas * (aTab.length - 1))) {
delete this.onEnterFrame;
self.enterDisco();
}
nCurrentFrame++;
var _local2 = aTab[Math.floor(nCurrentFrame / nPas)];
mc_._x = mc_._x + _local2[0];
mc_._y = mc_._y + _local2[1];
mc_._rotation = mc_._rotation + _local2[2];
};
}
function enterDisco() {
bEnter = true;
}
function stopWalk(mc_) {
mc_.head.gotoAndStop(8);
mc_.body.gotoAndStop(8);
mc_.arms.gotoAndStop(8);
mc_.buttocks.gotoAndStop(8);
mc_.feet.gotoAndStop(8);
}
function startWalk(mc_) {
mc_.head.play();
mc_.body.play();
mc_.arms.play();
mc_.buttocks.play();
mc_.feet.play();
}
function customPerson(mc_, nHead_, nBody_, nButtocks_, nFeet_) {
mc_.head.onEnterFrame = function () {
this.mHead.gotoAndStop(nHead_);
delete this.onEnterFrame;
};
mc_.body.onEnterFrame = function () {
this.mBody.gotoAndStop(nBody_);
delete this.onEnterFrame;
};
mc_.arms.onEnterFrame = function () {
this.mRightArm.gotoAndStop(2);
this.mLeftArm.gotoAndStop(2);
delete this.onEnterFrame;
};
mc_.buttocks.onEnterFrame = function () {
this.mButtocks.gotoAndStop(nButtocks_);
delete this.onEnterFrame;
};
mc_.feet.onEnterFrame = function () {
this.mRightFoot.gotoAndStop(nFeet_);
this.mLeftFoot.gotoAndStop(nFeet_);
delete this.onEnterFrame;
};
}
mHP._visible = false;
var aCustom = new Array();
var mPersons = this.createEmptyMovieClip("mPersons", this.getNextHighestDepth());
var mMask = this.attachMovie("mask", "mMask", this.getNextHighestDepth());
mPersons._xscale = (mPersons._yscale = 80);
mPersons.setMask(mMask);
var path0 = [[3, 12, -5], [3, 12, -5], [3, 5, -15], [10, 0, 0], [10, -1, 0], [5, -5, -10], [0, -15, 0], [0, -15, 0], [0, -15, 0], [0, -15, 0]];
var path1 = [[5, -5, 30], [10, -10, 5], [10, -15, -5], [0, -10, 0]];
var path2 = [[15, 12, 15], [10, 5, 0], [10, 0, -8], [10, -1, -7], [5, -5, -10], [0, -15, 0], [0, -15, 0], [0, -15, 0], [0, -15, 0]];
var path3 = [[10, 15, -25], [15, 0, 0], [15, 0, 0], [10, -1, 0], [5, -5, -10], [5, -5, -10], [0, -15, 0], [0, -15, 0], [0, -15, 0], [0, -15, 0]];
var path4 = [[15, 4, 5], [15, -2, -5], [15, 0, 0], [15, 0, 0], [10, -1, 0], [5, -5, -10], [5, -5, -10], [0, -15, 0], [0, -15, 0], [0, -15, 0], [0, -15, 0]];
var path5 = [[10, -10, 12], [15, 0, 0], [15, 0, 0], [10, -1, 0], [5, -5, -9], [5, -5, -8], [0, -15, 0], [0, -15, 0], [0, -15, 0], [0, -15, 0]];
var o;
o = new Object();
o.x = 230;
o.y = 160;
o.rotation = 270;
o.sexe = "m";
o.head = 9;
o.body = 2;
o.buttocks = 3;
o.feet = 4;
createPerson(0, o);
o = new Object();
o.x = 300;
o.y = 200;
o.rotation = 340;
o.sexe = "w";
o.head = 9;
o.body = 2;
o.buttocks = 3;
o.feet = 4;
createPerson(1, o);
o = new Object();
o.x = 170;
o.y = 220;
o.rotation = 160;
o.sexe = "w";
o.head = 8;
o.body = 3;
o.buttocks = 1;
o.feet = 2;
createPerson(2, o);
o = new Object();
o.x = 100;
o.y = 230;
o.rotation = 280;
o.sexe = "w";
o.head = 3;
o.body = 2;
o.buttocks = 1;
o.feet = 4;
createPerson(3, o);
o = new Object();
o.x = 30;
o.y = 275;
o.rotation = 180;
o.sexe = "m";
o.head = 5;
o.body = 1;
o.buttocks = 3;
o.feet = 1;
createPerson(4, o);
o = new Object();
o.x = 90;
o.y = 340;
o.rotation = 110;
o.sexe = "m";
o.head = 3;
o.body = 2;
o.buttocks = 1;
o.feet = 4;
createPerson(5, o);
mPersons._visible = true;
var bPersonNotChoosen = true;
var cpt = 0;
var cptEnd = 30;
videur_mc.onEnterFrame = function () {
if (cpt >= cptEnd) {
delete this.onEnterFrame;
this._parent.jouer_mc._visible = false;
}
cpt++;
};
videur_mc.onRollOver = function () {
this._parent.jouer_mc._visible = true;
};
videur_mc.onRollOut = function () {
cpt = cptEnd;
this._parent.jouer_mc._visible = false;
};
Frame 7
var disco = (new com.digito.Club(mScene, mLife, mMeet, mBar, mLevel, tfLevel));
disco.init(__sSexe, __nHead, __nBody, __nButtocks, __nFeet);
Symbol 45 MovieClip Frame 1
this.stop();
Symbol 73 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 1
stop();
Symbol 108 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 1
Symbol 141 MovieClip Frame 1
Symbol 143 MovieClip Frame 1
Symbol 159 MovieClip Frame 1
Symbol 165 MovieClip Frame 1
Symbol 167 MovieClip Frame 1
Symbol 182 MovieClip Frame 1
Symbol 272 MovieClip [mAction0] Frame 1
var SEXE;
Symbol 272 MovieClip [mAction0] Frame 76
if (SEXE == "w") {
this.gotoAndPlay(76);
} else {
this.gotoAndPlay(81);
}
Symbol 272 MovieClip [mAction0] Frame 80
this.stop();
Symbol 272 MovieClip [mAction0] Frame 84
this.stop();
Symbol 286 MovieClip [mAction3] Frame 1
var SEXE;
Symbol 286 MovieClip [mAction3] Frame 71
if (SEXE == "w") {
this.gotoAndPlay(72);
} else {
this.gotoAndPlay(76);
}
Symbol 286 MovieClip [mAction3] Frame 75
this.stop();
Symbol 286 MovieClip [mAction3] Frame 79
this.stop();
Symbol 290 MovieClip [mAction1] Frame 1
var SEXE;
Symbol 290 MovieClip [mAction1] Frame 97
if (SEXE == "w") {
this.gotoAndPlay(98);
} else {
this.gotoAndPlay(102);
}
Symbol 290 MovieClip [mAction1] Frame 101
this.stop();
Symbol 290 MovieClip [mAction1] Frame 105
this.stop();
Symbol 294 MovieClip [mAction2] Frame 1
var SEXE;
Symbol 294 MovieClip [mAction2] Frame 108
if (SEXE == "w") {
this.gotoAndPlay(109);
} else {
this.gotoAndPlay(113);
}
Symbol 294 MovieClip [mAction2] Frame 112
this.stop();
Symbol 294 MovieClip [mAction2] Frame 116
this.stop();
Symbol 361 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 362 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 363 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 364 MovieClip [__Packages.mx.transitions.easing.Elastic] Frame 0
class mx.transitions.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static var version = "1.1.0.52";
}
Symbol 365 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 366 MovieClip [__Packages.com.digito.Club] Frame 0
class com.digito.Club
{
var _mClub, _mLife, _mMeet, _mBar, _mLevel, _tfLevel, _mHP, _mBgLevel, _mFeetLevel, _mButtocksLevel, _mBodiesLevel, _mHeadsLevel, _mKissLevel, _mListenerLevel, _dLeft, _dRight, _zm, _sm, _pcm, _lm, _nSceneWidth, _nSceneHeight, _sMainPersonSexe, _mp, _aPersons, _nTargetId, _aTargets, sd, __get__volume, _pTarget, _aMusicGenerators;
function Club (mParent_, mLife_, mMeet_, mBar_, mLevel_, tfLevel_) {
_mClub = mParent_;
_mLife = mLife_;
_mMeet = mMeet_;
_mBar = mBar_;
_mLevel = mLevel_;
_tfLevel = tfLevel_;
_mHP = _mClub.attachMovie("HPs", "mHP", _mClub.getNextHighestDepth());
_mHP._visible = true;
_mLevel._width = Stage.width;
_mLevel._height = Stage.height;
_mLevel._alpha = 0;
_tfLevel._x = (Stage.width - _tfLevel._width) / 2;
_tfLevel._y = (Stage.height - _tfLevel._height) / 2;
_tfLevel._visible = false;
width = (_mClub._width);
height = (_mClub._height);
_mClub._xscale = 80;
_mClub._yscale = 80;
_mBgLevel = _mClub.createEmptyMovieClip("mBgLevel", _mClub.getNextHighestDepth());
_mFeetLevel = _mClub.createEmptyMovieClip("mFeetLevel", _mClub.getNextHighestDepth());
_mButtocksLevel = _mClub.createEmptyMovieClip("mButtocksLevel", _mClub.getNextHighestDepth());
_mBodiesLevel = _mClub.createEmptyMovieClip("mBodiesLevel", _mClub.getNextHighestDepth());
_mHeadsLevel = _mClub.createEmptyMovieClip("mHeadsLevel", _mClub.getNextHighestDepth());
_mKissLevel = _mClub.createEmptyMovieClip("mKissLevel", _mClub.getNextHighestDepth());
_mListenerLevel = _mClub.createEmptyMovieClip("mListenerLevel", _mClub.getNextHighestDepth());
_dLeft = new com.digito.Door(100, height - 100);
_dRight = new com.digito.Door(width - 100, 100);
_zm = new com.digito.ZoneManager(width, height, 75, 250, 200, 200, 150);
_sm = new com.digito.SoundManager();
_pcm = new com.digito.ProximityCollisionManager(this, 100, 5);
_lm = new com.digito.LevelManager(this);
initScoreBar();
}
function initScoreBar() {
changeAllSpotsColor(_mBar.mBar10, 2682880);
changeAllSpotsColor(_mBar.mBar9, 5299202);
changeAllSpotsColor(_mBar.mBar8, 7915520);
changeAllSpotsColor(_mBar.mBar7, 8112896);
changeAllSpotsColor(_mBar.mBar6, 14458880);
changeAllSpotsColor(_mBar.mBar5, 15109120);
changeAllSpotsColor(_mBar.mBar4, 15756800);
changeAllSpotsColor(_mBar.mBar3, 16732416);
changeAllSpotsColor(_mBar.mBar2, 16727040);
changeAllSpotsColor(_mBar.mBar1, 16711680);
}
function changeAllSpotsColor(mc_, nColor_) {
changeSpotColor(mc_.m1, nColor_);
changeSpotColor(mc_.m2, nColor_);
changeSpotColor(mc_.m3, nColor_);
changeSpotColor(mc_.m4, nColor_);
changeSpotColor(mc_.m5, nColor_);
}
function changeSpotColor(mc_, nColor_) {
var _local1 = new Color(mc_);
_local1.setRGB(nColor_);
}
function set width(n_) {
_nSceneWidth = n_;
//return(width);
}
function get width() {
return(_nSceneWidth);
}
function set height(n_) {
_nSceneHeight = n_;
//return(height);
}
function get height() {
return(_nSceneHeight);
}
function init(sSexe_, nHead_, nBody_, nButtocks_, nFeet_) {
createMainPerson(sSexe_, nHead_, nBody_, nButtocks_, nFeet_);
initPersons();
_sm.playMusic();
addMusicGenerators();
}
function createMainPerson(sSexe_, nHead_, nBody_, nButtocks_, nFeet_) {
_sMainPersonSexe = sSexe_;
_mp = new com.digito.MainPerson(0, _sMainPersonSexe, this);
_mp.customPerson(nHead_, nBody_, nButtocks_, nFeet_);
}
function clearPersons() {
var _local2 = 1;
while (_local2 < _aPersons.length) {
com.digito.Person(_aPersons[_local2]).deletePerson();
_local2++;
}
_nTargetId = -1;
}
function initPersons() {
_aPersons = new Array();
_aTargets = new Array();
_aPersons.push(_mp);
var _local2 = _aPositions;
var _local5 = 0;
while (_local5 < _lm._nFirstPersons) {
var _local4;
if ((_local5 % 2) == 0) {
_local4 = targetSexe;
} else {
_local4 = mainSexe;
}
var _local7 = _aPersons.length;
var _local3 = Math.ceil((_local2.length - 1) * Math.random());
var _local6 = new com.digito.Person(_local7, _local4, Number(_local2[_local3][0]), Number(_local2[_local3][1]), Number(_local2[_local3][2]), this, 0);
customPerson(_local6);
if (_local3 == 0) {
_local2 = _local2.slice(1, _local2.length);
} else {
_local2 = _local2.slice(0, _local3).concat(_local2.slice(_local3 + 1, _local2.length));
}
_aPersons.push(_local6);
if (_local4 == targetSexe) {
_aTargets.push(_local7);
}
_local5++;
}
_nTargetId = -1;
setTarget();
}
function get targetSexe() {
if (_sMainPersonSexe == "m") {
return("w");
}
return("m");
}
function get mainSexe() {
return(_sMainPersonSexe);
}
function set volume(n) {
nVolume = n;
sd.setVolume(nVolume);
//return(__get__volume());
}
function get mClub() {
return(_mClub);
}
function addPerson(sSexe_, nX_, nY_, nRotation_, nPosition_) {
var _local2 = new com.digito.Person(_aPersons.length, sSexe_, nX_, nY_, nRotation_, this, nPosition_);
return(_local2);
}
function changePerson(nId_, sSexe_, nX_, nY_, nRotation_, nPosition_) {
var _local2 = new com.digito.Person(nId_, sSexe_, nX_, nY_, nRotation_, this, nPosition_);
return(_local2);
}
function get _club() {
return(_mClub);
}
function get mc() {
return(_mClub);
}
function getPersons() {
return(_aPersons);
}
function getMainPerson() {
return(_mp);
}
function get mainPerson() {
return(_mp);
}
function get targetPerson() {
return(_pTarget);
}
function setTarget() {
_pTarget.setCible(false);
var _local2;
if (_nTargetId == -1) {
_local2 = 0;
} else {
_local2 = (getTargetIndexOf(_nTargetId) + 1) % _aTargets.length;
}
_nTargetId = Number(_aTargets[_local2]);
_pTarget = _aPersons[_nTargetId];
_pTarget.setCible(true);
}
function getTargetIndexOf(_n) {
var _local2 = 0;
while (_local2 < _aTargets.length) {
if (Number(_aTargets[_local2]) == _n) {
return(_local2);
}
_local2++;
}
}
function mainPersonIsFallenInLove() {
_lm.updateTargets();
_sm.playEventMusic("snd" + _lm.__get__event());
playAnimation();
var _local4 = _zm.getRandomPosition(_mp.__get__x(), _mp.__get__y());
var _local7 = Number(_local4.x);
var _local5 = Number(_local4.y);
var _local8 = Math.round(360 * Math.random());
var _local6;
var _local3;
if (_aPersons.length < _lm._nMaxPersons) {
if (((_aPersons.length - _lm._nFirstPersons) % 3) == 0) {
_local6 = mainSexe;
_local3 = addPerson(_local6, _local7, _local5, _local8, Number(_local4.door));
} else {
_local6 = targetSexe;
_local3 = addPerson(_local6, _local7, _local5, _local8, Number(_local4.door));
_aTargets.push(_aPersons.length);
}
customPerson(_local3);
_aPersons.push(_local3);
} else {
var _local10 = _pTarget.__get__id();
var _local9 = _pTarget.__get__sexe();
_pTarget.removePerson();
_local3 = changePerson(_local10, _local9, _local7, _local5, _local8, Number(_local4.door));
customPerson(_local3);
_aPersons[_pTarget.__get__id()] = _local3;
var _local2 = 0;
while (_local2 < _aTargets.length) {
if (com.digito.Person(_aTargets[_local2]).__get__id() == _local3.__get__id()) {
_aTargets[_local2] = _local3;
}
_local2++;
}
}
}
function playAnimation() {
var _local2 = _mKissLevel.attachMovie("m" + _lm.__get__event(), "mcKiss", _mKissLevel.getNextHighestDepth());
var oManCustom;
var oWomanCustom;
if (_sMainPersonSexe == "m") {
oManCustom = _mp.getCustom();
oWomanCustom = _pTarget.getCustom();
} else {
oWomanCustom = _mp.getCustom();
oManCustom = _pTarget.getCustom();
}
_local2.SEXE = _pTarget.sexe;
_local2.mHeadW.gotoAndStop(oWomanCustom.head);
_local2.mBodyW.gotoAndStop(oWomanCustom.body);
_local2.mButtocksW.gotoAndStop(oWomanCustom.buttocks);
_local2.mLeftFootW.gotoAndStop(oWomanCustom.feet);
_local2.mRightFootW.gotoAndStop(oWomanCustom.feet);
_local2.mHeadM.gotoAndStop(oManCustom.head);
_local2.mBodyM.gotoAndStop(oManCustom.body);
_local2.mSteele.gotoAndStop(oManCustom.body);
_local2.mButtocksM.gotoAndStop(oManCustom.buttocks);
_local2.mLeftFootM.gotoAndStop(oManCustom.feet);
_local2.mRightFootM.gotoAndStop(oManCustom.feet);
var _local3;
var _local4;
if (_sMainPersonSexe == "m") {
_local3 = _mp.__get__x() - ((_mp.__get__x() - _pTarget.__get__x()) / 5);
_local4 = _mp.__get__y() - ((_mp.__get__y() - _pTarget.__get__y()) / 5);
_local2._rotation = _pTarget.__get__rotation() + 180;
} else {
_local3 = _mp.__get__x() - ((4 * (_mp.__get__x() - _pTarget.__get__x())) / 5);
_local4 = _mp.__get__y() - ((4 * (_mp.__get__y() - _pTarget.__get__y())) / 5);
_local2._rotation = _pTarget.rotation;
}
_local2._x = _local3;
_local2._y = _local4;
_mp.showDanse(false);
_mp.showWalk(false);
_pTarget.showDanse(false);
_pTarget.showWalk(false);
var self = this;
_local2.onEnterFrame = function () {
this.mHeadW.gotoAndStop(oWomanCustom.head);
this.mBodyW.gotoAndStop(oWomanCustom.body);
this.mButtocksW.gotoAndStop(oWomanCustom.buttocks);
this.mLeftFootW.gotoAndStop(oWomanCustom.feet);
this.mRightFootW.gotoAndStop(oWomanCustom.feet);
this.mHeadM.gotoAndStop(oManCustom.head);
this.mBodyM.gotoAndStop(oManCustom.body);
this.mSteele.gotoAndStop(oManCustom.body);
this.mButtocksM.gotoAndStop(oManCustom.buttocks);
this.mLeftFootM.gotoAndStop(oManCustom.feet);
this.mRightFootM.gotoAndStop(oManCustom.feet);
var _local2 = ((self._sMainPersonSexe == "m") ? (this._totalframes - 4) : (this._totalframes));
if (this._currentframe == _local2) {
delete this.onEnterFrame;
this.removeMovieClip();
self._mp._bInLove = false;
self._mp.__set__isWalking(true);
self._mp._bImpact = false;
self._mp.setWalking();
self._pTarget.showDanse(true);
self.setTarget();
self._pTarget.showWalk(false);
self._sm.playMusic();
self._lm._nMusicFrequency = Math.max(1000, self._lm._nMusicFrequency - 200);
self._lm._nMusicDecal = Math.max(1000, self._lm._nMusicDecal - 200);
}
};
}
function customPerson(p_) {
var _local5 = 1 + (Math.floor(100 * Math.random()) % _lm._nNbHeads);
var _local2 = 1 + (Math.floor(150 * Math.random()) % _lm._nNbBodies);
var _local3 = 1 + (Math.floor(175 * Math.random()) % _lm._nNbButtocks);
var _local4 = 1 + (Math.floor(230 * Math.random()) % _lm._nNbFeet);
p_.customPerson(_local5, _local2, 2, _local3, _local4);
}
function getDoor(n) {
if (n == 1) {
return(_dRight);
}
return(_dLeft);
}
function addMusicGenerators() {
var _local3 = 50;
var _local5 = _mClub._width;
var _local4 = _mClub._height;
_aMusicGenerators = new Array();
var _local2;
_local2 = new com.digito.MusicGenerator(-75, 75, "L", _mp, this);
_local2.moveMG(_local3, _nSceneHeight / 2);
_local2.tempMusic();
_aMusicGenerators.push(_local2);
_local2 = new com.digito.MusicGenerator(15, 165, "T", _mp, this);
_local2.moveMG((_nSceneWidth / 2) + 50, _local3 + 30);
_local2.moveMG((_nSceneWidth / 2) + 50, _local3 + 30);
_local2.moveMG((_nSceneWidth / 2) + 50, _local3 + 30);
_local2.moveMG((_nSceneWidth / 2) + 50, _local3 + 30);
_local2.moveMG((_nSceneWidth / 2) + 50, _local3 + 30);
_local2.tempMusic();
_aMusicGenerators.push(_local2);
_local2 = new com.digito.MusicGenerator(105, 255, "R", _mp, this);
_local2.moveMG(_nSceneWidth - _local3, _nSceneHeight / 2);
_local2.tempMusic();
_aMusicGenerators.push(_local2);
_local2 = new com.digito.MusicGenerator(195, 345, "B", _mp, this);
_local2.moveMG(_nSceneWidth / 2, _nSceneHeight - _local3);
_local2.tempMusic();
_aMusicGenerators.push(_local2);
}
function stopMusicGenerators() {
var _local2 = 0;
while (_local2 < _aMusicGenerators.length) {
com.digito.MusicGenerator(_aMusicGenerators[_local2]).stopMusicGenerator();
_local2++;
}
}
function startMusicGenerators() {
var _local2 = 0;
while (_local2 < _aMusicGenerators.length) {
com.digito.MusicGenerator(_aMusicGenerators[_local2]).startMusicGenerator();
_local2++;
}
}
function replaceMG(nWidth_, nHeight_) {
}
function get persons() {
return(_aPersons);
}
function get nbPersons() {
return(_aPersons.length);
}
var _aPositions = [[150, 320, 30], [400, 250, 150], [320, 420, 270], [480, 200, 250], [480, 420, 10], [120, 150, 30], [200, 150, 90], [400, 120, 150], [300, 300, 300], [150, 420, 320], [480, 290, 180]];
var nNbHeads = 15;
var nNbBodys = 5;
var nNbButtocks = 4;
var nNbFeet = 6;
var nVolume = 100;
var nCenterSceneX = 325;
var nCenterSceneY = 250;
var nRadiusScene = 200;
var nScore = 0;
}
Symbol 367 MovieClip [__Packages.com.digito.Person] Frame 0
class com.digito.Person
{
var _bMainPerson, _clubObject, _mClub, nId, nX, nY, nRotation, _sSexe, nCptImpacts, vDeplacement, vTempDeplacement, nTempDeplacement, sDanseType, _mBg, _mStart, _mDanseHead, _mDanseArms, _mDanseBody, _mDanseButtocks, _mDanseFeet, _mWalkHead, _mWalkArms, _mWalkBody, _mWalkButtocks, _mWalkFeet, _bInLove, oCustom, angle, lastAngle, diffAngles, signe, aAngles, speed, _nImpactRotation, _ci, _bIsWalking, nWeight;
function Person (nId_, sSexe_, nX_, nY_, nRotation_, club_, nPosition_) {
_bMainPerson = false;
_clubObject = club_;
_mClub = _clubObject._mClub;
nId = nId_;
nX = nX_;
nY = nY_;
nRotation = nRotation_;
_sSexe = sSexe_;
nCptImpacts = 0;
vDeplacement = new com.digito.utils.Vector(0, 0);
vTempDeplacement = new com.digito.utils.Vector(0, 0);
nTempDeplacement = 0;
sDanseType = "";
if (com.digito.utils.Tools.getDistance(nX_, nY_, _clubObject.nCenterSceneX, _clubObject.nCenterSceneY) > _clubObject.nRadiusScene) {
sDanseType = "2";
nRotation = com.digito.utils.Tools.getAngleTo(nX_, nY_, _clubObject.nCenterSceneX, _clubObject.nCenterSceneY);
}
if (nPosition_ == 0) {
nRotation = nRotation + 180;
_mBg = _mClub.mBgLevel.attachMovie("Bg", "mBg_" + nId_, _mClub.mBgLevel.getNextHighestDepth(), {_x:nX, _y:nY, _rotation:nRotation, _visible:false});
_mStart = _mBg.createEmptyMovieClip("_mStart", _mBg.getNextHighestDepth());
_mDanseHead = _mClub.mHeadsLevel.attachMovie(((_sSexe + "Danse") + sDanseType) + "Head", "mDanseHead_" + nId_, _mClub.mHeadsLevel.getNextHighestDepth(), {_x:nX, _y:nY, _rotation:nRotation});
_mDanseArms = _mClub.mBodiesLevel.attachMovie(((_sSexe + "Danse") + sDanseType) + "Arms", "mDanseArms_" + nId_, _mClub.mBodiesLevel.getNextHighestDepth(), {_x:nX, _y:nY, _rotation:nRotation});
_mDanseBody = _mClub.mBodiesLevel.attachMovie(((_sSexe + "Danse") + sDanseType) + "Body", "mDanseBody_" + nId_, _mClub.mBodiesLevel.getNextHighestDepth(), {_x:nX, _y:nY, _rotation:nRotation});
_mDanseButtocks = _mClub.mButtocksLevel.attachMovie(((_sSexe + "Danse") + sDanseType) + "Buttocks", "mDanseButtocks_" + nId_, _mClub.mButtocksLevel.getNextHighestDepth(), {_x:nX, _y:nY, _rotation:nRotation});
_mDanseFeet = _mClub.mFeetLevel.attachMovie(((_sSexe + "Danse") + sDanseType) + "Feet", "mDanseFeet_" + nId_, _mClub.mFeetLevel.getNextHighestDepth(), {_x:nX, _y:nY, _rotation:nRotation});
isWalking = (false);
} else {
var _local5 = _clubObject.getDoor(nPosition_);
var _local3 = _local5.__get__x();
var _local4 = _local5.__get__y();
_mBg = _mClub.mBgLevel.attachMovie("Bg", "mBg_" + nId_, _mClub.mBgLevel.getNextHighestDepth(), {_x:_local3, _y:_local4, _visible:false});
_mStart = _mBg.createEmptyMovieClip("_mStart", _mBg.getNextHighestDepth());
_mDanseHead = _mClub.mHeadsLevel.attachMovie(((_sSexe + "Danse") + sDanseType) + "Head", "mDanseHead_" + nId_, _mClub.mHeadsLevel.getNextHighestDepth(), {_x:_local3, _y:_local4});
_mDanseArms = _mClub.mBodiesLevel.attachMovie(((_sSexe + "Danse") + sDanseType) + "Arms", "mDanseArms_" + nId_, _mClub.mBodiesLevel.getNextHighestDepth(), {_x:_local3, _y:_local4});
_mDanseBody = _mClub.mBodiesLevel.attachMovie(((_sSexe + "Danse") + sDanseType) + "Body", "mDanseBody_" + nId_, _mClub.mBodiesLevel.getNextHighestDepth(), {_x:_local3, _y:_local4});
_mDanseButtocks = _mClub.mButtocksLevel.attachMovie(((_sSexe + "Danse") + sDanseType) + "Buttocks", "mDanseButtocks_" + nId_, _mClub.mButtocksLevel.getNextHighestDepth(), {_x:_local3, _y:_local4});
_mDanseFeet = _mClub.mFeetLevel.attachMovie(((_sSexe + "Danse") + sDanseType) + "Feet", "mDanseFeet_" + nId_, _mClub.mFeetLevel.getNextHighestDepth(), {_x:_local3, _y:_local4});
_mWalkHead = _mClub.mHeadsLevel.attachMovie(_sSexe + "WalkHead", "mWalkHead_" + nId_, _mClub.mHeadsLevel.getNextHighestDepth(), {_x:_local3, _y:_local4});
_mWalkArms = _mClub.mBodiesLevel.attachMovie(_sSexe + "WalkArms", "mWalkArms_" + nId_, _mClub.mBodiesLevel.getNextHighestDepth(), {_x:_local3, _y:_local4});
_mWalkBody = _mClub.mBodiesLevel.attachMovie(_sSexe + "WalkBody", "mWalkBody_" + nId_, _mClub.mBodiesLevel.getNextHighestDepth(), {_x:_local3, _y:_local4});
_mWalkButtocks = _mClub.mButtocksLevel.attachMovie(_sSexe + "WalkButtocks", "mWalkButtocks_" + nId_, _mClub.mButtocksLevel.getNextHighestDepth(), {_x:_local3, _y:_local4});
_mWalkFeet = _mClub.mFeetLevel.attachMovie(_sSexe + "WalkFeet", "mWalkFeet_" + nId_, _mClub.mFeetLevel.getNextHighestDepth(), {_x:_local3, _y:_local4});
isWalking = (true);
setWalking();
}
_bInLove = false;
}
function removePerson() {
_mDanseHead.removeMovieClip();
_mDanseBody.removeMovieClip();
_mDanseArms.removeMovieClip();
_mDanseButtocks.removeMovieClip();
_mDanseFeet.removeMovieClip();
_mWalkHead.removeMovieClip();
_mWalkArms.removeMovieClip();
_mWalkBody.removeMovieClip();
_mWalkButtocks.removeMovieClip();
_mWalkFeet.removeMovieClip();
}
function getCustom() {
return(oCustom);
}
function customPerson(nHead_, nBody_, nButtocks_, nFeet_) {
oCustom = new Object();
oCustom.head = nHead_;
oCustom.body = nBody_;
oCustom.arms = 2;
oCustom.buttocks = nButtocks_;
oCustom.feet = nFeet_;
_mDanseHead.onEnterFrame = function () {
this.mHead.gotoAndStop(nHead_);
delete this.onEnterFrame;
};
_mDanseBody.onEnterFrame = function () {
this.mBody.gotoAndStop(nBody_);
delete this.onEnterFrame;
};
_mDanseButtocks.onEnterFrame = function () {
this.mButtocks.gotoAndStop(nButtocks_);
delete this.onEnterFrame;
};
_mDanseArms.onEnterFrame = function () {
this.mRightArm.gotoAndStop(2);
this.mLeftArm.gotoAndStop(2);
delete this.onEnterFrame;
};
_mDanseFeet.onEnterFrame = function () {
this.mRightFoot.gotoAndStop(nFeet_);
this.mLeftFoot.gotoAndStop(nFeet_);
delete this.onEnterFrame;
};
_mWalkHead.onEnterFrame = function () {
this.mHead.gotoAndStop(nHead_);
delete this.onEnterFrame;
};
_mWalkBody.onEnterFrame = function () {
this.mBody.gotoAndStop(nBody_);
delete this.onEnterFrame;
};
_mWalkButtocks.onEnterFrame = function () {
this.mButtocks.gotoAndStop(nButtocks_);
delete this.onEnterFrame;
};
_mWalkArms.onEnterFrame = function () {
this.mRightArm.gotoAndStop(2);
this.mLeftArm.gotoAndStop(2);
delete this.onEnterFrame;
};
_mWalkFeet.onEnterFrame = function () {
this.mRightFoot.gotoAndStop(nFeet_);
this.mLeftFoot.gotoAndStop(nFeet_);
delete this.onEnterFrame;
};
}
function walk(x, y) {
var _local8 = _mWalkBody._x;
var _local9 = _mWalkBody._y;
angle = -Math.ceil(Math.atan((_local9 - y) / (x - _local8)) / (Math.PI/180));
if ((x - _local8) < 0) {
angle = angle + 180;
}
angle = angle + 360;
angle = angle % 360;
lastAngle = _mWalkBody._rotation;
if (_mWalkBody._rotation < 0) {
lastAngle = lastAngle + 360;
lastAngle = lastAngle % 360;
}
diffAngles = angle - lastAngle;
if (diffAngles < 0) {
if (diffAngles < -180) {
diffAngles = diffAngles + 360;
signe = 1;
} else {
signe = -1;
}
} else if (diffAngles > 180) {
diffAngles = diffAngles - 360;
signe = -1;
} else {
signe = 1;
}
diffAngles = Math.abs(diffAngles % 360);
aAngles = new Array();
var _local5 = 0;
while (_local5 < Math.floor(diffAngles / ssAngle)) {
aAngles.unshift(ssAngle);
_local5++;
}
var _local14 = diffAngles % ssAngle;
aAngles.unshift(_local14);
if (!_bInLove) {
var _local3 = 0;
while (_local3 < aAngles.length) {
lastAngle = lastAngle + (signe * aAngles[_local3]);
rotatePerson(lastAngle);
var _local4 = Math.ceil(Math.sqrt(((x - _local8) * (x - _local8)) + ((_local9 - y) * (_local9 - y))));
if (_local4 < distMin) {
speed = speedMin;
} else if (_local4 > distMax) {
speed = speedMax;
} else {
speed = (((_local4 - distMin) * (speedMax - speedMin)) / (distMax - distMin)) + speedMin;
}
var _local12 = false;
var _local13 = _clubObject.getPersons();
var _local7 = com.digito.utils.Tools.round10(speed * Math.cos((angle * Math.PI) / 180));
var _local6 = com.digito.utils.Tools.round10(speed * Math.sin((angle * Math.PI) / 180));
if (!_bImpact) {
if (_mWalkBody.hitTest(_root._xmouse, _root._ymouse, 1)) {
isWalking = (false);
vDeplacement.__set__x(0);
vDeplacement.__set__y(0);
} else {
isWalking = (true);
vDeplacement.__set__x(_local7);
vDeplacement.__set__y(_local6);
}
} else if (!_bElect) {
new com.digito.PersonImpact(this, _nImpactRotation);
_ci.changeCpt(1);
_root.tfSurdite.text = _ci.nCpt;
_clubObject._lm.updateLife();
}
_local3++;
}
} else {
vDeplacement.setVectorNull();
isWalking = (false);
_clubObject.mainPersonIsFallenInLove();
}
}
function setWalking() {
var __self = this;
_mStart.onEnterFrame = function () {
__self.walk(__self.nX, __self.nY);
if ((Math.abs(__self.nX - __self._mWalkBody._x) < 10) && (Math.abs(__self.nY - __self._mWalkBody._y) < 10)) {
delete this.onEnterFrame;
__self.__set__isWalking(false);
__self.rotatePerson(__self.nRotation);
__self._mWalkHead.removeMovieClip();
__self._mWalkArms.removeMovieClip();
__self._mWalkBody.removeMovieClip();
__self._mWalkButtocks.removeMovieClip();
__self._mWalkFeet.removeMovieClip();
}
};
}
function showDanse(b) {
_mDanseHead._visible = b;
_mDanseBody._visible = b;
_mDanseArms._visible = b;
_mDanseButtocks._visible = b;
_mDanseFeet._visible = b;
}
function showWalk(b) {
_mWalkHead._visible = b;
_mWalkBody._visible = b;
_mWalkArms._visible = b;
_mWalkButtocks._visible = b;
_mWalkFeet._visible = b;
}
function set isWalking(bBalue_) {
_bIsWalking = bBalue_;
showDanse(!_bIsWalking);
showWalk(_bIsWalking);
//return(isWalking);
}
function get isWalking() {
return(_bIsWalking);
}
function rotatePerson(nRotation_) {
_mWalkHead._rotation = nRotation_ + 180;
_mWalkBody._rotation = nRotation_ + 180;
_mWalkArms._rotation = nRotation_ + 180;
_mWalkButtocks._rotation = nRotation_ + 180;
_mWalkFeet._rotation = nRotation_ + 180;
_mDanseHead._rotation = nRotation_ + 180;
_mDanseBody._rotation = nRotation_ + 180;
_mDanseArms._rotation = nRotation_ + 180;
_mDanseButtocks._rotation = nRotation_ + 180;
_mDanseFeet._rotation = nRotation_ + 180;
_mBg._rotation = nRotation_ + 180;
}
function addRotation(nRotation_) {
_mWalkHead._rotation = _mWalkHead._rotation + nRotation_;
_mWalkBody._rotation = _mWalkBody._rotation + nRotation_;
_mWalkArms._rotation = _mWalkArms._rotation + nRotation_;
_mWalkButtocks._rotation = _mWalkButtocks._rotation + nRotation_;
_mWalkFeet._rotation = _mWalkFeet._rotation + nRotation_;
_mDanseHead._rotation = _mDanseHead._rotation + nRotation_;
_mDanseBody._rotation = _mDanseBody._rotation + nRotation_;
_mDanseArms._rotation = _mDanseArms._rotation + nRotation_;
_mDanseButtocks._rotation = _mDanseButtocks._rotation + nRotation_;
_mDanseFeet._rotation = _mDanseFeet._rotation + nRotation_;
_mBg._rotation = _mBg._rotation + nRotation_;
}
function getRotation() {
var _local2 = _mDanseHead._rotation;
return(((_local2 >= 180) ? (_local2) : (360 + _local2)));
}
function movePerson(nX_, nY_) {
_mWalkHead._x = nX_;
_mWalkHead._y = nY_;
_mWalkBody._x = nX_;
_mWalkBody._y = nY_;
_mWalkArms._x = nX_;
_mWalkArms._y = nY_;
_mWalkButtocks._x = nX_;
_mWalkButtocks._y = nY_;
_mWalkFeet._x = nX_;
_mWalkFeet._y = nY_;
_mDanseHead._x = nX_;
_mDanseHead._y = nY_;
_mDanseBody._x = nX_;
_mDanseBody._y = nY_;
_mDanseArms._x = nX_;
_mDanseArms._y = nY_;
_mDanseButtocks._x = nX_;
_mDanseButtocks._y = nY_;
_mDanseFeet._x = nX_;
_mDanseFeet._y = nY_;
_mBg._x = nX_;
_mBg._y = nY_;
}
function getBody() {
return(_mBg);
}
function get weight() {
return(nWeight);
}
function setImpact(bImpact_, nRotation_) {
_bImpact = bImpact_;
_nImpactRotation = nRotation_;
}
function setCible(b) {
if (b) {
var __self = this;
_mBg.onEnterFrame = function () {
var _local4 = __self._clubObject.getMainPerson().getBody();
var _local3 = __self.getBody();
var _local7 = _local4._x;
var _local9 = _local4._y;
var _local6 = _local3._x;
var _local8 = _local3._y;
var _local5 = -Math.ceil(Math.atan((_local8 - _local9) / (_local7 - _local6)) / (Math.PI/180));
if ((_local7 - _local6) < 0) {
_local5 = _local5 + 180;
}
__self.rotatePerson(_local5);
var _local2 = __self._clubObject.getMainPerson().getBody();
var _local10 = Math.sqrt(((_local2._x - this._x) * (_local2._x - this._x)) + ((_local2._y - this._y) * (_local2._y - this._y)));
if (_local10 < 80) {
__self._clubObject.__get__mainPerson()._bInLove = true;
__self._clubObject._nLoveNumber++;
delete this.onEnterFrame;
}
};
} else {
delete _mWalkHead.onEnterFrame;
}
}
function getHeadMc() {
if (isWalking) {
return(_mWalkHead);
}
return(_mDanseHead);
}
function setCptImpact(ci_) {
_ci = ci_;
}
function get deplacement() {
return(vDeplacement);
}
function get vx() {
return(vDeplacement.__get__x());
}
function get vy() {
return(vDeplacement.__get__y());
}
function get px() {
return(_mBg._x);
}
function get py() {
return(_mBg._y);
}
function set px(nX_) {
var _local2 = Math.max(nX_, _clubObject._zm._nLeftMargin / 2);
_local2 = Math.min(_local2, _clubObject.__get__width() - (_clubObject._zm._nRightMargin / 2));
_mWalkHead._x = _local2;
_mWalkBody._x = _local2;
_mWalkArms._x = _local2;
_mWalkButtocks._x = _local2;
_mWalkFeet._x = _local2;
_mDanseHead._x = _local2;
_mDanseBody._x = _local2;
_mDanseArms._x = _local2;
_mDanseButtocks._x = _local2;
_mDanseFeet._x = _local2;
_mBg._x = _local2;
//return(px);
}
function set py(nY_) {
var _local2 = Math.max(nY_, _clubObject._zm._nTopMargin / 2);
_local2 = Math.min(_local2, _clubObject.__get__height() - (_clubObject._zm._nBottomMargin / 2));
_mWalkHead._y = _local2;
_mWalkBody._y = _local2;
_mWalkArms._y = _local2;
_mWalkButtocks._y = _local2;
_mWalkFeet._y = _local2;
_mDanseHead._y = _local2;
_mDanseBody._y = _local2;
_mDanseArms._y = _local2;
_mDanseButtocks._y = _local2;
_mDanseFeet._y = _local2;
_mBg._y = _local2;
//return(py);
}
function deplacePerson(nDeplacementX_, nDeplacementY_) {
px = (px + nDeplacementX_);
py = (py + nDeplacementY_);
}
function get id() {
return(nId);
}
function get sexe() {
return(_sSexe);
}
function get x() {
return(_mBg._x);
}
function get y() {
return(_mBg._y);
}
function get rotation() {
return(_mBg._rotation);
}
function deletePerson() {
_mDanseHead.removeMovieClip();
_mDanseBody.removeMovieClip();
_mDanseArms.removeMovieClip();
_mDanseButtocks.removeMovieClip();
_mDanseFeet.removeMovieClip();
_mWalkHead.removeMovieClip();
_mWalkBody.removeMovieClip();
_mWalkArms.removeMovieClip();
_mWalkButtocks.removeMovieClip();
_mWalkFeet.removeMovieClip();
_mBg.removeMovieClip();
_mStart.removeMovieClip();
}
var _bImpact = false;
var _bElect = false;
var speedMax = 20;
var speedMin = 10;
var distMax = 400;
var distMin = 50;
var resistance = 10;
var ssAngle = 10;
}
Symbol 368 MovieClip [__Packages.com.digito.utils.Vector] Frame 0
class com.digito.utils.Vector
{
var nX, nY;
function Vector (nX_, nY_) {
nX = nX_;
nY = nY_;
}
static function addition(v1_, v2_) {
return(new com.digito.utils.Vector(v1_.__get__x() + v2_.__get__x(), v1_.__get__y() + v2_.__get__y()));
}
static function scale(v_, n_) {
return(new com.digito.utils.Vector(n_ * v_.__get__x(), n_ * v_.__get__y()));
}
function isVectorNull() {
return((nX == 0) && (nY == 0));
}
function setVectorNull() {
nX = (nY = 0);
}
function get x() {
return(nX);
}
function set x(nX_) {
nX = nX_;
//return(x);
}
function get y() {
return(nY);
}
function set y(nY_) {
nY = nY_;
//return(y);
}
function toString() {
return(((("(" + nX) + ",") + nY) + ")");
}
}
Symbol 369 MovieClip [__Packages.com.digito.CptImpacts] Frame 0
class com.digito.CptImpacts
{
var p, nCpt;
function CptImpacts (p_) {
p = p_;
nCpt = 0;
}
function changeCpt(n) {
var _local2 = new Sound();
_local2.attachSound("mp3Impact");
_local2.start();
_local2.onSoundComplete = function () {
};
nCpt = nCpt + n;
}
}
Symbol 370 MovieClip [__Packages.com.digito.utils.Tools] Frame 0
class com.digito.utils.Tools
{
function Tools () {
}
static function round10(n_) {
return(Math.round(n_ * 10) / 10);
}
static function getDistance(nX1_, nY1_, nX2_, nY2_) {
var _local1 = Math.sqrt(Math.pow(nX1_ - nX2_, 2) + Math.pow(nY1_ - nY2_, 2));
return(Math.round(_local1 * 10) / 10);
}
static function getAngleTo(nX1_, nY1_, nX2_, nY2_) {
var _local1 = -Math.ceil(Math.atan((nY2_ - nY1_) / (nX1_ - nX2_)) / (Math.PI/180));
if ((nX1_ - nX2_) > 0) {
_local1 = _local1 + 180;
}
return(_local1);
}
static function getVectors(xP1, yP1, V1, xP2, yP2, V2) {
var _local1;
var _local4;
_local1 = (yP1 - yP2) / (xP1 - xP2);
_local4 = yP1 - ((xP1 * (yP1 - yP2)) / (xP1 - xP2));
var _local13;
var _local10;
_local13 = xP1 + V1.__get__x();
_local10 = yP1 + V1.__get__y();
var _local29;
_local29 = _local10 + (_local13 / _local1);
var _local11;
var _local19;
_local11 = (_local1 * (_local29 - _local4)) / (Math.pow(_local1, 2) + 1);
_local19 = (_local1 * _local11) + _local4;
var _local24;
_local24 = new com.digito.utils.Vector(round10(_local11 - xP1), round10(_local19 - yP1));
var _local15;
_local15 = _local10 - (_local1 * _local13);
var _local25;
_local25 = yP1 + (xP1 / _local1);
var _local17;
var _local27;
_local17 = (_local1 * (_local25 - _local15)) / (Math.pow(_local1, 2) + 1);
_local27 = (_local1 * _local17) + _local15;
var _local31;
_local31 = new com.digito.utils.Vector(round10(_local17 - xP1), round10(_local27 - yP1));
var _local12;
var _local8;
_local12 = xP2 + V2.__get__x();
_local8 = yP2 + V2.__get__y();
var _local28;
_local28 = _local8 + (_local12 / _local1);
var _local9;
var _local18;
_local9 = (_local1 * (_local28 - _local4)) / (Math.pow(_local1, 2) + 1);
_local18 = (_local1 * _local9) + _local4;
var _local22;
_local22 = new com.digito.utils.Vector(round10(_local9 - xP2), round10(_local18 - yP2));
var _local14;
_local14 = _local8 - (_local1 * _local12);
var _local23;
_local23 = yP2 + (xP2 / _local1);
var _local16;
var _local26;
_local16 = (_local1 * (_local23 - _local14)) / (Math.pow(_local1, 2) + 1);
_local26 = (_local1 * _local16) + _local14;
var _local30;
_local30 = new com.digito.utils.Vector(round10(_local16 - xP2), round10(_local26 - yP2));
var _local21;
var _local20;
_local21 = com.digito.utils.Vector.addition(_local31, _local22);
_local20 = com.digito.utils.Vector.addition(_local30, _local24);
var _local7 = new Object();
_local7.Vr1 = _local21;
_local7.Vr2 = _local20;
return(_local7);
}
static function testCollision(xP1, yP1, V, xP2, yP2) {
var _local12 = new com.digito.utils.Vector(round10(V.__get__x()), round10(V.__get__y()));
var _local2 = round10((yP1 - yP2) / (xP1 - xP2));
var _local15 = round10(yP1 - (_local2 * xP1));
var _local1 = round10(-1 / _local2);
var _local6 = yP1 + (xP1 / _local2);
var _local4 = round10(xP1 + _local12.__get__x());
var _local5 = round10(yP1 + _local12.__get__y());
var _local3 = round10((_local5 - yP2) / (_local4 - xP2));
var _local13 = round10(_local5 - (_local3 * _local4));
if (_local1 == _local3) {
return(false);
}
var _local7 = round10((_local13 - _local6) / (_local1 - _local3));
var _local14 = round10((_local1 * _local7) + _local6);
return(getDistance(xP2, yP2, _local7, _local14) < getDistance(xP2, yP2, _local4, _local5));
}
static function dateToString(d) {
var _local4 = d.getFullYear().toString();
var _local5 = (((d.getMonth() + 1) < 10) ? ("0" + (d.getMonth() + 1)) : ((d.getMonth() + 1).toString()));
var _local3 = ((d.getDay() < 10) ? ("0" + d.getDay()) : (d.getDay().toString()));
var _local2 = ((d.getHours() < 10) ? ("0" + d.getHours()) : (d.getHours().toString()));
var _local6 = ((d.getMinutes() < 10) ? ("0" + d.getMinutes()) : (d.getMinutes().toString()));
return((((((((_local3 + "/") + _local5) + "/") + _local4) + " ") + _local2) + ":") + _local6);
}
}
Symbol 371 MovieClip [__Packages.com.digito.Door] Frame 0
class com.digito.Door
{
var nX, nY;
function Door (nX_, nY_) {
nX = nX_;
nY = nY_;
}
function get x() {
return(nX);
}
function get y() {
return(nY);
}
}
Symbol 372 MovieClip [__Packages.com.digito.PersonImpact] Frame 0
class com.digito.PersonImpact
{
var p;
function PersonImpact (p_, nRotation_) {
p = p_;
p._bElect = true;
var _local2 = p_._mClub.attachMovie("mElect", "mElect", p._mClub.getNextHighestDepth());
_local2._x = p._mWalkHead._x;
_local2._y = p._mWalkHead._y;
_local2._rotation = nRotation_;
_local2._xscale = 60;
_local2._yscale = 60;
_local2.play();
var _local3 = new Sound();
_local3.attachSound("mp3Impact");
_local3.start();
_local3.onSoundComplete = function () {
};
var self = this;
_local2.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.gotoAndStop(1);
this.removeMovieClip();
self.p._bElect = false;
self.p._bImpact = false;
}
};
}
}
Symbol 373 MovieClip [__Packages.com.digito.MainPerson] Frame 0
class com.digito.MainPerson extends com.digito.Person
{
var _bMainPerson, _mClub;
function MainPerson (nId_, sSexe_, club_) {
super(nId_, sSexe_, 0, 0, 0, club_, 2);
_bMainPerson = true;
}
function setWalking() {
var __self = this;
_mClub.onEnterFrame = function () {
if (!__self._bInLove) {
__self.walk(this._xmouse, this._ymouse);
} else {
delete this.onEnterFrame;
__self.walk(this._xmouse, this._ymouse);
}
};
}
}
Symbol 374 MovieClip [__Packages.com.digito.SoundManager] Frame 0
class com.digito.SoundManager
{
var _nCurrentSound, _aSounds, _sEventSound;
function SoundManager () {
_nCurrentSound = 0;
_aSounds = new Array();
var _local3 = 0;
while (_local3 < _aSoundNames.length) {
var _local4 = new Object();
var _local2 = new Sound();
_local2.attachSound(_aSoundNames[_local3]);
_local2.setVolume(100);
var self = this;
_local2.onSoundComplete = function () {
self._nCurrentSound = (self._nCurrentSound + 1) % self._aSounds.length;
Sound(self._aSounds[self._nCurrentSound]).start(0, 2);
};
_aSounds.push(_local2);
_local3++;
}
_sEventSound = new Sound();
}
function playMusic() {
Sound(_aSounds[_nCurrentSound]).setVolume(100);
Sound(_aSounds[_nCurrentSound]).start(0, 2);
}
function stopMusic() {
Sound(_aSounds[_nCurrentSound]).stop(_aSoundNames[_nCurrentSound]);
}
function playEventMusic(sName_) {
stopMusic();
_sEventSound = new Sound();
_sEventSound.attachSound(sName_);
_sEventSound.setVolume(50);
_sEventSound.start(0, 1);
}
var _aSoundNames = ["sndFond1", "sndFond2", "sndFond4", "sndFond5"];
}
Symbol 375 MovieClip [__Packages.com.digito.ZoneManager] Frame 0
class com.digito.ZoneManager
{
var _nTopMargin, _nRightMargin, _nBottomMargin, _nLeftMargin, zNO_test, zNE_test, zSO_test, zSE_test, zNO_res, zNE_res, zSO_res, zSE_res, aZones, sLastZone, aZonesCibles;
function ZoneManager (nW_, nH_, nMargin_, nTopMargin_, nRightMargin_, nBottomMargin_, nLeftMargin_) {
_nTopMargin = nTopMargin_;
_nRightMargin = nRightMargin_;
_nBottomMargin = nBottomMargin_;
_nLeftMargin = nLeftMargin_;
zNO_test = new com.digito.Zone(0, nW_ / 2, 0, nH_ / 2);
zNE_test = new com.digito.Zone(nW_ / 2, nW_, 0, nH_ / 2);
zSO_test = new com.digito.Zone(0, nW_ / 2, nH_ / 2, nH_);
zSE_test = new com.digito.Zone(nW_ / 2, nW_, nH_ / 2, nH_);
zNO_res = new com.digito.Zone(nLeftMargin_, (nW_ / 2) - nMargin_, nTopMargin_, (nH_ / 2) - nMargin_);
zNE_res = new com.digito.Zone((nW_ / 2) + nMargin_, nW_ - nRightMargin_, nTopMargin_, (nH_ / 2) - nMargin_);
zSO_res = new com.digito.Zone(nLeftMargin_, (nW_ / 2) - nMargin_, (nH_ / 2) + nMargin_, nH_ - nBottomMargin_);
zSE_res = new com.digito.Zone((nW_ / 2) + nMargin_, nW_ - nRightMargin_, (nH_ / 2) + nMargin_, nH_ - nBottomMargin_);
aZones = [zNO_res, zNE_res, zSO_res, zSE_res];
sLastZone = "";
}
function getRandomPosition(nX_, nY_) {
var _local4 = new Object();
var _local8 = Math.floor(Math.random() * 3);
aZonesCibles = new Array();
var _local3;
var _local2;
var _local7;
if (zNO_test.isIn(nX_, nY_)) {
switch (sLastZone) {
case "SE" :
aZonesCibles = [1, 2];
break;
case "NE" :
aZonesCibles = [2, 3];
break;
case "SO" :
aZonesCibles = [1, 3];
break;
default :
aZonesCibles = [1, 2, 3];
}
_local8 = Math.floor(Math.random() * aZonesCibles.length);
_local3 = aZonesCibles[_local8];
switch (_local3) {
case 0 :
sLastZone = "NO";
break;
case 1 :
sLastZone = "NE";
_local2 = 1;
break;
case 2 :
sLastZone = "SO";
_local2 = 2;
break;
case 3 :
sLastZone = "SE";
_local2 = 1;
}
}
if (zSO_test.isIn(nX_, nY_)) {
switch (sLastZone) {
case "SE" :
aZonesCibles = [0, 1];
break;
case "NE" :
aZonesCibles = [0, 3];
break;
case "NO" :
aZonesCibles = [1, 3];
break;
default :
aZonesCibles = [0, 1, 3];
}
_local8 = Math.floor(Math.random() * aZonesCibles.length);
_local3 = aZonesCibles[_local8];
switch (_local3) {
case 0 :
sLastZone = "NO";
_local2 = 1;
break;
case 1 :
sLastZone = "NE";
_local2 = 1;
break;
case 2 :
sLastZone = "SO";
break;
case 3 :
sLastZone = "SE";
_local2 = 1;
}
}
if (zNE_test.isIn(nX_, nY_)) {
switch (sLastZone) {
case "SE" :
aZonesCibles = [0, 2];
break;
case "SO" :
aZonesCibles = [0, 3];
break;
case "NO" :
aZonesCibles = [2, 3];
break;
default :
aZonesCibles = [0, 2, 3];
}
_local8 = Math.floor(Math.random() * aZonesCibles.length);
_local3 = aZonesCibles[_local8];
switch (_local3) {
case 0 :
sLastZone = "NO";
_local2 = 2;
break;
case 1 :
sLastZone = "NE";
break;
case 2 :
sLastZone = "SO";
_local2 = 2;
break;
case 3 :
sLastZone = "SE";
_local2 = 2;
}
}
if (zSE_test.isIn(nX_, nY_)) {
switch (sLastZone) {
case "NE" :
aZonesCibles = [0, 2];
break;
case "SO" :
aZonesCibles = [0, 1];
break;
case "NO" :
aZonesCibles = [1, 2];
break;
default :
aZonesCibles = [0, 1, 2];
}
_local8 = Math.floor(Math.random() * aZonesCibles.length);
_local3 = aZonesCibles[_local8];
switch (_local3) {
case 0 :
sLastZone = "NO";
_local2 = 2;
break;
case 1 :
sLastZone = "NE";
_local2 = 1;
break;
case 2 :
sLastZone = "SO";
_local2 = 2;
break;
case 3 :
sLastZone = "SE";
}
}
_local7 = com.digito.Zone(aZones[_local3]);
_local4.x = _local7.getX(nX_, nY_);
_local4.y = _local7.getY(nX_, nY_);
_local4.door = _local2;
return(_local4);
}
}
Symbol 376 MovieClip [__Packages.com.digito.Zone] Frame 0
class com.digito.Zone
{
var nMinX, nMaxX, nMinY, nMaxY;
function Zone (nMinX_, nMaxX_, nMinY_, nMaxY_) {
nMinX = nMinX_;
nMaxX = nMaxX_;
nMinY = nMinY_;
nMaxY = nMaxY_;
}
function getX() {
return(nMinX + Math.ceil((nMaxX - nMinX) * Math.random()));
}
function getY() {
return(nMinY + Math.ceil((nMaxY - nMinY) * Math.random()));
}
function isIn(nX_, nY_) {
return((((nX_ >= nMinX) && (nX_ <= nMaxX)) && (nY_ >= nMinY)) && (nY_ <= nMaxY));
}
function drawZone(mc_, nId_) {
var _local2 = mc_.createEmptyMovieClip("mZone" + nId_, mc_.getNextHighestDepth());
_local2.lineStyle(0, 0, 100);
_local2.beginFill(16711680, 50);
_local2.moveTo(nMinX, nMinY);
_local2.lineTo(nMaxX, nMinY);
_local2.lineTo(nMaxX, nMaxY);
_local2.lineTo(nMinX, nMaxY);
_local2.lineTo(nMinX, nMinY);
_local2.endFill();
}
}
Symbol 377 MovieClip [__Packages.com.digito.ProximityCollisionManager] Frame 0
class com.digito.ProximityCollisionManager
{
var _c, _nGridSize, _nParts, _aProximity, _mListener, aVecteursDeplacement, aVecteursNb;
function ProximityCollisionManager (c_, nGridSize_, nParts_) {
_c = c_;
_nGridSize = nGridSize_;
_nParts = nParts_;
_aProximity = new Array();
_mListener = _c.__get__mc().createEmptyMovieClip("mListener", _c.__get__mc().getNextHighestDepth());
aVecteursDeplacement = new Array();
aVecteursNb = new Array();
startCollisionDetection();
}
function startCollisionDetection() {
var pcm = this;
_mListener.onEnterFrame = function () {
var _local4 = 0;
while (_local4 < pcm._nParts) {
var _local3 = 0;
while (_local3 < pcm._c.__get__nbPersons()) {
var _local5 = pcm.getPerson(_local3);
if (!_local5.__get__deplacement().isVectorNull()) {
var _local2 = Math.round((10 * _local5.__get__vx()) / pcm._nParts) / 10;
var _local1 = Math.round((10 * _local5.__get__vy()) / pcm._nParts) / 10;
_local5.deplacePerson(_local2, _local1);
}
_local3++;
}
pcm.refresh();
_local3 = 0;
while (_local3 < pcm._c.__get__nbPersons()) {
pcm.checkCollisions(_local3);
_local3++;
}
_local3 = 0;
while (_local3 < pcm._c.__get__nbPersons()) {
if (!com.digito.utils.Vector(pcm.aVecteursDeplacement[_local3]).isVectorNull()) {
com.digito.Person(pcm.getPerson(_local3)).vDeplacement = com.digito.utils.Vector.scale(com.digito.utils.Vector(pcm.aVecteursDeplacement[_local3]), 1 / Number(pcm.aVecteursNb[_local3]));
}
pcm.aVecteursDeplacement[_local3] = new com.digito.utils.Vector(0, 0);
pcm.aVecteursNb[_local3] = 0;
_local3++;
}
_local4++;
}
var _local3 = 0;
while (_local3 < pcm._c.__get__nbPersons()) {
var _local5 = pcm.getPerson(_local3);
_local5.vDeplacement.setVectorNull();
_local3++;
}
};
}
function stopCollisionDetection() {
delete _mListener.onEnterFrame;
}
function checkCollisions(j) {
var _local3 = getPerson(j);
var _local9 = getNeighbours(_local3);
var _local6 = 0;
while (_local6 < _local9.length) {
var _local2 = com.digito.Person(_local9[_local6]);
if (_local3.__get__id() < _local2.__get__id()) {
if (com.digito.utils.Tools.getDistance(_local3.__get__px(), _local3.__get__py(), _local2.__get__px(), _local2.__get__py()) < 70) {
var _local8 = false;
_local8 = !com.digito.utils.Tools.testCollision(_local2.__get__px(), _local2.__get__py(), _local2.vDeplacement, _local3.__get__px(), _local3.__get__py());
if (_local8) {
var _local7 = com.digito.utils.Tools.getVectors(_local3.__get__px(), _local3.__get__py(), _local3.vDeplacement, _local2.__get__px(), _local2.__get__py(), _local2.vDeplacement);
var _local4 = _local3.__get__id();
var _local5 = _local2.__get__id();
aVecteursDeplacement[_local4] = com.digito.utils.Vector.addition(com.digito.utils.Vector(aVecteursDeplacement[_local4]), _local7.Vr1);
aVecteursDeplacement[_local5] = com.digito.utils.Vector.addition(com.digito.utils.Vector(aVecteursDeplacement[_local5]), _local7.Vr2);
aVecteursNb[_local4] = aVecteursNb[_local4] + 1;
aVecteursNb[_local5] = aVecteursNb[_local5] + 1;
}
}
}
_local6++;
}
}
function getPerson(n_) {
return(com.digito.Person(_c.__get__persons()[n_]));
}
function getNeighbours(pPerson_) {
var _local4 = Math.ceil(pPerson_.__get__x() / _nGridSize);
var _local3 = Math.ceil(pPerson_.__get__y() / _nGridSize);
var _local2 = _aProximity[_local4][_local3];
if (_aProximity[_local4 - 1][_local3 - 1]) {
_local2 = _local2.concat(_aProximity[_local4 - 1][_local3 - 1]);
}
if (_aProximity[_local4][_local3 - 1]) {
_local2 = _local2.concat(_aProximity[_local4][_local3 - 1]);
}
if (_aProximity[_local4 + 1][_local3 - 1]) {
_local2 = _local2.concat(_aProximity[_local4 + 1][_local3 - 1]);
}
if (_aProximity[_local4 - 1][_local3]) {
_local2 = _local2.concat(_aProximity[_local4 - 1][_local3]);
}
if (_aProximity[_local4 + 1][_local3]) {
_local2 = _local2.concat(_aProximity[_local4 + 1][_local3]);
}
if (_aProximity[_local4 - 1][_local3 + 1]) {
_local2 = _local2.concat(_aProximity[_local4 - 1][_local3 + 1]);
}
if (_aProximity[_local4][_local3 + 1]) {
_local2 = _local2.concat(_aProximity[_local4][_local3 + 1]);
}
if (_aProximity[_local4 + 1][_local3 + 1]) {
_local2 = _local2.concat(_aProximity[_local4 + 1][_local3 + 1]);
}
return(_local2);
}
function refresh() {
_aProximity = new Array();
var _local5 = _c.__get__persons().length;
while (_local5--) {
var _local3 = _c.__get__persons()[_local5];
var _local2 = Math.ceil(_local3.__get__x() / _nGridSize);
var _local4 = Math.ceil(_local3.__get__y() / _nGridSize);
if (!_aProximity[_local2]) {
_aProximity[_local2] = [];
}
if (!_aProximity[_local2][_local4]) {
_aProximity[_local2][_local4] = [_local3];
continue;
}
_aProximity[_local2][_local4].push(_local3);
}
}
function removeProxyCollisionManager() {
stopCollisionDetection();
_mListener.removeMovieClip();
}
}
Symbol 378 MovieClip [__Packages.com.digito.LevelManager] Frame 0
class com.digito.LevelManager
{
var _c, _nLife, _nScore, _nLevel, _nFirstPersons, _nTotalTargets, _nTotalPersons, _nCurrentTargets, _nMaxPersons, _nUsedHeads, _nIndexHeads, _nMusicSpeed, _nMusicFrequency, _nMusicDecal;
function LevelManager (c_) {
_c = c_;
_nLife = 10;
_nScore = 0;
_c._mLife.tValue.text = _nLife;
_c._mMeet.tValue.text = _nScore;
_nLevel = 1;
_nFirstPersons = 7;
_nTotalTargets = 12;
_nTotalPersons = _nFirstPersons;
_nCurrentTargets = 0;
_nMaxPersons = 7;
_nUsedHeads = 10;
_nIndexHeads = 1;
_nMusicSpeed = 200;
_nMusicFrequency = 3000;
_nMusicDecal = 3000;
}
function changeLevel() {
_nLevel++;
_nTotalTargets = _nTotalTargets + 1;
_nCurrentTargets = 0;
_nIndexHeads++;
_nUsedHeads++;
_c.stopMusicGenerators();
_nMusicSpeed = _nMusicSpeed + 0;
_nMusicFrequency = Math.max(250, _nMusicFrequency - 100);
_nMusicDecal = Math.max(0, _nMusicDecal - 100);
if (_nLife != 0) {
_c._tfLevel.text = "Niveau " + _nLevel;
_c._tfLevel._visible = true;
var _local2 = new mx.transitions.Tween(_c._mLevel, "_alpha", mx.transitions.easing.None.easeNone, 0, 100, 1, true);
var self = this;
_local2.onMotionStopped = function () {
self.startNewLevel();
};
}
}
function startNewLevel() {
_c.clearPersons();
_c.initPersons();
_c._mp.__set__px(0);
_c._mp.__set__py(0);
var _local2 = new mx.transitions.Tween(_c._mLevel, "_alpha", mx.transitions.easing.None.easeNone, 100, 0, 1, true);
var self = this;
_local2.onMotionStopped = function () {
self.stopNewLevel();
};
}
function stopNewLevel() {
_c._mp._bInLove = false;
_c._mp.__set__isWalking(true);
_c._mp._bImpact = false;
_c._mp.setWalking();
_c._tfLevel._visible = false;
_c.startMusicGenerators();
_c._sm.playMusic();
}
function gameOver() {
_c.clearPersons();
}
function get event() {
if ((_nScore % 10) != 0) {
return("Action0");
}
switch (_nScore) {
case 10 :
return("Action1");
case 20 :
return("Action2");
}
return("Action3");
}
function updateTargets() {
_nCurrentTargets++;
_nTotalPersons++;
_nScore++;
_c._mMeet.tValue.text = _nScore;
}
function updateLife() {
var nCpt = 0;
var nLastBar = 0;
_c._mBar["mBar" + _nLife].onEnterFrame = function () {
nCpt++;
this.m1._visible = false;
if (nCpt == 2) {
this.m1._visible = false;
}
if (nCpt == 4) {
this.m2._visible = false;
}
if (nCpt == 6) {
this.m3._visible = false;
}
if (nCpt == 8) {
this.m4._visible = false;
delete this.onEnterFrame;
}
};
_nLife--;
_c._mLife.tValue.text = _nLife;
if (_nLife == 1) {
_c._mBar.mBar1.onEnterFrame = function () {
if (nLastBar > 8) {
this._visible = (nLastBar % 4) < 2;
}
nLastBar++;
};
}
if (_nLife == 0) {
_c._mLife.mSurditeValue._alpha = 100;
var mBtnReplay = _root.createEmptyMovieClip("mBtnReplay", 10);
mBtnReplay._x = 0;
mBtnReplay._y = 0;
with (mBtnReplay) {
beginFill(1044480, 0);
moveTo(0, 0);
lineTo(Stage.width, 0);
lineTo(Stage.width, Stage.height);
lineTo(0, Stage.height);
lineTo(0, 0);
endFill();
}
mBtnReplay.onRelease = function () {
this.removeMovieClip();
_root.mSortir.removeMovieClip();
_root.gotoAndPlay(4);
};
var mSortir = _root.attachMovie("mSortir", "mSortir", _root.getNextHighestDepth());
mSortir._x = Stage.width / 2;
mSortir._y = Stage.height / 2;
_c.stopMusicGenerators();
_c._tfLevel._visible = true;
var t = (new mx.transitions.Tween(_c._mLevel, "_alpha", mx.transitions.easing.None.easeNone, 0, 100, 1, true));
var self = this;
t.onMotionStopped = function () {
self.gameOver();
};
}
}
var _nNbHeads = 10;
var _nNbBodies = 5;
var _nNbButtocks = 4;
var _nNbFeet = 6;
}
Symbol 379 MovieClip [__Packages.com.digito.MusicGenerator] Frame 0
class com.digito.MusicGenerator
{
var c, mParent, mMusic, mp, nAngle1, nAngle2, nCpt, bContinue, nDistance;
function MusicGenerator (nAngle1_, nAngle2_, sId_, mp_, c_) {
c = c_;
mParent = c._mClub;
mMusic = mParent.createEmptyMovieClip("mMusic" + sId_, mParent.getNextHighestDepth());
mp = mp_;
nAngle1 = nAngle1_;
nAngle2 = nAngle2_;
nCpt = 0;
bContinue = true;
nDistance = 1000;
}
function moveMG(nX_, nY_) {
mMusic._x = nX_;
mMusic._y = nY_;
}
function tempMusic() {
if (nInterval != -1) {
clearInterval(nInterval);
}
nInterval = setInterval(this, "runMusic", c._lm._nMusicDecal + Math.ceil(c._lm._nMusicFrequency * Math.random()));
}
function runMusic() {
if (bContinue) {
var _local2 = mMusic.createEmptyMovieClip("mNote" + nCpt, nCpt);
_local2.attachMovie("note", "mAttachedNote", 0);
var _local3 = nAngle1 + Math.ceil(Math.random() * (nAngle2 - nAngle1));
_local2._rotation = _local3;
var _local5 = nDistance * Math.cos((_local3 * Math.PI) / 180);
var _local4 = nDistance * Math.sin((_local3 * Math.PI) / 180);
new mx.transitions.Tween(_local2, "_x", mx.transitions.easing.None.easeNone, 0, _local5, nDistance / c._lm._nMusicSpeed, true);
new mx.transitions.Tween(_local2, "_y", mx.transitions.easing.None.easeNone, 0, _local4, nDistance / c._lm._nMusicSpeed, true);
nCpt++;
tempMusic();
var self_ = this;
_local2.onEnterFrame = function () {
if (this.hitTest(self_.mp.getHeadMc())) {
this.mAttachedNote.play();
self_.mp.setImpact(true, this._rotation);
}
if (Math.ceil(Math.sqrt((this._x * this._x) + (this._y * this._y))) >= self_.nDistance) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
}
}
function stopMusicGenerator() {
bContinue = false;
}
function startMusicGenerator() {
bContinue = true;
}
var nInterval = -1;
}
Symbol 325 MovieClip Frame 1
function openBuble() {
if (this._parent.getDepth() < this._parent._parent.credits_mc.getDepth()) {
this._parent.swapDepths(this._parent._parent.credits_mc);
}
delete btn.onRelease;
mainBuble._visible = true;
var _local2 = new mx.transitions.Tween(mainBuble, "_x", mx.transitions.easing.Elastic.easeOut, mainBuble._x, 207.6, 3, true);
new mx.transitions.Tween(mainBuble, "_y", mx.transitions.easing.Elastic.easeOut, mainBuble._y, 207.6, 3, true);
new mx.transitions.Tween(mainBuble, "_xscale", mx.transitions.easing.Elastic.easeOut, mainBuble._xscale, 100, 3, true);
new mx.transitions.Tween(mainBuble, "_yscale", mx.transitions.easing.Elastic.easeOut, mainBuble._yscale, 100, 3, true);
_local2.onMotionFinished = function () {
btnClose._visible = true;
var _local1 = new mx.transitions.Tween(btnClose, "_x", mx.transitions.easing.Elastic.easeOut, btnClose._x, 10, 3, true);
new mx.transitions.Tween(btnClose, "_y", mx.transitions.easing.Elastic.easeOut, btnClose._y, 10, 3, true);
new mx.transitions.Tween(btnClose, "_xscale", mx.transitions.easing.Elastic.easeOut, btnClose._xscale, 100, 3, true);
new mx.transitions.Tween(btnClose, "_yscale", mx.transitions.easing.Elastic.easeOut, btnClose._yscale, 100, 3, true);
new mx.transitions.Tween(texte, "_alpha", mx.transitions.easing.None.easeNone, texte._alpha, 100, 1, true);
self.activeClosing();
};
}
function closeBuble() {
delete btnClose.onRelease;
btnClose._visible = true;
var _local1 = new mx.transitions.Tween(btnClose, "_x", mx.transitions.easing.Elastic.easeOut, btnClose._x, 27, 1, true);
new mx.transitions.Tween(btnClose, "_y", mx.transitions.easing.Elastic.easeOut, btnClose._y, 27, 1, true);
new mx.transitions.Tween(texte, "_alpha", mx.transitions.easing.None.easeNone, texte._alpha, 0, 1, true);
_local1.onMotionFinished = function () {
btnClose._visible = false;
var _local1 = new mx.transitions.Tween(mainBuble, "_x", mx.transitions.easing.Elastic.easeOut, mainBuble._x, 192, 3, true);
new mx.transitions.Tween(mainBuble, "_y", mx.transitions.easing.Elastic.easeOut, mainBuble._y, 192, 3, true);
new mx.transitions.Tween(mainBuble, "_xscale", mx.transitions.easing.Elastic.easeOut, mainBuble._xscale, 10, 3, true);
new mx.transitions.Tween(mainBuble, "_yscale", mx.transitions.easing.Elastic.easeOut, mainBuble._yscale, 10, 3, true);
_local1.onMotionFinished = function () {
mainBuble._visible = false;
self.activeOpening();
};
};
}
function activeOpening() {
btn.onRelease = openBuble;
}
function activeClosing() {
btnClose.onRelease = closeBuble;
}
mainBuble._visible = (btnClose._visible = false);
mainBuble._xscale = (mainBuble._yscale = 10);
mainBuble._x = (mainBuble._y = 192);
btnClose._xscale = (btnClose._yscale = 10);
texte._alpha = 0;
var self = this;
btn.onRelease = openBuble;
Symbol 341 MovieClip Frame 1
function openBuble() {
if (this._parent.getDepth() < this._parent._parent.regles_mc.getDepth()) {
this._parent.swapDepths(this._parent._parent.regles_mc);
}
delete btnOpen.onRelease;
fondCredits._visible = true;
var _local2 = new mx.transitions.Tween(fondCredits, "_x", mx.transitions.easing.Elastic.easeOut, fondCredits._x, 10, 3, true);
new mx.transitions.Tween(fondCredits, "_y", mx.transitions.easing.Elastic.easeOut, fondCredits._y, 16.4, 3, true);
new mx.transitions.Tween(fondCredits, "_xscale", mx.transitions.easing.Elastic.easeOut, fondCredits._xscale, 100, 3, true);
new mx.transitions.Tween(fondCredits, "_yscale", mx.transitions.easing.Elastic.easeOut, fondCredits._yscale, 100, 3, true);
_local2.onMotionFinished = function () {
btnClose._visible = (lnk_Bruit13._visible = (lnk_NousFr._visible = true));
var _local1 = new mx.transitions.Tween(btnClose, "_x", mx.transitions.easing.Elastic.easeOut, btnClose._x, 1, 3, true);
new mx.transitions.Tween(btnClose, "_y", mx.transitions.easing.Elastic.easeOut, btnClose._y, 1, 3, true);
new mx.transitions.Tween(btnClose, "_xscale", mx.transitions.easing.Elastic.easeOut, btnClose._xscale, 100, 3, true);
new mx.transitions.Tween(btnClose, "_yscale", mx.transitions.easing.Elastic.easeOut, btnClose._yscale, 100, 3, true);
new mx.transitions.Tween(texteCredits, "_alpha", mx.transitions.easing.None.easeNone, texteCredits._alpha, 100, 1, true);
self.activeClosing();
};
}
function closeBuble() {
delete btnClose.onRelease;
btnClose._visible = (lnk_Bruit13._visible = (lnk_NousFr._visible = true));
var _local1 = new mx.transitions.Tween(btnClose, "_x", mx.transitions.easing.Elastic.easeOut, btnClose._x, 15, 1, true);
new mx.transitions.Tween(btnClose, "_y", mx.transitions.easing.Elastic.easeOut, btnClose._y, 22, 1, true);
new mx.transitions.Tween(texteCredits, "_alpha", mx.transitions.easing.None.easeNone, texteCredits._alpha, 0, 1, true);
_local1.onMotionFinished = function () {
btnClose._visible = (lnk_Bruit13._visible = (lnk_NousFr._visible = false));
var _local1 = new mx.transitions.Tween(fondCredits, "_x", mx.transitions.easing.Elastic.easeOut, fondCredits._x, 425, 3, true);
new mx.transitions.Tween(fondCredits, "_y", mx.transitions.easing.Elastic.easeOut, fondCredits._y, 71, 3, true);
new mx.transitions.Tween(fondCredits, "_xscale", mx.transitions.easing.Elastic.easeOut, fondCredits._xscale, 2, 3, true);
new mx.transitions.Tween(fondCredits, "_yscale", mx.transitions.easing.Elastic.easeOut, fondCredits._yscale, 2, 3, true);
_local1.onMotionFinished = function () {
fondCredits._visible = false;
self.activeOpening();
};
};
}
function activeOpening() {
btnOpen.onRelease = openBuble;
}
function activeClosing() {
btnClose.onRelease = closeBuble;
}
fondCredits._visible = (btnClose._visible = (lnk_Bruit13._visible = (lnk_NousFr._visible = false)));
fondCredits._xscale = (fondCredits._yscale = 5);
fondCredits._x = 425;
fondCredits._y = 71;
btnClose._xscale = (btnClose._yscale = 10);
texteCredits._alpha = 0;
var self = this;
btnOpen.onRelease = openBuble;
lnk_Bruit13.onPress = function () {
this.getURL("http://www.bruit13.com", "_blank");
};
lnk_NousFr.onPress = function () {
this.getURL("http://www.nous.fr", "_blank");
};