home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 136
/
MOBICLIC136.ISO
/
pc
/
DATA
/
FAB136
/
FAB136_00
/
mod.swf
/
scripts
/
frame_1
/
DoAction.as
Wrap
Text File
|
2011-07-20
|
90KB
|
2,934 lines
function InitMC(p)
{
trace("InitMC() " + p.mc);
var mc = typeof p != "movieclip" ? p.mc : p;
if(p.level != undefined)
{
var ceMC_name_old = mc._name + "_old";
var ceMC_name = mc._name;
mc._name = ceMC_name_old;
mc.duplicateMovieClip(ceMC_name,p.level);
mc._visible = false;
mc = this[ceMC_name];
}
if(mc.OriginalMC == undefined)
{
mc.OriginalMC = {};
mc.OriginalMC._x = mc._x;
mc.OriginalMC._y = mc._y;
mc.OriginalMC._xscale = mc._xscale;
mc.OriginalMC._yscale = mc._yscale;
mc.OriginalMC._width = mc._width;
}
var fonction = p.fonction != undefined ? eval("InitMC_" + p.fonction) : InitMC_standart;
mc.InitMC = fonction;
InitMC_reccurent(mc);
mc.InitMC(p);
}
function InitMC_reccurent(mc)
{
mc.oriX = mc._x;
mc.oriY = mc._y;
mc.oriW = mc._width;
mc.oriH = mc._height;
mc.BackToInitialPos = function()
{
this._x = this.oriX;
this._y = this.oriY;
};
mc.BackToInitialSize = function()
{
this._width = this.oriW;
this._height = this.oriH;
};
}
function ResetMC(p)
{
var _loc1_ = p.mc;
delete _loc1_.onPress;
delete _loc1_.onRollOver;
delete _loc1_.onRollOut;
delete _loc1_.onRelease;
delete _loc1_.onReleaseOutside;
delete _loc1_.BTN.onPress;
delete _loc1_.BTN.onRollOver;
delete _loc1_.BTN.onRollOut;
delete _loc1_.BTN.onRelease;
delete _loc1_.BTN.onReleaseOutside;
}
function InitMC_standart(p)
{
trace("InitMC_standart : " + InitMC_standart);
this.p = p;
for(var _loc3_ in p)
{
this[_loc3_] = p[_loc3_];
}
if(this.IB != undefined)
{
if(typeof this.IBrep == "movieclip")
{
var IBrepere = this.IBrep;
}
else if(typeof _MOD_["IBrep_" + this.IB] == "movieclip" && this.IBrep != false)
{
var IBrepere = _MOD_["IBrep_" + this.IB];
}
else
{
var IBrepere = p.mc;
}
this.afficheIB = function()
{
_root.gereTextes.afficheIB({codeIB:this.IB,mc:IBrepere});
};
this.masqueIB = function()
{
_root.IB.removeMovieClip();
};
}
if(this.UseLabels != false)
{
if(this.reposFrame == undefined)
{
this.reposFrame = "E1";
}
if(this.pressFrame == undefined)
{
this.pressFrame = "E2";
}
if(this.overFrame == undefined)
{
this.overFrame = "E2";
}
if(this.outFrame == undefined)
{
this.outFrame = "E1";
}
if(this.releaseFrame == undefined)
{
this.releaseFrame = "E1";
}
if(this.releaseOutFrame == undefined)
{
this.releaseOutFrame = "E1";
}
if(this.activeFrame == undefined)
{
this.activeFrame = undefined;
}
if(this.desactiveFrame == undefined)
{
this.desactiveFrame = undefined;
}
}
this.gotoAndStop(p.reposFrame);
§§push(this);
§§push("joueson");
if(this.son == undefined)
{
§§push(undefined);
}
§§pop()[§§enumeration()] = §§pop();
§§push(this);
§§push("stopson");
if(this.nostop != undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
if(this.sonOnPress != undefined)
{
if(this.sonOnPress_offset == undefined)
{
this.sonOnPress_offset = 0;
}
if(this.sonOnPress_loopSon == undefined)
{
this.sonOnPress_loopSon = 0;
}
this.jouesonOnPress = function()
{
joueBruitage({nomSon:this.sonOnPress,offset:this.sonOnPress_offset,loopSon:this.sonOnPress_loopSon});
};
this.stopsonOnPress = function()
{
stopBruitage({nomSon:this.sonOnPress});
};
}
else
{
this.jouesonOnMove = undefined;
this.stopsonOnMove = undefined;
}
if(this.UseHandCursor == undefined)
{
this.UseHandCursor = true;
}
if(this.UseCurseur != false)
{
this.curseur_after_press = this.goto != undefined ? "fleche" : "doigt";
if(this.curseur_on_roll == undefined)
{
this.curseur_on_roll = "doigt";
}
if(this.curseur_onRollOut == undefined)
{
this.curseur_onRollOut = "fleche";
}
if(this.curseur_after_press == undefined)
{
this.curseur_after_press = "doigt";
}
if(this.curseur_onRelease == undefined)
{
this.curseur_onRelease = "doigt";
}
if(this.curseur_onReleaseOutside == undefined)
{
this.curseur_onReleaseOutside = "fleche";
}
}
this.Activer = function()
{
if(this.Actif == true)
{
return undefined;
}
this.enabled = true;
this.BTN.enabled = true;
this.Actif = true;
this.gotoAndStop(this.activeFrame);
};
this.Desactiver = function()
{
if(this.Actif == false)
{
return undefined;
}
this.enabled = false;
this.BTN.enabled = false;
this.Actif = false;
this.stopsonOnPress();
this.masqueIB();
this.gotoAndStop(this.desactiveFrame);
};
this.SetUseHandCursor = function(flag)
{
this.UseHandCursor = flag;
this.useHandCursor = this.UseHandCursor;
this.BTN.useHandCursor = this.UseHandCursor;
};
this.Activer();
this.GS = this.gotoAndStop;
this.MConPress = function()
{
if(this.p.blockOnPress == true)
{
this.enabled = false;
this.BTN.enabled = false;
}
this.stopson();
this.jouesonOnPress();
this.masqueIB();
this.gotoAndStop(this.pressFrame);
gereCursor(this.curseur_after_press);
_root.gotoAndStop(this.goto);
var p = this.OnPress();
};
this.MConRollOver = function()
{
this.joueson();
this.afficheIB();
this.gotoAndStop(this.overFrame);
gereCursor(this.curseur_on_roll);
var _loc2_ = this.OnRollOver();
};
this.MConRollOut = function()
{
trace("MConRollOut : " + this.masqueIB);
this.stopson();
this.masqueIB();
this.gotoAndStop(this.outFrame);
gereCursor(this.curseur_onRollOut);
var _loc2_ = this.OnRollOut();
};
this.MConRelease = function()
{
this.gotoAndStop(this.releaseFrame);
gereCursor(this.curseur_onRelease);
var _loc2_ = this.OnRelease();
};
this.MConReleaseOutside = function()
{
this.gotoAndStop(this.releaseOutFrame);
gereCursor(this.curseur_onReleaseOutside);
var _loc2_ = this.OnReleaseOutside();
};
if(this.BTN == undefined || this.BTN == false)
{
this.useHandCursor = this.UseHandCursor;
this.onPress = this.MConPress;
this.onRollOver = this.MConRollOver;
this.onRollOut = this.MConRollOut;
this.onRelease = this.MConRelease;
this.onReleaseOutside = this.MConReleaseOutside;
}
else
{
this.BTN.useHandCursor = this.UseHandCursor;
this.BTN.onPress = function()
{
this._parent.MConPress();
};
this.BTN.onRollOver = function()
{
this._parent.MConRollOver();
};
this.BTN.onRollOut = function()
{
this._parent.MConRollOut();
};
this.BTN.onRelease = function()
{
this._parent.MConRelease();
};
this.BTN.onReleaseOutside = function()
{
this._parent.MConReleaseOutside();
};
}
this.Refresh();
}
function InitMC_BTN(p)
{
if(p.IB != undefined)
{
if(p.IBrep == true)
{
var IBrepere = _MOD_["IBrep_" + p.IB];
}
else
{
var IBrepere = p.mc;
}
this.afficheIB = function()
{
gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
};
this.masqueIB = function()
{
gereTextes.masqueIB();
};
}
this.enabled = true;
§§push(this);
§§push("joueson");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("stopson");
if(p.nostop != undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
var curseur_after_press = p.goto != undefined ? "fleche" : "doigt";
this.goto = p.goto;
this.BTN.onPress = function()
{
this._parent.stopson();
this._parent.masqueIB();
this._parent.gotoAndStop("E3");
gereCursor(curseur_after_press);
_root.gotoAndStop(this.goto);
var _loc3_ = this._parent.OnPress();
};
this.BTN.onRollOver = function()
{
this._parent.joueson();
this._parent.afficheIB();
this._parent.gotoAndStop("E2");
gereCursor("doigt");
var _loc2_ = this._parent.OnRollOver();
};
this.BTN.onRollOut = function()
{
this._parent.stopson();
this._parent.masqueIB();
this._parent.gotoAndStop("E1");
gereCursor("fleche");
var _loc2_ = this._parent.OnRollOut();
};
this.BTN.onRelease = function()
{
this._parent.gotoAndStop("E2");
gereCursor("doigt");
var _loc2_ = this._parent.OnRelease();
};
this.BTN.onReleaseOutside = function()
{
this._parent.gotoAndStop("E1");
gereCursor("fleche");
var _loc2_ = this._parent.OnReleaseOutside();
};
}
function InitMC_dragdrop(p)
{
trace("InitMC_dragdrop_z");
if(p.IB != undefined)
{
if(p.IBrep == true)
{
var IBrepere = _MOD_["IBrep_" + p.IB];
}
else
{
var IBrepere = p.mc;
}
this.afficheIB = function()
{
_root.gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
};
this.masqueIB = function()
{
_root.gereTextes.masqueIB();
};
}
this.pDepth = this.getDepth();
this.UseHandCursor = p.useHandCursor != undefined ? p.useHandCursor : true;
this.PressLevel = p.PressLevel != undefined ? p.PressLevel : 15832;
this.pressFrame = p.pressFrame != undefined ? p.pressFrame : "E3";
this.overFrame = p.overFrame != undefined ? p.overFrame : "E2";
this.CibleOverFrame = p.CibleOverFrame != undefined ? p.CibleOverFrame : "E3";
this.CibleOutFrame = p.CibleOutFrame != undefined ? p.CibleOutFrame : "E1";
this.outFrame = p.outFrame != undefined ? p.outFrame : "E1";
this.releaseFrame = p.releaseFrame != undefined ? p.releaseFrame : "E1";
§§push(this);
§§push("joueson");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("stopson");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("jouesonOnPress");
if(p.sonOnPress == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("stopsonOnPress");
if(p.sonOnPress == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("jouesonOnOverCible");
if(p.sonOnOverCible == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("stopsonOnOverCible");
if(p.sonOnOverCible == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
var _loc19_ = p.goto != undefined ? "fleche" : "doigt";
this.goto = p.goto;
this.ModeDrag = p.ModeDrag != undefined ? p.ModeDrag : "lache_au_rollout";
this.CentrerOnStartDrag = p.CentrerOnStartDrag != undefined ? p.CentrerOnStartDrag : false;
this.ModeHitTest = p.ModeHitTest != undefined ? p.ModeHitTest : "bounds";
this.DistanceTouche = p.DistanceTouche != undefined ? p.DistanceTouche : 50;
this.DistanceToucheRatio = p.DistanceToucheRatio != undefined ? p.DistanceToucheRatio : 1;
this.ZoneDragLimites = p.ZoneDragLimites != undefined ? p.ZoneDragLimites : {x:0,y:0,w:800,h:600};
this.MethodeDetecteDrag = "DetectDrag_" + this.ModeHitTest;
trace("this[\"DetectDrag_\" + this.ModeHitTest] : " + this["DetectDrag_" + this.ModeHitTest]);
this.DragEnCours = false;
this.DetectDrag_bounds = function()
{
this._x = _xmouse - this.ecart_mousex;
this._y = _ymouse - this.ecart_mousey;
if(this._x < this.ZoneDragLimites.x)
{
this._x = this.ZoneDragLimites.x;
}
if(this._x > this.ZoneDragLimites.x + this.ZoneDragLimites.w)
{
this._x = this.ZoneDragLimites.x + this.ZoneDragLimites.w;
}
if(this._y < this.ZoneDragLimites.y)
{
this._y = this.ZoneDragLimites.y;
}
if(this._y > this.ZoneDragLimites.y + this.ZoneDragLimites.h)
{
this._y = this.ZoneDragLimites.y + this.ZoneDragLimites.h;
}
this.CiblesTouchees = [];
var _loc3_ = this.CibleLaPlusProche();
var _loc2_ = 0;
while(_loc2_ < this.CiblesDrag.length)
{
if(this.hitTest(this.CiblesDrag[_loc2_]))
{
this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOverFrame);
this.CiblesTouchees.push(this.CiblesDrag[_loc2_]);
this.touche = this.touche + 1;
}
else
{
this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOutFrame);
}
_loc2_ = _loc2_ + 1;
}
if(this.touche == 1)
{
this.jouesonOnOverCible();
}
if(this.CiblesTouchees.length <= 0)
{
this.touche = 0;
this.stopsonOnOverCible();
}
this.PendantDrag();
updateAfterEvent();
};
this.DetectDrag_mouse = function()
{
this._x = _xmouse - this.ecart_mousex;
this._y = _ymouse - this.ecart_mousey;
if(this._x < this.ZoneDragLimites.x)
{
this._x = this.ZoneDragLimites.x;
}
if(this._x > this.ZoneDragLimites.x + this.ZoneDragLimites.w)
{
this._x = this.ZoneDragLimites.x + this.ZoneDragLimites.w;
}
if(this._y < this.ZoneDragLimites.y)
{
this._y = this.ZoneDragLimites.y;
}
if(this._y > this.ZoneDragLimites.y + this.ZoneDragLimites.h)
{
this._y = this.ZoneDragLimites.y + this.ZoneDragLimites.h;
}
this.CiblesTouchees = [];
var _loc2_ = 0;
while(_loc2_ < this.CiblesDrag.length)
{
if(this.CiblesDrag[_loc2_].hitTest(_xmouse,_ymouse,true))
{
this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOverFrame);
this.CiblesTouchees.push(this.CiblesDrag[_loc2_]);
this.touche = this.touche + 1;
}
else
{
this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOutFrame);
}
_loc2_ = _loc2_ + 1;
}
if(this.touche == 1)
{
this.jouesonOnOverCible();
}
if(this.CiblesTouchees.length <= 0)
{
this.touche = 0;
this.stopsonOnOverCible();
}
this.PendantDrag();
updateAfterEvent();
};
this.DetectDrag_distance = function()
{
this._x = _xmouse - this.ecart_mousex;
this._y = _ymouse - this.ecart_mousey;
if(this._x < this.ZoneDragLimites.x)
{
this._x = this.ZoneDragLimites.x;
}
if(this._x > this.ZoneDragLimites.x + this.ZoneDragLimites.w)
{
this._x = this.ZoneDragLimites.x + this.ZoneDragLimites.w;
}
if(this._y < this.ZoneDragLimites.y)
{
this._y = this.ZoneDragLimites.y;
}
if(this._y > this.ZoneDragLimites.y + this.ZoneDragLimites.h)
{
this._y = this.ZoneDragLimites.y + this.ZoneDragLimites.h;
}
_global.CURSEUR._x = this._x;
_global.CURSEUR._y = this._y;
Mouse.hide();
gereCursor("mainF");
var _loc4_ = this.CibleLaPlusProche({mode:"toutes"});
var _loc5_ = Math.sqrt(Math.pow(_loc4_._x - this._x,2) + Math.pow(_loc4_._y - this._y,2));
var _loc6_ = (_loc4_._width / 2 + this._width / 2) * this.DistanceToucheRatio;
if(_loc5_ > _loc6_)
{
_loc4_ = undefined;
}
this.CiblesTouchees = [];
var _loc3_ = 0;
while(_loc3_ < this.CiblesDrag.length)
{
if(this.CiblesDrag[_loc3_] == _loc4_)
{
this.CiblesDrag[_loc3_].gotoAndStop(this.CibleOverFrame);
this.CiblesTouchees.push(this.CiblesDrag[_loc3_]);
this.touche = this.touche + 1;
}
else
{
this.CiblesDrag[_loc3_].gotoAndStop(this.CibleOutFrame);
}
_loc3_ = _loc3_ + 1;
}
if(this.touche == 1)
{
this.jouesonOnOverCible();
}
if(this.CiblesTouchees.length <= 0)
{
this.touche = 0;
this.stopsonOnOverCible();
}
this.PendantDrag();
updateAfterEvent();
};
this.StartDrag = function()
{
trace("StartDrag : " + StartDrag);
if(this.CentrerOnStartDrag != true)
{
this.ecart_mousex = _xmouse - this._x;
this.ecart_mousey = _ymouse - this._y;
}
else
{
this._x = _xmouse;
this._y = _ymouse;
this.ecart_mousex = _xmouse - this._x;
this.ecart_mousey = _ymouse - this._y;
}
_global.CURSEUR.Verrouiller();
this.IntervalId = _global.SetInterval({mcRef:this,methode:this.MethodeDetecteDrag,interval:10});
trace("this.MethodeDetecteDrag : " + this.MethodeDetecteDrag);
this.swapDepths(this.PressLevel);
this.DragEnCours = true;
if(this.ModeDrag == "lache_au_clic")
{
var me = this;
_root.onMouseDown = function()
{
me.FirstPress = false;
me.DragEnCours = false;
gereCursor("mainO");
me.stopsonOnPress();
me.gotoAndStop("E2");
_global.ClearInterval(me.IntervalId);
_global.CURSEUR.Deverrouiller();
me.swapDepths(me.pDepth);
me.ApresDrag();
delete _root.onMouseDown;
};
}
};
this.ContinueDrag = function()
{
this.gotoAndStop(this.pressFrame);
gereCursor("mainF");
this.ecart_mousex = _xmouse - this._x;
this.ecart_mousey = _ymouse - this._y;
if(this.IntervalId != undefined)
{
_global.ClearInterval(this.IntervalId);
}
this.IntervalId = _global.SetInterval({mcRef:this,methode:this.MethodeDetecteDrag,interval:10});
this.swapDepths(this.PressLevel);
this.DragEnCours = true;
};
this.StopDrag = function()
{
_global.ClearInterval(this.IntervalId);
this.swapDepths(this.pDepth);
this.DragEnCours = false;
_global.CURSEUR.Deverrouiller();
};
this.ComeBack = function()
{
this._x = this.xOri;
this._y = this.yOri;
this.gotoAndStop("E1");
this.DragEnCours = false;
};
this.Activer = function()
{
trace("Activer : " + this);
this.enabled = true;
this.BTN.enabled = true;
this.useHandCursor = this.UseHandCursor;
this.BTN.useHandCursor = this.UseHandCursor;
};
this.Desactiver = function()
{
trace("Desactiver : " + this);
this.enabled = false;
this.BTN.enabled = false;
this.useHandCursor = false;
this.BTN.useHandCursor = false;
};
this.CibleLaPlusProche = function(p)
{
var _loc3_ = p.mode != "toutes" ? this.CiblesTouchees : this.CiblesDrag;
if(_loc3_.length == 0)
{
return null;
}
var _loc4_ = undefined;
var _loc10_ = null;
var _loc9_ = undefined;
var _loc7_ = undefined;
if(p.mcRef == undefined)
{
_loc9_ = _xmouse;
_loc7_ = _ymouse;
}
else if(p.mcRef == "center")
{
_loc9_ = this._x + this._width / 2;
_loc7_ = this._y + this._height / 2;
}
else
{
var _loc12_ = new flash.geom.Point(p.mcRef._x,p.mcRef._y);
mcRef.localToGlobal(_loc12_);
_loc9_ = _loc12_.x;
_loc7_ = _loc12_.y;
}
var _loc5_ = 100000;
var _loc2_ = 0;
while(_loc2_ < _loc3_.length)
{
if(_loc3_[_loc2_] !== this)
{
_loc4_ = DistancePoints({x1:_loc9_,y1:_loc7_,x2:_loc3_[_loc2_]._x,y2:_loc3_[_loc2_]._y});
if(_loc4_ < _loc5_)
{
_loc5_ = _loc4_;
_loc10_ = _loc3_[_loc2_];
}
}
_loc2_ = _loc2_ + 1;
}
return _loc10_;
};
this.MConPress = function()
{
if(!(this.ModeDrag == "lache_au_clic" && this.DragEnCours == true))
{
this.FirstPress = true;
this.jouesonOnPress();
this.xOri = this._x;
this.yOri = this._y;
this.masqueIB();
this.gotoAndStop(this.pressFrame);
gereCursor("mainF");
this.StartDrag();
var _loc2_ = this.OnPress();
}
};
this.MConRollOver = function()
{
trace("MConRollOver : " + this);
if(this.DragEnCours == true)
{
return undefined;
}
this.joueson();
this.afficheIB();
this.gotoAndStop(this.overFrame);
gereCursor("mainO");
var _loc2_ = this.OnRollOver();
};
this.MConRollOut = function()
{
if(this.DragEnCours == true)
{
return undefined;
}
this.stopson();
this.gotoAndStop(this.outFrame);
this.masqueIB();
gereCursor("fleche");
var _loc2_ = this.OnRollOut();
};
this.MConRelease = function()
{
if(this.ModeDrag != "lache_au_rollout")
{
return undefined;
}
this.DragEnCours = false;
_global.CURSEUR.Deverrouiller();
gereCursor("mainO");
this.stopsonOnPress();
this.gotoAndStop(this.releaseFrame);
_global.ClearInterval(this.IntervalId);
this.swapDepths(this.pDepth);
this.ApresDrag();
var _loc3_ = this.OnRelease();
};
this.MConReleaseOutside = this.MConRelease;
if(this.BTN == undefined || p.BTN == false)
{
this.onPress = this.MConPress;
this.onRollOver = this.MConRollOver;
this.onRollOut = this.MConRollOut;
this.onRelease = this.MConRelease;
this.onReleaseOutside = this.MConReleaseOutside;
}
else
{
this.BTN.onPress = function()
{
this._parent.MConPress();
};
this.BTN.onRollOver = function()
{
this._parent.MConRollOver();
};
this.BTN.onRollOut = function()
{
this._parent.MConRollOut();
};
this.BTN.onRelease = function()
{
this._parent.MConRelease();
};
this.BTN.onReleaseOutside = function()
{
this._parent.MConReleaseOutside();
};
}
}
function InitMC_slider(p)
{
if(p.IB != undefined)
{
if(typeof p.IBrep == "movieclip")
{
var IBrepere = p.IBrep;
}
else if(typeof _MOD_["IBrep_" + p.IB] == "movieclip" && p.IBrep != false)
{
var IBrepere = _MOD_["IBrep_" + p.IB];
}
else
{
var IBrepere = p.mc;
}
this.afficheIB = function()
{
_root.gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
};
this.masqueIB = function()
{
_root.IB.removeMovieClip();
};
}
§§push(this);
§§push("joueson");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("stopson");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
var _loc7_ = p.goto != undefined ? "fleche" : "doigt";
this.goto = p.goto;
this.EnMouvement = false;
if(p.sonOnMove != undefined)
{
this.sonOnMove = p.sonOnMove;
this.sonOnMove_offset = p.sonOnMove_offset != undefined ? Number(p.sonOnMove_offset) : 0;
this.sonOnMove_loopSon = p.sonOnMove_loopSon != undefined ? Number(p.sonOnMove_loopSon) : 0;
this.jouesonOnMove = function()
{
joueBruitage({nomSon:this.sonOnMove,offset:this.sonOnMove_offset,loopSon:this.sonOnMove_loopSon});
};
this.stopsonOnMove = function()
{
stopBruitage({nomSon:this.sonOnMove});
};
}
else
{
this.jouesonOnMove = undefined;
this.stopsonOnMove = undefined;
}
if(p.sonOnPress != undefined)
{
this.sonOnPress = p.sonOnPress;
this.sonOnPress_offset = p.sonOnPress_offset != undefined ? Number(p.sonOnPress_offset) : 0;
this.sonOnPress_loopSon = p.sonOnPress_loopSon != undefined ? Number(p.sonOnPress_loopSon) : 0;
this.jouesonOnPress = function()
{
joueBruitage({nomSon:this.sonOnPress,offset:this.sonOnPress_offset,loopSon:this.sonOnPress_loopSon});
};
this.stopsonOnPress = function()
{
stopBruitage({nomSon:this.sonOnPress});
};
}
else
{
this.jouesonOnPress = undefined;
this.stopsonOnPress = undefined;
}
this.DragZoneLargeur = p.DragZoneLargeur != undefined ? p.DragZoneLargeur : 0;
this.DragZoneHauteur = p.DragZoneHauteur != undefined ? p.DragZoneHauteur : 0;
this.DragZoneLargeur_pourcent = p.DragZoneLargeur / 100;
this.DragZoneHauteur_pourcent = p.DragZoneHauteur / 100;
this.DragZone = {left:this._x,right:this._x + this.DragZoneLargeur,top:this._y,bottom:this._y + this.DragZoneHauteur};
this.Activer = function()
{
this.enabled = true;
};
this.Desactiver = function()
{
this.enabled = false;
};
this.SetPosition = this.SetPositionX = function(pourcent)
{
this._x = this.DragZone.left + this.DragZoneLargeur_pourcent * pourcent;
};
this.SetPositionY = function(pourcent)
{
this._y = this.DragZone.top + this.DragZoneHauteur_pourcent * pourcent;
};
this.GetPosition = this.GetPositionX = function()
{
return (this._x - this.DragZone.left) / this.DragZoneLargeur_pourcent;
};
this.GetPositionY = function()
{
return (this._y - this.DragZone.top) / this.DragZoneHauteur_pourcent;
};
this.DetectDrag = function()
{
this._x = _root._xmouse - this.ecart_mousex;
this._y = _root._ymouse - this.ecart_mousey;
if(this._x <= this.DragZone.left)
{
this._x = this.DragZone.left;
}
if(this._y < this.DragZone.top)
{
this._y = this.DragZone.top;
}
if(this._x >= this.DragZone.right)
{
this._x = this.DragZone.right;
}
if(this._y > this.DragZone.bottom)
{
this._y = this.DragZone.bottom;
}
updateAfterEvent();
if(this._x == this.lastx && this._y == this.lasty)
{
if(this.EnMouvement == true)
{
this.EnMouvement = false;
this.stopsonOnMove();
}
}
else if(this.EnMouvement == false)
{
this.EnMouvement = true;
this.jouesonOnMove();
}
this.lastx = this._x;
this.lasty = this._y;
this.PendantSlide();
};
this.StartDrag = function()
{
this.ecart_mousex = _root._xmouse - this._x;
this.ecart_mousey = _root._ymouse - this._y;
this.lastx = this._x;
this.lasty = this._y;
this.IntervalId = _global.SetInterval({mcRef:this,methode:"DetectDrag",interval:1});
};
this.onPress = function()
{
this.jouesonOnPress();
this.masqueIB();
this.gotoAndStop("E3");
gereCursor("mainF");
this.StartDrag();
var _loc2_ = this.OnPress();
};
this.onRollOver = function()
{
this.joueson();
this.afficheIB();
this.gotoAndStop("E2");
gereCursor("mainO");
var _loc2_ = this.OnRollOver();
};
this.onRollOut = function()
{
this.stopson();
this.stopsonOnPress();
this.stopsonOnMove();
this.gotoAndStop("E1");
this.masqueIB();
gereCursor("fleche");
var _loc2_ = this.OnRollOut();
};
this.onRelease = function()
{
this.gotoAndStop("E2");
_global.ClearInterval(this.IntervalId);
this.stopson();
this.stopsonOnPress();
this.stopsonOnMove();
gereCursor("mainO");
var _loc3_ = this.OnRelease();
};
this.onReleaseOutside = function()
{
this.onRelease();
gereCursor("fleche");
var _loc2_ = this.OnReleaseOutside();
};
}
function InitMC_titre(p)
{
this.LMaVider = [];
this.offsetx = p.offsetx != undefined ? Number(p.offsetx) : 0;
this.offsety = p.offsety != undefined ? Number(p.offsety) : 0;
this.ChangeTexte = function(p)
{
this.viderLM();
_root.gereTextes.afficheLM({codeLM:p.codeLM,X:this._x + this.offsetx,Y:this._y + this.offsety,width:this._width,height:this._height});
this.LMaVider.push(p);
};
this.viderLM = function()
{
var _loc3_ = 0;
while(_loc3_ < this.LMaVider.length)
{
_root.gereTextes.masqueLM(this.LMaVider[_loc3_]);
_loc3_ = _loc3_ + 1;
}
};
}
function InitMC_texte(p)
{
trace("InitMC_titre()");
xlisteObj(p);
this.LMaVider = [];
this.pere = p.pere != undefined ? Number(p.pere) : _root;
this.offsetx = p.offsetx != undefined ? Number(p.offsetx) : 0;
this.offsety = p.offsety != undefined ? Number(p.offsety) : 0;
this.level = p.level != undefined ? Number(p.level) : this.pere.getNextHighestDepth();
this.texte = p.texte != undefined ? p.texte : "";
this.MC = p.mc;
this.MC._visible = false;
if(p.style == undefined)
{
this.Style = {};
}
else
{
this.Style = p.style;
}
this.Style.multiline = this.Style.multiline != undefined ? this.Style.multiline : true;
this.Style.wordWrap = this.Style.wordWrap != undefined ? this.Style.wordWrap : true;
this.Style.border = this.Style.border != undefined ? this.Style.border : false;
this.Style.color = this.Style.color != undefined ? this.Style.color : 16711680;
this.Style.size = this.Style.size != undefined ? this.Style.size : 12;
this.Style.font = this.Style.font != undefined ? this.Style.font : "Comic Sans MS";
this.Style.align = this.Style.align != undefined ? this.Style.align : "center";
this.Style.underline = this.Style.underline != undefined ? this.Style.underline : false;
this.Style.selectable = this.Style.selectable != undefined ? this.Style.selectable : false;
var _loc4_ = this.pere.createTextField(this.MC._name + "_txt",this.level,this.MC._x,this.MC._y,this.MC._width,this.MC._height);
_loc4_.multiline = this.Style.multiline;
_loc4_.wordWrap = this.Style.wordWrap;
_loc4_.border = this.Style.border;
_loc4_.selectable = this.Style.selectable;
_loc4_.embedFonts = true;
var my_fmt = new TextFormat();
my_fmt.font = this.Style.font;
my_fmt.size = this.Style.size;
my_fmt.color = this.Style.color;
my_fmt.align = this.Style.align;
my_fmt.underline = this.Style.underline;
_loc4_.text = this.texte;
_loc4_.setTextFormat(my_fmt);
this.TexteMC = _loc4_;
this.ChangeTexte = function(p)
{
this.texte = p.texte;
this.TexteMC.text = p.texte;
this.TexteMC.setTextFormat(my_fmt);
};
}
function DistancePoints(p)
{
return Math.sqrt(Math.pow(p.x2 - p.x1,2) + Math.pow(p.y2 - p.y1,2));
}
function getLMById(codeLM)
{
var _loc3_ = _root.moduleInfo.returnNodeByPath("Module." + _root.gLangue + ".LegendesMedias");
myLM = this.recusivegetLMById(_loc3_,"id",codeLM);
if(myLM == undefined)
{
myLM(attributeValue + " n\'existe pas dans XML");
}
return myLM;
}
function recusivegetLMById(node, attribute, attributeValue)
{
var _loc1_ = 0;
while(_loc1_ < node.childNodes.length)
{
if(node.childNodes[_loc1_].attributes[attribute] == attributeValue)
{
myText = node.childNodes[_loc1_].firstChild.nodeValue;
var _loc7_ = [];
for(var _loc5_ in node.childNodes[_loc1_].attributes)
{
_loc7_[_loc5_] = node.childNodes[_loc1_].attributes[_loc5_];
}
break;
}
if(node.childNodes[_loc1_].hasChildNodes())
{
recusivegetLMById(node.childNodes[_loc1_],attribute,attributeValue);
}
_loc1_ = _loc1_ + 1;
}
return {texte:myText,attributs:_loc7_};
}
function getStyleLM(codeLM)
{
var _loc8_ = "LM";
var _loc12_ = _root.moduleInfo.returnNodeByPath("Module." + _root.gLangue + ".LegendesMedias");
var _loc10_ = getLMById(codeLM);
var _loc11_ = _loc10_.texte;
myStyle = _loc10_.attributs.style;
var _loc3_ = _root.moduleInfo.returnNodeByPath("Module.StylesTextes.StylesLM");
var _loc6_ = {};
var _loc14_ = 0;
var _loc7_ = new TextFormat();
var _loc5_ = new XML();
var _loc13_ = "00";
var _loc2_ = 0;
while(_loc2_ < _loc3_.childNodes.length)
{
if(_loc3_.childNodes[_loc2_].attributes.id == _loc8_)
{
var _loc4_ = 0;
while(_loc4_ < _loc3_.childNodes[_loc2_].childNodes.length)
{
_loc6_[_loc3_.childNodes[_loc2_].childNodes[_loc4_].nodeName] = _loc3_.childNodes[_loc2_].childNodes[_loc4_].firstChild.nodeValue;
_loc4_ = _loc4_ + 1;
}
}
else
{
if(_loc3_.childNodes[_loc2_].attributes.id == codeLM)
{
_loc5_ = _loc3_.childNodes[_loc2_];
break;
}
if(_loc3_.childNodes[_loc2_].attributes.id == myStyle)
{
_loc5_ = _loc3_.childNodes[_loc2_];
break;
}
}
_loc2_ = _loc2_ + 1;
}
if(_loc5_.childNodes.length !== 0)
{
_loc4_ = 0;
while(_loc4_ < _loc5_.childNodes.length)
{
_loc6_[_loc5_.childNodes[_loc4_].nodeName] = _loc5_.childNodes[_loc4_].firstChild.nodeValue;
_loc4_ = _loc4_ + 1;
}
}
_loc7_.font = _loc6_.police;
_loc7_.size = Number(_loc6_.corps);
_loc7_.bold = _loc6_.bold != "0" ? true : false;
_loc7_.italic = _loc6_.italic != "0" ? true : false;
_loc7_.underline = _loc6_.underline != "0" ? true : false;
_loc7_.color = Number(_loc6_.couleurT);
_loc7_.align = _loc6_.justify;
_loc6_.textFormat = _loc7_;
return _loc6_;
}
function GetLmTextField(lm)
{
return lm.LM.texte;
}
function IncString(str, seuil)
{
var _loc2_ = str.split("_");
var _loc1_ = _loc2_.length - 1;
var _loc3_ = Number(_loc2_[_loc1_]) + 1;
while(_loc3_ > seuil)
{
_loc2_[_loc1_] = gimme2digits(0);
_loc1_ = _loc1_ - 1;
_loc3_ = Number(_loc2_[_loc1_]) + 1;
}
_loc2_[_loc1_] = gimme2digits(_loc3_);
return _loc2_.join("_");
}
function DecString(str)
{
var _loc1_ = str.split("_");
trace(_loc1_);
var _loc2_ = _loc1_.length - 1;
trace(Number(_loc1_[_loc2_]));
_loc1_[_loc2_] = gimme2digits(Number(_loc1_[_loc2_]) - 1);
return _loc1_.join("_");
}
function RetourneLettreAlphabet(no)
{
var _loc1_ = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
trace("RetourneLettreAlphabet() : lettre no " + no + " :" + _loc1_[no - 1]);
return _loc1_[no - 1];
}
function xGetConfig()
{
trace("xGetConfig()");
_root.xConfig = {};
_root.xConfig.Params = {};
_root.xConfig.Set = function(p)
{
if(this[p.nom] == undefined)
{
if(p.defaut == "OBLIGATOIRE")
{
trace({mess:"/!\\ERROR /!\\Paramètre du xml obligatoire manquant dans la balise Config: " + p.nom,group:"error"});
}
else
{
this[p.nom] = p.defaut;
if(p.type == "number")
{
this[p.nom] = Number(this[p.nom]);
}
if(p.type == "boolean")
{
this[p.nom] = !(this[p.nom] == "true" || this[p.nom] == true) ? false : true;
}
}
}
else
{
if(p.type == "number")
{
this[p.nom] = Number(this[p.nom]);
}
if(p.type == "boolean")
{
this[p.nom] = !(this[p.nom] == "true" || this[p.nom] == true) ? false : true;
}
}
this.Params[p.nom] = {nom:p.nom,type:p.type,desc:p.desc,valeur:this[p.nom]};
};
_root.xConfig.ToXml = function()
{
var _loc2_ = "";
trace("");
trace("");
trace("");
trace("(!)_____ xConfig en XML _______");
trace("<Params>");
for(var _loc3_ in this.Params)
{
this.Params[_loc3_].desc = this.Params[_loc3_].desc != undefined ? this.Params[_loc3_].desc : "";
_loc2_ = "<Param nom=\"" + _loc3_ + "\" valeur=\"" + this.Params[_loc3_].valeur + "\" desc=\"" + this.Params[_loc3_].desc + "\" /> <!-- " + this.Params[_loc3_].desc + " -->\r" + _loc2_;
}
trace(_loc2_);
trace("</Params>");
trace("(!)_____ xConfig en XML- FIN _______");
trace("");
trace("");
trace("");
};
_root.xConfig._name = "xConfig";
var _loc3_ = _root.moduleInfo.returnNodeByPath("Module.Config.Params").childNodes;
for(props in _loc3_)
{
_root.xConfig[_loc3_[props].attributes.nom] = _loc3_[props].attributes.valeur;
}
}
function GetFilePath(fichier)
{
var _loc2_ = AntiSlashToSlash(fichier);
var _loc1_ = _loc2_.split("/");
_loc1_.pop();
return _loc1_.join("/");
}
function AntiSlashToSlash(chaine)
{
return str_replace(chaine,"\\","/");
}
function DistancePoints(p)
{
return Math.sqrt(Math.pow(p.x2 - p.x1,2) + Math.pow(p.y2 - p.y1,2));
}
function SetInterval(p)
{
if(_root.INTERVAL_IDS == undefined)
{
_root.INTERVAL_IDS = [];
}
if(p.mcRef == undefined)
{
p.mcRef = _root;
}
if(p.methode == undefined)
{
return false;
}
if(p.interval == undefined)
{
return false;
}
if(p.params == undefined)
{
p.params = {};
}
var _loc3_ = setInterval(p.mcRef,p.methode,p.interval,p.params);
_root.INTERVAL_IDS.push(_loc3_);
return _loc3_;
}
function ClearInterval(id)
{
clearInterval(id);
var _loc2_ = 0;
while(_loc2_ < _root.INTERVAL_IDS.length)
{
if(_root.INTERVAL_IDS[_loc2_] == id)
{
_root.INTERVAL_IDS.splice(_loc2_,1);
return undefined;
}
_loc2_ = _loc2_ + 1;
}
}
function ClearAllIntervals()
{
var _loc2_ = 0;
while(_loc2_ < _root.INTERVAL_IDS.length)
{
clearInterval(_root.INTERVAL_IDS[_loc2_]);
_loc2_ = _loc2_ + 1;
}
_root.INTERVAL_IDS = [];
}
function ExecuterApresDelai(p)
{
var tdep = getTimer();
var tfin;
var _loc3_ = "ExecuterApresDelai" + Number(++_root.ExecuterApresDelaiNo);
var id;
var delai = p.delai * 1000;
var _loc4_ = p.mcRef[p.methode];
var mcRef = p.mcRef;
var methode = p.methode;
var params = p.params;
_root[_loc3_] = function()
{
tfin = getTimer();
if(tfin - tdep >= delai)
{
ClearInterval(id);
mcRef[methode](params);
}
};
id = SetInterval({methode:_loc3_,interval:p.delai});
return id;
}
function str_replace(str, search, replace)
{
return str.split(search).join(replace);
}
function JoindreObjets(objects)
{
var _loc2_ = new Object();
var _loc1_ = 0;
while(_loc1_ < objects.length)
{
p1 = objects[_loc1_];
for(props in p1)
{
_loc2_[props] = p1[props];
}
_loc1_ = _loc1_ + 1;
}
return _loc2_;
}
function GetOriginalSize(mc)
{
var _loc2_ = mc._rotation;
mc._rotation = 0;
var _loc3_ = {w:mc._width * mc._xscale / 100,h:mc._height * mc._yscale / 100};
mc._rotation = _loc2_;
return _loc3_;
}
function GetOriginalWidth(mc)
{
var _loc2_ = mc._rotation;
mc._rotation = 0;
var _loc3_ = mc._width * mc._xscale / 100;
var _loc4_ = mc._height * mc._yscale / 100;
mc._rotation = _loc2_;
return _loc3_;
}
function GetOriginalHeight(mc)
{
var _loc2_ = mc._rotation;
mc._rotation = 0;
var _loc4_ = mc._width * mc._xscale / 100;
var _loc3_ = mc._height * mc._yscale / 100;
mc._rotation = _loc2_;
return _loc3_;
}
function CreerCache(p)
{
var _loc4_ = p.level != undefined ? p.level : _global.Levels.cache;
var _loc2_ = p.mc.createEmptyMovieClip("CACHE",_loc4_);
_loc2_.beginFill(65280,50);
_loc2_.moveTo(0,0);
_loc2_.lineTo(p.width,0);
_loc2_.lineTo(p.width,p.height);
_loc2_.lineTo(0,p.height);
_loc2_.lineTo(0,0);
_loc2_.endFill();
p.mc.setMask(_loc2_);
}
function ConvertCoord(mc_src, mc_dest)
{
var _loc1_ = {x:0,y:0};
mc_src.localToGlobal(_loc1_);
mc_dest.globalToLocal(_loc1_);
return _loc1_;
}
function getGlobalCoord(xc, yc, mc)
{
var _loc1_ = {x:xc * 100 / mc._xscale,y:yc * 100 / mc._yscale};
mc.localToGlobal(_loc1_);
return _loc1_;
}
function getLocalCoord(xc, yc, mc)
{
var _loc1_ = new Object({x:xc,y:yc});
mc.globalToLocal(_loc1_);
_loc1_.x = _loc1_.x / 100 * mc._xscale;
_loc1_.y = _loc1_.y / 100 * mc._yscale;
return _loc1_;
}
function length_ass(arr)
{
var _loc1_ = 0;
for(prop in arr)
{
_loc1_ = _loc1_ + 1;
}
return _loc1_;
}
function ExplodeString(chaine)
{
var _loc3_ = new Array();
var _loc1_ = 0;
while(_loc1_ < chaine.length)
{
_loc3_.push(chaine.charAt(_loc1_));
_loc1_ = _loc1_ + 1;
}
return _loc3_;
}
function TrimString(chaine)
{
var _loc3_ = "";
var _loc5_ = "";
var _loc2_ = false;
var _loc1_ = 0;
while(_loc1_ < chaine.length)
{
if(chaine.charAt(_loc1_) != " ")
{
_loc2_ = true;
}
if(_loc2_ == true)
{
_loc3_ += chaine.charAt(_loc1_);
}
_loc1_ = _loc1_ + 1;
}
_loc2_ = false;
_loc1_ = _loc3_.length - 1;
while(_loc1_ >= 0)
{
if(_loc3_.charAt(_loc1_) != " ")
{
_loc2_ = true;
}
if(_loc2_ == true)
{
_loc5_ = _loc3_.charAt(_loc1_) + _loc5_;
}
_loc1_ = _loc1_ - 1;
}
return _loc5_;
}
function BloquerActives()
{
if(_global.ClipBloquant == undefined)
{
var _loc0_ = null;
var _loc3_ = _global.ClipBloquant = _root.createEmptyMovieClip("ClipBloquant",12123);
_loc3_.attachMovie("ClipInvisible","ClipInvisible",2);
_loc3_._width = Stage.width;
_loc3_._height = Stage.height;
_loc3_._x = 0;
_loc3_._y = 0;
_loc3_.useHandCursor = false;
_loc3_.onPress = function()
{
};
}
}
function DebloquerActives()
{
if(_global.ClipBloquant != undefined)
{
_global.ClipBloquant.removeMovieClip();
_global.ClipBloquant = undefined;
}
}
function afficheLM_x2(p)
{
viderLM_x2();
_root.gereTextes.afficheLM({codeLM:p.codeLM,X:p.LMrep._x,Y:p.LMrep._y,width:p.LMrep._width,height:p.LMrep._height});
LMaVider2.push(p);
}
function viderLM_x2()
{
var _loc3_ = 0;
while(_loc3_ < _global.LMaVider2.length)
{
_root.gereTextes.masqueLM(_global.LMaVider2[_loc3_]);
_loc3_ = _loc3_ + 1;
}
}
function afficheLM_x(p)
{
_root.gereTextes.afficheLM({codeLM:p.codeLM,X:p.LMrep._x - p.width / 2,Y:p.LMrep._y - p.height / 2,width:p.width,height:p.height});
_global.LMaVider.push(p);
}
function viderLM_x()
{
var _loc3_ = 0;
while(_loc3_ < _global.LMaVider.length)
{
_root.gereTextes.masqueLM(_global.LMaVider[_loc3_]);
_loc3_ = _loc3_ + 1;
}
}
function ConvertMcToArray(p)
{
xtrace("Convertion du bitmap en tableau de nombres");
var _loc3_ = p.mc;
var _loc5_ = _loc3_._rotation;
_loc3_._rotation = 0;
var _loc1_ = _loc3_._width * 100 / _loc3_._xscale;
var _loc4_ = _loc3_._height * 100 / _loc3_._yscale;
_loc3_._rotation = _loc5_;
_loc3_.MCwidth = _loc1_;
_loc3_.MCheight = _loc4_;
xtrace("WH " + _loc1_ + " " + _loc4_);
var _loc2_ = new flash.display.BitmapData(_loc1_,_loc4_,true,0);
_loc2_.draw(_loc3_);
var _loc6_ = new Array();
lv = new LoadVars();
lv.tab = new Array();
i = 0;
while(i < _loc4_)
{
j = 0;
while(j < _loc1_)
{
lv.tab.push(_loc2_.getPixel(j,i));
j++;
}
i++;
}
return lv.tab;
}
function ConvertMcToBitmap(p)
{
var _loc1_ = p.mc;
var _loc2_ = new flash.display.BitmapData(_loc1_._width,_loc1_._height,true,16777215);
_loc2_.draw(_loc1_,_loc1_.transform.matrix);
_loc1_._parent.createEmptyMovieClip(_loc1_._name,_loc1_.getDepth());
_loc1_.attachBitmap(_loc2_,2,"always",true);
}
function CloneMcToBitmap(p)
{
var _loc1_ = p.mc;
var _loc9_ = p.pere;
var _loc8_ = p.nom;
var _loc5_ = p.level;
trace("-*-*-* " + _loc1_._width + " " + _loc1_._height);
var _loc7_ = _loc1_._x;
var _loc6_ = _loc1_._y;
_loc1_._x = 0;
_loc1_._y = 0;
var _loc4_ = new flash.display.BitmapData(_loc1_._width,_loc1_._height,true,16755370);
trace(_loc1_.transform.matrix.toString());
var _loc2_ = _loc9_.createEmptyMovieClip(_loc8_,_loc5_);
_loc2_._visible = false;
_loc2_.attachBitmap(_loc4_,2,"auto",true);
_loc4_.draw(_loc1_,_loc1_.transform.matrix);
_loc1_._x = _loc7_;
_loc1_._y = _loc6_;
trace("CloneMcToBitmap" + _loc2_);
return _loc2_;
}
function trace_obj(obj)
{
trace("\r________________" + obj + "________________");
for(var _loc2_ in obj)
{
trace(_loc2_ + " = " + obj[_loc2_]);
}
trace("\r_______________________________________");
}
function xtrace_mc(obj)
{
trace("\r________________" + obj + "________________");
trace("_x : " + obj._x);
trace("_y : " + obj._y);
trace("_width : " + obj._width);
trace("_height : " + obj._height);
trace("_level : " + obj.getDepth());
for(var _loc2_ in obj)
{
trace(_loc2_ + " = " + obj[_loc2_]);
}
trace("\r_______________________________________");
}
function EnvoiVersServeur()
{
_amfphp_.Call({url:_root.xConfig.GatewayUrl,mc:this,service:_root.xConfig.Service,fonction:"Save",params:{PSEUDO:escape(MEMO.PSEUDO),EMAIL:escape(MEMO.EMAIL),TITRE:escape(MEMO.TITRE),XML:escape(PARAMS_ATELIER.Texte),PARAMS:PARAMS_ATELIER.FonteFamille + "," + PARAMS_ATELIER.FonteSize + "," + PARAMS_ATELIER.FonteCouleur + "," + PARAMS_ATELIER.FonteBold + "," + PARAMS_ATELIER.FonteItalic + "," + PARAMS_ATELIER.NoPapier},retour:"EnvoiVersServeurRetour"});
}
function xlisteObj(p)
{
trace("_________________________________________________");
for(props in p)
{
trace(props + " = " + p[props]);
}
trace("_________________________________________________");
}
function EnvoiVersServeurRetour(p)
{
trace("EnvoiVersServeurRetour : ");
xlisteObj(p);
xlisteObj(p.resultat);
if(p.resultat != undefined)
{
trace("Réponse du serveur: " + p.resultat);
}
else
{
var _loc2_ = "\r\r______________ \r /!\\ERREUR : ";
_loc2_ += "\r " + p.erreur.faultstring;
_loc2_ += "\r code : " + p.erreur.faultcode;
_loc2_ += "\r detail : " + p.erreur.detail;
_loc2_ += "\r error classe name : " + p.erreur.type;
_loc2_ += "\r Cliquer sur \"Envoyer\" pour envoyer un message test au serveur.";
trace("erreur : " + _loc2_);
}
DIALOG_BOX_WEB.AfficheSucces();
}
function StopAll()
{
_o_.StopAll();
mod.viewer1.StopAll();
mod.viewer2.StopAll();
mod.viewer3.StopAll();
mod.viewer4.StopAll();
mod.viewer5.StopAll();
DebloquerActives();
Mouse.show();
}
function ModulePause()
{
}
function ModuleResume()
{
}
function InitChoixPartie(mc)
{
mc.CouleurOri = mc.LM.texte.textColor;
if(mc._name == "LM_MEM_01")
{
mc.No = 1;
}
else
{
mc.No = 2;
}
mc.onPress = function()
{
trace("onPress : " + onPress);
this.LM.texte.textColor = String(this.CouleurOri);
if(this.No == 1)
{
_root.CHOIX_PARTIE._visible = false;
_root.gotoAndStop("ATELIER");
}
else
{
_root.CHOIX_PARTIE._visible = false;
NewMemo();
_root.gotoAndStop("GENERIQUE");
}
};
mc.onRollOver = function()
{
_root.joueBruitage({nomSon:"B_LM_0" + this.No});
this.LM.texte.textColor = String(this.couleurRollT);
};
mc.onRollOut = function()
{
this.LM.texte.textColor = String(this.CouleurOri);
};
}
function INIT()
{
trace("(!)____mod_.INIT : ");
xGetConfig();
_root.xConfig.Set({nom:"GatewayUrl",defaut:"http://www.mobiclic.com/_backendCDS/amfphp/gateway.php",desc:""});
_root.xConfig.Set({nom:"Service",defaut:"CD_" + _root.gModuleName.split("_")[0] + "_Connection",desc:""});
_root.xConfig.Set({nom:"BanquesTypes",defaut:"swf,swf,swf,swf,lm",desc:""});
_root.xConfig.Set({nom:"Vitesse1Cran",defaut:0.5,type:"number",desc:"Vitesse de défilement des éléments 1 à 1"});
_root.xConfig.Set({nom:"VitesseSlideMin",defaut:1,type:"number",desc:"Vitesse mini de défilement des éléments avec la manette"});
_root.xConfig.Set({nom:"VitesseSlideMax",defaut:0.1,type:"number",desc:"Vitesse max de défilement des éléments avec la manette"});
_root.xConfig.Set({nom:"DureeSlide",defaut:5,type:"number",desc:"Durée du défilement (secondes)"});
_root.xConfig.Set({nom:"LancersEcart",defaut:0.5,type:"number",desc:"délai en secondes entre les lancers des banques"});
_root.xConfig.Set({nom:"TaillePoliceLimites",defaut:"5,40",desc:"mini et max des taille de la fonte"});
_root.xConfig.Set({nom:"ModeTexteBloquage",defaut:"3",type:"number",desc:"1: pas de bloquage, 2: bloquage, 3: auto-redimensionnement de la fonte"});
_root.gLabelStartName = HOTE.LocalConfig.gLabelStartName;
FONTES_LISTE = _root.moduleInfo.returnNodeByPath("Module.Config.Fontes").firstChild.nodeValue.split(",");
var _loc3_ = 0;
while(_loc3_ < FONTES_LISTE.length)
{
FONTES_LISTE[_loc3_] = TrimString(FONTES_LISTE[_loc3_]);
_loc3_ = _loc3_ + 1;
}
FONTE_DEFAUT = {};
var _loc4_ = _root.moduleInfo.returnNodeByPath("Module.Config.PremiereFonte");
for(var _loc7_ in _loc4_.attributes)
{
trace(_loc7_ + " : " + _loc4_.attributes[_loc7_]);
FONTE_DEFAUT[_loc7_] = _loc4_.attributes[_loc7_];
}
var _loc8_ = _root.xConfig.TaillePoliceLimites.split(",");
TAILLE_FONTE_LIMITE = {min:Number(_loc8_[0]),max:Number(_loc8_[1])};
COULEUR_LISTE = _root.moduleInfo.returnNodeByPath("Module.Config.Couleurs").firstChild.nodeValue.split(",");
_loc3_ = 0;
while(_loc3_ < COULEUR_LISTE.length)
{
COULEUR_LISTE[_loc3_] = TrimString(COULEUR_LISTE[_loc3_]);
_loc3_ = _loc3_ + 1;
}
_root.CHOIX_PARTIE.swapDepths(7000);
_root.CHOIX_PARTIE._visible = false;
_root.CHOIX_PARTIE.FOND.onPress = function()
{
};
_root.CHOIX_PARTIE.FOND.useHandCursor = false;
_root.gereTextes.afficheLM({mc:_root.CHOIX_PARTIE,codeLM:"LM_MEM_01"});
_root.gereTextes.afficheLM({mc:_root.CHOIX_PARTIE,codeLM:"LM_MEM_02"});
FlashCookie = SharedObject.getLocal("MOBICLIC_" + _root.gModuleName,"/");
var _loc9_ = FlashCookie.getSize() != 0 && Boolean(FlashCookie.data.newGame) == false;
if(_loc9_)
{
trace("partie_existante : " + _loc9_);
LoadCookie();
}
else
{
NewMemo();
}
if(this.SlideViewerInitOk != true)
{
this.SlideViewerInitOk = true;
BanksInit();
SlideViewerInit(1);
SlideViewerInit(2);
SlideViewerInit(3);
SlideViewerInit(4);
SlideViewerInit(5);
}
DIALOG_BOX_WEB = {create:function()
{
function init()
{
FENETRE._visible = false;
FENETRE.swapDepths(25630);
_root.gereTextes.afficheLM({codeLM:"LM_DB_WEB_SUCCES",mc:FENETRE});
for(var _loc3_ in LMS)
{
_root.gereTextes.afficheLM({codeLM:LMS[_loc3_],mc:FENETRE.DG});
}
FENETRE.DG[LMS.PRENOM].LM.texte.type = "input";
FENETRE.DG[LMS.PRENOM].LM.texte.selectable = true;
FENETRE.DG[LMS.PRENOM].TexteOri = FENETRE.DG[LMS.PRENOM].LM.texte.text;
FENETRE.DG[LMS.TITRE].LM.texte.type = "input";
FENETRE.DG[LMS.TITRE].LM.texte.selectable = true;
FENETRE.DG[LMS.EMAIL].LM.texte.type = "input";
FENETRE.DG[LMS.EMAIL].LM.texte.selectable = true;
FENETRE.DG[LMS.EMAIL].TexteOri = FENETRE.DG[LMS.EMAIL].LM.texte.text;
InitMC({mc:FENETRE.DG.BTN_FERMER,OnPress:function()
{
Fermer();
}});
InitMC({mc:FENETRE.DG.BTN_OUI,OnPress:function()
{
if(FENETRE.DG[LMS.PRENOM].LM.texte.text != "" && FENETRE.DG[LMS.PRENOM].LM.texte.text != FENETRE.DG[LMS.PRENOM].TexteOri && FENETRE.DG[LMS.EMAIL].LM.texte.text != "" && FENETRE.DG[LMS.EMAIL].LM.texte.text != FENETRE.DG[LMS.EMAIL].TexteOri)
{
MEMO.PSEUDO = FENETRE.DG[LMS.PRENOM].LM.texte.text;
MEMO.EMAIL = FENETRE.DG[LMS.EMAIL].LM.texte.text;
MEMO.TITRE = FENETRE.DG[LMS.TITRE].LM.texte.text;
FENETRE.DG._visible = false;
EnvoiVersServeur();
}
}});
InitMC({mc:FENETRE.DG.BTN_NON,OnPress:function()
{
Fermer();
}});
}
function Afficher()
{
FENETRE.DG._visible = true;
FENETRE.LM_DB_WEB_SUCCES._visible = false;
FENETRE.FOND.onPress = function()
{
};
FENETRE.FOND.useHandCursor = false;
FENETRE._visible = true;
}
function Fermer()
{
FENETRE._visible = false;
}
function AfficheSucces()
{
FENETRE.LM_DB_WEB_SUCCES._visible = true;
FENETRE.FOND.onPress = function()
{
DIALOG_BOX_WEB.Fermer();
};
FENETRE.FOND.useHandCursor = true;
}
var FENETRE = _root.DIALOG_BOX_WEB;
var LMS = {PRENOM:"LM_DB_WEB_PRENOM",TITRE:"LM_DB_WEB_TITRE",EMAIL:"LM_DB_WEB_EMAIL",MESSAGE:"LM_DB_WEB_MESSAGE",MESSAGE2:"LM_DB_WEB_MESSAGE2",OUI:"LM_DB_WEB_OUI",NON:"LM_DB_WEB_NON"};
this.Afficher = Afficher;
this.Fermer = Fermer;
this.AfficheSucces = AfficheSucces;
init();
}};
DIALOG_BOX_WEB.create();
TexteAjuste();
_root.xConfig.ToXml();
_root.InitOk();
}
function START()
{
if(MEMO.newGame == true)
{
_root.gotoAndStop("GENERIQUE");
}
else
{
_root.gBlockMusic = undefined;
_root.changeMusicOn(0);
_root.changeMusicOn(1);
_root.CHOIX_PARTIE._visible = true;
}
}
function GENERIQUE()
{
_root.zapIntro("_01");
_root.changeMusicOn(0);
_root.FinB_Jingle = function()
{
_root.gotoAndStop("_01");
};
_root.joueBruitage({nomSon:"B_JINGLE",actionFin:"FinB_Jingle"});
}
function ATTENTE()
{
BT_AIDE_Init("ATTENTE");
_root.gereTextes.masqueLM({codeLM:"LM_TEXTE"});
_root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_01"});
_root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_02"});
_root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_03"});
_root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_04"});
_root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_05"});
_root.GEN_LM.swapDepths(9000);
_root.ZONE_CACHE_01.swapDepths(8001);
_root.ZONE_CACHE_02.swapDepths(8002);
_root.ZONE_CACHE_03.swapDepths(8003);
_root.ZONE_CACHE_04.swapDepths(8004);
_root.ZONE_CACHE_05.swapDepths(8005);
_root.FEUILLE.removeMovieClip();
_root.GEN_LM_AT.removeMovieClip();
_root.AT_REP_ZONE_01.removeMovieClip();
_root.AT_REP_ZONE_02.removeMovieClip();
_root.AT_REP_ZONE_03.removeMovieClip();
_root.AT_REP_ZONE_04.removeMovieClip();
_root.AT_REP_ZONE_05.removeMovieClip();
_root.ZONE_CACHE_AT.removeMovieClip();
GenerateursSlideViewerInit();
_root.MANETTE_ZONE._visible = false;
_root.REP_MANETTE._alpha = 0;
InitMC({mc:_root.REP_MANETTE,fonction:"slider",DragZoneHauteur:_root.MANETTE_ZONE._height,son:"B_MAN02",sonOnMove:"B_MAN03",IB:"IB_MAN"});
_root.REP_MANETTE.OnRollOver = function()
{
_root.MANETTE.gotoAndStop("E2");
};
_root.REP_MANETTE.OnRollOut = function()
{
_root.MANETTE.gotoAndStop("E1");
};
_root.REP_MANETTE.OnPress = function()
{
_root.MANETTE.gotoAndStop("E3");
_global.CURSEUR._visible = false;
};
_root.REP_MANETTE.OnRelease = _root.REP_MANETTE.OnReleaseOutside = function()
{
if(this.FrameManette > 2)
{
this.Desactiver();
_root.MANETTE.gotoAndStop("E4");
_global.CURSEUR._visible = true;
_root.MANETTE.MANETTE.gotoAndPlay(7 - this.FrameManette);
gereCursor("fleche");
_root.joueBruitage({nomSon:"B_MAN04"});
this.SetPositionY(0);
}
else
{
_global.CURSEUR._visible = true;
_root.MANETTE.gotoAndStop("E1");
}
};
_root.REP_MANETTE.PendantSlide = function()
{
this.FrameManette = Math.floor(6 * this.GetPositionY() / 100) + 1;
_root.MANETTE.MANETTE.gotoAndStop(this.FrameManette);
};
InitMC({mc:_root.BT_ATELIER,OnPress:function()
{
trace("OnPress : " + MEMO.newGame + " " + mod.IntroAtelierDejaVue);
if(MEMO.newGame == true && mod.IntroAtelierDejaVue != true)
{
mod.IntroAtelierDejaVue = true;
_root.gotoAndStop("AT_01");
}
else
{
_root.gotoAndStop("ATELIER");
}
},son:"B_AT",IB:"IB_AT"});
if(mod.ElementsChanged != true && MEMO.newGame == true)
{
_root.BT_ATELIER.Desactiver();
_root.BT_ATELIER.gotoAndStop("E0");
}
else
{
_root.BT_ATELIER.Activer();
_root.BT_ATELIER.gotoAndStop("E1");
}
if(this.ATTENTE_DEJA_JOUE != true && partie_existante == true)
{
_root.CHOIX_PARTIE._visible = true;
}
this.ATTENTE_DEJA_JOUE = true;
}
function ATELIER()
{
DebloquerActives();
if(_root.gMusic == 0)
{
_root.changeMusicOn(1);
}
BT_AIDE_Init("ATELIER");
_root.GEN_LM.removeMovieClip();
_root.ZONE_CACHE_01.removeMovieClip();
_root.ZONE_CACHE_02.removeMovieClip();
_root.ZONE_CACHE_03.removeMovieClip();
_root.ZONE_CACHE_04.removeMovieClip();
_root.ZONE_CACHE_05.removeMovieClip();
_root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_01_AT"});
_root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_02_AT"});
_root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_03_AT"});
_root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_04_AT"});
_root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_05_AT"});
_root.gereTextes.afficheLM({mc:_root.LM_TEXTE,codeLM:"LM_TEXTE"});
_root.FEUILLE.swapDepths(14527);
_root.GEN_LM_AT.swapDepths(9004);
_root.ZONE_CACHE_AT.swapDepths(9002);
if(PARAMS_ATELIER.Texte != "")
{
_root.LM_TEXTE._visible = false;
}
TEXTE = _root.FEUILLE.TEXTE;
PALETTE_TEXTE = _root.PALETTE_TEXTE;
_root.MASK_ZONE_01.removeMovieClip();
_root.MASK_ZONE_02.removeMovieClip();
_root.MASK_ZONE_03.removeMovieClip();
_root.MASK_ZONE_04.removeMovieClip();
_root.MASK_ZONE_05.removeMovieClip();
PaletteInit();
AtelierSlideViewerInit(1);
AtelierSlideViewerInit(2);
AtelierSlideViewerInit(3);
AtelierSlideViewerInit(4);
AtelierSlideViewerInit(5);
InitMC({mc:_root.BT_RET,OnPress:function()
{
_root.gotoAndStop("ATTENTE");
},son:"B_RET",IB:"IB_RET"});
InitMC({mc:_root.BT_WEB,OnPress:function()
{
DIALOG_BOX_WEB.Afficher();
trace("DIALOG_BOX_WEB.Afficher : " + DIALOG_BOX_WEB.Afficher);
},son:"B_WEB",IB:"IB_WEB"});
InitMC({mc:_root.BT_IMP,OnPress:function()
{
var _loc3_ = _root.creerRectangle({pere:_root,level:14526,alpha:100,couleur:16777215,w:800,h:600});
_loc3_.onPress = function()
{
};
_loc3_.useHandCursor = false;
TEXTE_TEMP.removeTextField();
TEXTE.autoSize = false;
TEXTE._height = 411;
_root.focusManager.setFocus(_root.BT_IMP);
_root.FEUILLE.posOri = {x:_root.FEUILLE._x,y:_root.FEUILLE._y,w:_root.FEUILLE._width,h:_root.FEUILLE._height};
var _loc4_ = 800 / _root.FEUILLE._height;
_root.FEUILLE._width *= _loc4_;
_root.FEUILLE._height = 800;
_root.FEUILLE._rotation = -90;
_root.FEUILLE._x = 400 - _root.FEUILLE._width / 2;
_root.FEUILLE._y = 300 + _root.FEUILLE._height / 2;
if(_global.HOTE.ImprimerEcran())
{
_root.FEUILLE._x = _root.FEUILLE.posOri.x;
_root.FEUILLE._y = _root.FEUILLE.posOri.y;
_root.FEUILLE._rotation = 0;
_root.FEUILLE._width = _root.FEUILLE.posOri.w;
_root.FEUILLE._height = _root.FEUILLE.posOri.h;
if(_root.xConfig.ModeTexteBloquage == 1)
{
TEXTE.autoSize = "left";
}
else
{
TEXTE.autoSize = false;
}
}
else
{
_root.FEUILLE._x = _root.FEUILLE.posOri.x;
_root.FEUILLE._y = _root.FEUILLE.posOri.y;
_root.FEUILLE._rotation = 0;
_root.FEUILLE._width = _root.FEUILLE.posOri.w;
_root.FEUILLE._height = _root.FEUILLE.posOri.h;
if(_root.xConfig.ModeTexteBloquage == 1)
{
TEXTE.autoSize = "left";
}
else
{
TEXTE.autoSize = false;
}
}
_loc3_.removeMovieClip();
},son:"B_IMP",IB:"IB_IMP"});
if(PARAMS_ATELIER.Texte == "" || MEMO.newGame == true)
{
_root.BT_WEB.Desactiver();
_root.BT_WEB.gotoAndStop("E0");
_root.BT_IMP.Desactiver();
_root.BT_IMP.gotoAndStop("E0");
}
else
{
_root.BT_WEB.Activer();
_root.BT_WEB.gotoAndStop("E1");
_root.BT_IMP.Activer();
_root.BT_IMP.gotoAndStop("E1");
}
}
function TexteAjuste()
{
if(TEXTE_TEMP == undefined)
{
TEXTE_TEMP = _root.FEUILLE.createTextField("TEXTE_TEMP",19234,-200,0,10,10);
TEXTE_TEMP.embedFonts = true;
TEXTE_TEMP.border = true;
TEXTE_TEMP.type = "dynamic";
TEXTE_TEMP.antiAliasType = "advanced";
TEXTE_TEMP.selectable = false;
TEXTE_TEMP.autoSize = true;
TEXTE_TEMP.multiline = true;
TEXTE_TEMP.wordWrap = true;
TEXTE_TEMP.text = "";
TEXTE_TEMP._visible = false;
}
TEXTE_TEMP._y = TEXTE._y;
TEXTE_TEMP._width = TEXTE._width;
TEXTE_TEMP.text = PARAMS_ATELIER.Texte;
TEXTE_TEMP.setTextFormat(PARAMS_ATELIER.FormatText);
}
function Load()
{
}
function NewMemo()
{
MEMO = {newGame:true};
var _loc4_ = _root.getTextById("LM_TEXTE");
PARAMS_ATELIER = {};
PARAMS_ATELIER.Texte = "";
PARAMS_ATELIER.FormatText = new TextFormat();
PARAMS_ATELIER.FormatTextTaille = new TextFormat();
PARAMS_ATELIER.FormatTextTaille.font = "Times New Roman";
PARAMS_ATELIER.FormatTextFamille = new TextFormat();
PARAMS_ATELIER.FormatTextFamille.size = 14;
PARAMS_ATELIER.FonteFamille = 1;
PARAMS_ATELIER.FonteCouleur = 1;
var _loc2_ = 0;
while(_loc2_ < FONTES_LISTE.length)
{
if(FONTES_LISTE[_loc2_] == FONTE_DEFAUT.font)
{
PARAMS_ATELIER.FonteFamille = _loc2_ + 1;
}
_loc2_ = _loc2_ + 1;
}
_loc2_ = 0;
while(_loc2_ < COULEUR_LISTE.length)
{
trace("FONTE_DEFAUT[\"color\"] : " + FONTE_DEFAUT.color);
trace("COULEUR_LISTE[i] : " + COULEUR_LISTE[_loc2_]);
if(COULEUR_LISTE[_loc2_] == FONTE_DEFAUT.color)
{
PARAMS_ATELIER.FonteCouleur = _loc2_ + 1;
}
_loc2_ = _loc2_ + 1;
}
PARAMS_ATELIER.FonteSize = Number(FONTE_DEFAUT.size);
trace("FONTE_DEFAUT[\"size\"] : " + FONTE_DEFAUT.size);
PARAMS_ATELIER.FonteBold = FONTE_DEFAUT.bold == "true" ? true : false;
PARAMS_ATELIER.FonteItalic = FONTE_DEFAUT.italic == "true" ? true : false;
PARAMS_ATELIER.NoPapier = Number(FONTE_DEFAUT.papier);
PARAMS_GENERATEUR = {};
PARAMS_GENERATEUR.SelectedElements = [undefined,0,0,0,0,0];
saveCookie();
MEMO_trace();
}
function LoadCookie()
{
MEMO = {newGame:Boolean(FlashCookie.data.newGame)};
PARAMS_ATELIER = {};
PARAMS_ATELIER.FormatText = new TextFormat();
PARAMS_ATELIER.FormatTextTaille = new TextFormat();
PARAMS_ATELIER.FormatTextTaille.font = "Times New Roman";
PARAMS_ATELIER.FormatTextFamille = new TextFormat();
PARAMS_ATELIER.FormatTextFamille.size = 14;
PARAMS_ATELIER.Texte = FlashCookie.data.Texte;
PARAMS_ATELIER.FonteFamille = FlashCookie.data.FonteFamille;
PARAMS_ATELIER.FonteCouleur = FlashCookie.data.FonteCouleur;
PARAMS_ATELIER.FonteSize = FlashCookie.data.FonteSize;
PARAMS_ATELIER.FonteBold = FlashCookie.data.FonteBold;
PARAMS_ATELIER.FonteItalic = FlashCookie.data.FonteItalic;
PARAMS_ATELIER.NoPapier = FlashCookie.data.NoPapier;
PARAMS_GENERATEUR = {};
PARAMS_GENERATEUR.SelectedElements = [];
var _loc1_ = 1;
while(_loc1_ <= 5)
{
PARAMS_GENERATEUR.SelectedElements[_loc1_] = FlashCookie.data.elements[_loc1_];
_loc1_ = _loc1_ + 1;
}
}
function MEMO_trace()
{
trace("\r_______MEMO_trace : " + MEMO_trace);
trace("MEMO : ");
for(var _loc1_ in MEMO)
{
trace("-- " + _loc1_ + " = " + MEMO[_loc1_]);
}
trace("PARAMS_ATELIER : ");
for(_loc1_ in PARAMS_ATELIER)
{
trace("-- " + _loc1_ + " = " + PARAMS_ATELIER[_loc1_]);
}
trace("PARAMS_GENERATEUR : ");
for(_loc1_ in PARAMS_GENERATEUR)
{
trace("-- " + _loc1_ + " = " + PARAMS_GENERATEUR[_loc1_]);
}
trace("____________________________");
}
function saveCookie()
{
FlashCookie.clear();
FlashCookie.data.newGame = MEMO.newGame;
FlashCookie.data.Texte = PARAMS_ATELIER.Texte;
FlashCookie.data.FonteFamille = PARAMS_ATELIER.FonteFamille;
FlashCookie.data.FonteCouleur = PARAMS_ATELIER.FonteCouleur;
FlashCookie.data.FonteSize = PARAMS_ATELIER.FonteSize;
FlashCookie.data.FonteBold = PARAMS_ATELIER.FonteBold;
FlashCookie.data.FonteItalic = PARAMS_ATELIER.FonteItalic;
FlashCookie.data.NoPapier = PARAMS_ATELIER.NoPapier;
FlashCookie.data.elements = PARAMS_GENERATEUR.SelectedElements;
FlashCookie.flush();
}
function BanksInit()
{
ZONE_ELEMENT_MODELE = {w:_root.banque1["A_" + _root.gModuleName + "_EL_01_01"]._width,h:_root.banque1["A_" + _root.gModuleName + "_EL_01_01"]._height};
var _loc10_ = _root.xConfig.BanquesTypes.split(",");
BANKS = [];
BANKS[0] = {};
BANKS[1] = {type:_loc10_[0],elements:[]};
BANKS[2] = {type:_loc10_[1],elements:[]};
BANKS[3] = {type:_loc10_[2],elements:[]};
BANKS[4] = {type:_loc10_[3],elements:[]};
BANKS[5] = {type:_loc10_[4],elements:[]};
var _loc6_ = 1;
while(_loc6_ <= 10)
{
var _loc4_ = 1;
while(_loc4_ <= BANKS.length)
{
if(BANKS[_loc4_].type == "swf")
{
BANKS[_loc4_].elements.push(_root["banque" + _loc4_]["A_" + _root.gModuleName + "_EL_" + gimme2digits(_loc4_) + "_" + gimme2digits(_loc6_)]);
}
else if(BANKS[_loc4_].type == "lm")
{
BANKS[_loc4_].elements.push(GetTexte("LM_" + gimme2digits(_loc4_) + "_" + gimme2digits(_loc6_),_loc4_));
}
_loc4_ = _loc4_ + 1;
}
_loc6_ = _loc6_ + 1;
}
var _loc5_ = undefined;
var _loc3_ = undefined;
_loc6_ = 1;
while(_loc6_ <= 5)
{
_loc5_ = BANKS[_loc6_];
_loc4_ = 0;
while(_loc4_ < 10)
{
_loc3_ = _loc5_.elements[_loc4_];
if(_loc5_.type == "swf")
{
_loc3_.onRollOver = function()
{
_root.joueSon({nomSon:this._name.split("_")[4] + "_" + this._name.split("_")[5],actionFin:"RIEN",zapBlock:"NOZAP_NOBLOCK"});
};
_loc3_.onRollOut = function()
{
_root.stopSon();
};
}
else if(_loc5_.type == "lm")
{
_loc3_.onRollOver = function()
{
_root.joueBruitage({nomSon:"B_" + this._name.split("_")[1] + "_" + this._name.split("_")[2]});
};
_loc3_.onRollOut = function()
{
_root.stopBruitage({nomSon:"B_" + this._name.split("_")[1] + "_" + this._name.split("_")[2]});
};
}
_loc3_.enabled = true;
_loc4_ = _loc4_ + 1;
}
_loc6_ = _loc6_ + 1;
}
}
function BankInit(no_bank)
{
BANKS[no_bank].selectedIndex = 0;
BankRefresh(no_bank);
}
function BankRefresh(no_bank)
{
var _loc2_ = BANKS[no_bank];
var _loc4_ = _root["ZONE_0" + no_bank];
}
function SlideViewerInit(no_bank)
{
var _loc0_ = null;
var _loc5_ = this["viewer" + no_bank] = new xb.classes.slide1.SlideViewer();
_loc5_.__set__elements(BANKS[no_bank].elements);
_loc5_.__set__dureeSlide(_root.xConfig.DureeSlide);
_loc5_.__set__vitesse1Cran(_root.xConfig.Vitesse1Cran);
_loc5_.__set__vitesseSlideMax(_root.xConfig.VitesseSlideMax);
_loc5_.__set__vitesseSlideMin(_root.xConfig.VitesseSlideMin);
_loc5_.elementsInit();
_loc5_.OnChange = function()
{
if(mod.ManetteEnCours == true)
{
var _loc3_ = true;
var _loc2_ = 1;
while(_loc2_ <= 5)
{
if(mod["viewer" + _loc2_].state == xb.classes.slide1.SlideViewer.STARTED)
{
_loc3_ = false;
break;
}
_loc2_ = _loc2_ + 1;
}
if(_loc3_ == true)
{
mod.ManetteEnCours = false;
mod.ElementsChanged = true;
_root.BT_ATELIER.gotoAndStop("E1");
_root.BT_ATELIER.Activer();
PARAMS_GENERATEUR.SelectedElements = [];
_loc2_ = 1;
while(_loc2_ <= 5)
{
PARAMS_GENERATEUR.SelectedElements[_loc2_] = mod["viewer" + _loc2_].selectedIndex;
_loc2_ = _loc2_ + 1;
}
FlashCookie.data.elements = PARAMS_GENERATEUR.SelectedElements;
trace("SelectedElements : " + PARAMS_GENERATEUR.SelectedElements);
FlashCookie.flush();
DebloquerActives();
_root.REP_MANETTE.Activer();
}
}
else
{
mod.ElementsChanged = true;
_root.BT_ATELIER.gotoAndStop("E1");
_root.BT_ATELIER.Activer();
PARAMS_GENERATEUR.SelectedElements = [];
_loc2_ = 1;
while(_loc2_ <= 5)
{
PARAMS_GENERATEUR.SelectedElements[_loc2_] = mod["viewer" + _loc2_].selectedIndex;
_loc2_ = _loc2_ + 1;
}
FlashCookie.data.elements = PARAMS_GENERATEUR.SelectedElements;
trace("SelectedElements : " + PARAMS_GENERATEUR.SelectedElements);
FlashCookie.flush();
}
};
}
function GenerateursSlideViewerInit()
{
GenerateurSlideViewerInit(1);
GenerateurSlideViewerInit(2);
GenerateurSlideViewerInit(3);
GenerateurSlideViewerInit(4);
GenerateurSlideViewerInit(5);
}
function GenerateurSlideViewerInit(no_bank)
{
var _loc4_ = _root["MASK_ZONE_0" + no_bank];
var _loc8_ = _root["MASK_ZONE_0" + no_bank];
_loc8_.swapDepths(5000 + no_bank);
_root["banque" + no_bank]._visible = true;
_root["banque" + no_bank].setMask(_loc8_);
var _loc5_ = this["viewer" + no_bank];
_loc5_.__set__zone_affichage({x:_loc4_._x - _loc4_._width / 2,y:_loc4_._y - _loc4_._height / 2,w:_loc4_._width,h:_loc4_._height});
_loc5_.elementsRefresh();
_loc5_.__set__selectedIndex(PARAMS_GENERATEUR.SelectedElements[no_bank]);
var _loc6_ = _root["BOUTON_0" + no_bank + "_D"];
var _loc7_ = _root["BOUTON_0" + no_bank + "_G"];
InitMC({mc:_loc6_,son:"B_FLE"});
_loc6_.Viewer = _loc5_;
_loc6_.OnPress = function()
{
this.Viewer.showElement("next");
};
InitMC({mc:_loc7_,son:"B_FLE"});
_loc7_.Viewer = _loc5_;
_loc7_.onPress = function()
{
this.Viewer.showElement("prev");
};
}
function AtelierSlideViewerInit(no_bank)
{
var _loc3_ = _root["AT_REP_ZONE_0" + no_bank];
var _loc6_ = _root["AT_REP_ZONE_0" + no_bank];
_loc6_.swapDepths(6000 + no_bank);
_root["banque" + no_bank]._visible = true;
_root["banque" + no_bank].setMask(_loc6_);
var _loc5_ = this["viewer" + no_bank];
_loc5_.__set__zone_affichage({x:_loc3_._x - _loc3_._width / 2,y:_loc3_._y - _loc3_._height / 2,w:_loc3_._width,h:_loc3_._height});
_loc5_.elementsRefresh();
_loc5_.__set__selectedIndex(PARAMS_GENERATEUR.SelectedElements[no_bank]);
}
function SlideStart(no_bank)
{
if(no_bank > 5)
{
return undefined;
}
BloquerActives();
mod.ManetteEnCours = true;
this["viewer" + no_bank].start();
ExecuterApresDelai({mcRef:this,methode:"SlideStart",params:no_bank + 1,delai:_root.xConfig.LancersEcart * randomValue(1,_root.xConfig.LancersEcart * 0.2)});
}
function PaletteInit()
{
if(this.PaletteIsInit != true)
{
this.PaletteIsInit = true;
}
PaletteBtnsInit();
TEXTE.text = PARAMS_ATELIER.Texte;
TEXTE.onChanged = function()
{
_root.LM_TEXTE._visible = false;
PARAMS_ATELIER_LAST = ObjectClone(PARAMS_ATELIER);
PARAMS_ATELIER.Texte = TEXTE.text;
if(_root.xConfig.ModeTexteBloquage == 2)
{
TexteAjuste();
if(TEXTE_TEMP._height > TEXTE._height)
{
PARAMS_ATELIER = PARAMS_ATELIER_LAST;
PaletteRefresh();
return undefined;
}
}
else if(_root.xConfig.ModeTexteBloquage == 3)
{
TexteAjuste();
if(TEXTE_TEMP._height > TEXTE._height)
{
if(PARAMS_ATELIER.FonteSize <= TAILLE_FONTE_LIMITE.min)
{
PARAMS_ATELIER = PARAMS_ATELIER_LAST;
}
else
{
PARAMS_ATELIER.FonteSize--;
}
PaletteRefresh();
return undefined;
}
}
else if(_root.xConfig.ModeTexteBloquage == 1)
{
TEXTE.autoSize = "left";
if(TEXTE._height > 400)
{
TEXTE.autoSize = "left";
}
else
{
TEXTE.autoSize = false;
TEXTE._height = 400;
}
}
else
{
TEXTE.autoSize = false;
}
if(PARAMS_ATELIER.Texte != "")
{
_root.BT_WEB.Activer();
_root.BT_WEB.gotoAndStop("E1");
_root.BT_IMP.Activer();
_root.BT_IMP.gotoAndStop("E1");
}
else
{
_root.BT_WEB.Desactiver();
_root.BT_WEB.gotoAndStop("E0");
_root.BT_IMP.Desactiver();
_root.BT_IMP.gotoAndStop("E0");
}
MEMO.newGame = FlashCookie.data.newGame = false;
FlashCookie.data.Texte = PARAMS_ATELIER.Texte;
FlashCookie.flush();
};
TEXTE.onScroller = function()
{
};
PaletteRefresh();
}
function ObjectClone(obj)
{
var _loc2_ = {};
for(var _loc3_ in obj)
{
_loc2_[_loc3_] = obj[_loc3_];
}
return _loc2_;
}
function PaletteBtnsInit()
{
InitMC({mc:PALETTE_TEXTE.NEXT_FONT});
PALETTE_TEXTE.NEXT_FONT.OnPress = function()
{
PARAMS_ATELIER.FonteFamille = PARAMS_ATELIER.FonteFamille < FONTES_LISTE.length ? PARAMS_ATELIER.FonteFamille + 1 : 1;
PaletteRefresh();
};
InitMC({mc:PALETTE_TEXTE.PREV_FONT});
PALETTE_TEXTE.PREV_FONT.OnPress = function()
{
PARAMS_ATELIER.FonteFamille = PARAMS_ATELIER.FonteFamille > 1 ? PARAMS_ATELIER.FonteFamille - 1 : FONTES_LISTE.length;
PaletteRefresh();
};
InitMC({mc:PALETTE_TEXTE.CORPS_PLUS});
PALETTE_TEXTE.CORPS_PLUS.OnPress = function()
{
PARAMS_ATELIER.FonteSize = PARAMS_ATELIER.FonteSize < TAILLE_FONTE_LIMITE.max ? PARAMS_ATELIER.FonteSize + 1 : TAILLE_FONTE_LIMITE.max;
PARAMS_ATELIER.SizeWanted = PARAMS_ATELIER.FonteSize;
PaletteRefresh();
};
InitMC({mc:PALETTE_TEXTE.CORPS_MOINS});
PALETTE_TEXTE.CORPS_MOINS.OnPress = function()
{
PARAMS_ATELIER.FonteSize = PARAMS_ATELIER.FonteSize > TAILLE_FONTE_LIMITE.min ? PARAMS_ATELIER.FonteSize - 1 : TAILLE_FONTE_LIMITE.min;
PARAMS_ATELIER.SizeWanted = PARAMS_ATELIER.FonteSize;
PaletteRefresh();
};
InitMC({mc:PALETTE_TEXTE.PLAIN});
PALETTE_TEXTE.PLAIN.OnPress = function()
{
PARAMS_ATELIER.FonteBold = false;
PARAMS_ATELIER.FonteItalic = false;
PaletteRefresh();
};
InitMC({mc:PALETTE_TEXTE.BOLD});
PALETTE_TEXTE.BOLD.OnPress = function()
{
PARAMS_ATELIER.FonteBold = PARAMS_ATELIER.FonteBold != true ? true : false;
PaletteRefresh();
};
InitMC({mc:PALETTE_TEXTE.ITALIC});
PALETTE_TEXTE.ITALIC.OnPress = function()
{
PARAMS_ATELIER.FonteItalic = PARAMS_ATELIER.FonteItalic != true ? true : false;
PaletteRefresh();
};
var _loc4_ = undefined;
var _loc3_ = 1;
while(_loc3_ <= 12)
{
_loc4_ = PALETTE_TEXTE["PAL_" + gimme2digits(_loc3_)];
_loc4_.No = _loc3_;
InitMC({mc:_loc4_});
_loc4_.OnPress = function()
{
PARAMS_ATELIER.FonteCouleur = this.No;
PaletteRefresh();
};
_loc3_ = _loc3_ + 1;
}
InitMC({mc:_root.PICTO_PAPIER,IB:"IB_PAPIER"});
_root.PICTO_PAPIER.OnPress = function()
{
PARAMS_ATELIER.NoPapier = PARAMS_ATELIER.NoPapier < 5 ? PARAMS_ATELIER.NoPapier + 1 : 1;
PaletteRefresh();
};
}
function PaletteRefresh()
{
trace("PaletteRefresh : " + PaletteRefresh);
saveCookie();
var _loc3_ = PARAMS_ATELIER.FormatText;
_loc3_.color = Number("0x" + COULEUR_LISTE[PARAMS_ATELIER.FonteCouleur - 1].slice(1));
_loc3_.size = PARAMS_ATELIER.FonteSize;
_loc3_.bold = PARAMS_ATELIER.FonteBold;
_loc3_.italic = PARAMS_ATELIER.FonteItalic;
_loc3_.font = FONTES_LISTE[PARAMS_ATELIER.FonteFamille - 1];
if(_root.xConfig.ModeTexteBloquage == 2)
{
TexteAjuste();
if(TEXTE_TEMP._height > TEXTE._height)
{
PARAMS_ATELIER = PARAMS_ATELIER_LAST;
PaletteRefresh();
return undefined;
}
}
else if(_root.xConfig.ModeTexteBloquage == 3)
{
TexteAjuste();
if(TEXTE_TEMP._height > TEXTE._height)
{
if(PARAMS_ATELIER.FonteSize <= TAILLE_FONTE_LIMITE.min)
{
PARAMS_ATELIER = PARAMS_ATELIER_LAST;
}
else
{
PARAMS_ATELIER.FonteSize--;
}
PaletteRefresh();
return undefined;
}
}
else if(_root.xConfig.ModeTexteBloquage == 1)
{
TEXTE.autoSize = "left";
if(TEXTE._height > 400)
{
TEXTE.autoSize = "left";
}
else
{
TEXTE.autoSize = false;
TEXTE._height = 400;
}
}
else
{
TEXTE.autoSize = false;
}
TEXTE.html = false;
TEXTE.antiAliasType = "advanced";
TEXTE.setNewTextFormat(_loc3_);
TEXTE.text = PARAMS_ATELIER.Texte;
PALETTE_TEXTE.texte_CORPS.setNewTextFormat(PARAMS_ATELIER.FormatTextTaille);
PALETTE_TEXTE.texte_CORPS.text = PARAMS_ATELIER.FonteSize;
PALETTE_TEXTE.texte_CORPS.antiAliasType = "advanced";
_loc3_ = PARAMS_ATELIER.FormatTextFamille;
_loc3_.color = Number("0x" + COULEUR_LISTE[PARAMS_ATELIER.FonteCouleur - 1].slice(1));
_loc3_.bold = PARAMS_ATELIER.FonteBold;
_loc3_.italic = PARAMS_ATELIER.FonteItalic;
_loc3_.font = FONTES_LISTE[PARAMS_ATELIER.FonteFamille - 1];
PALETTE_TEXTE.texte_FONT.antiAliasType = "advanced";
PALETTE_TEXTE.texte_FONT.setNewTextFormat(_loc3_);
PALETTE_TEXTE.texte_FONT.text = "Mobiclic";
if(PARAMS_ATELIER.FonteBold == true)
{
PALETTE_TEXTE.BOLD.outFrame = "E3";
PALETTE_TEXTE.BOLD.gotoAndStop("E3");
}
else
{
PALETTE_TEXTE.BOLD.outFrame = "E1";
PALETTE_TEXTE.BOLD.gotoAndStop("E1");
}
if(PARAMS_ATELIER.FonteItalic == true)
{
PALETTE_TEXTE.ITALIC.outFrame = "E3";
PALETTE_TEXTE.ITALIC.gotoAndStop("E3");
}
else
{
PALETTE_TEXTE.ITALIC.outFrame = "E1";
PALETTE_TEXTE.ITALIC.gotoAndStop("E1");
}
if(PARAMS_ATELIER.FonteItalic == false && PARAMS_ATELIER.FonteBold == false)
{
PALETTE_TEXTE.PLAIN.outFrame = "E3";
PALETTE_TEXTE.PLAIN.gotoAndStop("E3");
}
else
{
PALETTE_TEXTE.PLAIN.outFrame = "E1";
PALETTE_TEXTE.PLAIN.gotoAndStop("E1");
}
var _loc2_ = 1;
while(_loc2_ <= 12)
{
if(_loc2_ == PARAMS_ATELIER.FonteCouleur)
{
PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].outFrame = "E3";
PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].gotoAndStop("E3");
}
else
{
PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].outFrame = "E1";
PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].gotoAndStop("E1");
}
_loc2_ = _loc2_ + 1;
}
_root.PICTO_PAPIER.gotoAndStop("P" + PARAMS_ATELIER.NoPapier);
_root.FEUILLE.PAPIER.gotoAndStop("P" + PARAMS_ATELIER.NoPapier);
PARAMS_ATELIER_LAST = ObjectClone(PARAMS_ATELIER);
}
function TexteChampInit()
{
if(this.TexteChampInit == true)
{
return undefined;
}
this.TexteChampInit = true;
}
function GetTexte(codeLM, no_bank)
{
var _loc5_ = _root["banque" + no_bank];
if(_loc5_ == undefined)
{
_loc5_ = _root.createEmptyMovieClip("banque" + no_bank,4000 + no_bank);
}
var _loc8_ = _root.moduleInfo.returnNodeByPath("Module." + _root.gLangue + ".LegendesMedias");
var _loc7_ = _root.gereTextes.getTextById(_loc8_,codeLM);
var _loc4_ = getStyleLM(codeLM);
var _loc3_ = _loc5_.createEmptyMovieClip(codeLM,_root.chercheDepthPlus(_loc5_,0));
_loc3_.FOND = _root.creerRectangle({pere:_loc3_,level:1,alpha:Number(_loc4_.opaciteF),couleur:Number(_loc4_.couleurF),w:ZONE_ELEMENT_MODELE.w,h:ZONE_ELEMENT_MODELE.h});
trace("style[\"opaciteF\"] : " + _loc4_.opaciteF);
trace("Number(style[\"opaciteF\"]) : " + Number(_loc4_.opaciteF));
var _loc2_ = _loc3_.createTextField("TEXTE",2,0,0,ZONE_ELEMENT_MODELE.w,ZONE_ELEMENT_MODELE.h);
_loc2_._visible = true;
_loc2_.background = false;
_loc2_.wordWrap = true;
_loc2_.autoSize = true;
_loc2_.embedFonts = true;
_loc2_.selectable = false;
_loc2_.antiAliasType = "advanced";
var _loc10_ = _loc4_.textFormat;
_loc2_.setNewTextFormat(_loc10_);
_loc2_.text = _loc7_;
_loc2_._y = _loc3_._height / 2 - _loc2_._height / 2;
return _loc3_;
}
function randomValue(min, max)
{
var _loc1_ = Math.random() * (max - min + 1) + min;
return _loc1_;
}
function CONSEILS()
{
trace("CONSEILS : " + CONSEILS);
_root.BOITE_CONSEILS.gotoAndStop("E1");
AIDE_PERSO.gotoAndStop("E2");
_root.ZONE_ANIM.gotoAndStop("E1");
_root.gereTextes.afficheLM({codeLM:"LM_AIDE",mc:_root.LM});
_root.LM._visible = true;
if(mod.ConseilsFromLabel != undefined)
{
mod.fromLabel = mod.ConseilsFromLabel;
}
_root.FEUILLE.removeMovieClip();
_root.GEN_LM_AT.removeMovieClip();
_root.AT_REP_ZONE_01.removeMovieClip();
_root.AT_REP_ZONE_02.removeMovieClip();
_root.AT_REP_ZONE_03.removeMovieClip();
_root.AT_REP_ZONE_04.removeMovieClip();
_root.AT_REP_ZONE_05.removeMovieClip();
_root.GEN_LM.removeMovieClip();
_root.ZONE_CACHE_01.removeMovieClip();
_root.ZONE_CACHE_02.removeMovieClip();
_root.ZONE_CACHE_03.removeMovieClip();
_root.ZONE_CACHE_04.removeMovieClip();
_root.ZONE_CACHE_05.removeMovieClip();
_root.ZONE_CACHE_AT.removeMovieClip();
_root.MASK_ZONE_01.removeMovieClip();
_root.MASK_ZONE_02.removeMovieClip();
_root.MASK_ZONE_03.removeMovieClip();
_root.MASK_ZONE_04.removeMovieClip();
_root.MASK_ZONE_05.removeMovieClip();
var _loc4_ = 1;
while(_loc4_ <= 5)
{
_root["banque" + _loc4_]._visible = false;
_loc4_ = _loc4_ + 1;
}
InitMC({mc:_root.BT_RET_AIDE,son:"B_RET_AIDE",IB:"IB_RET_AIDE",OnPress:function()
{
_root.gotoAndStop(mod.fromLabel);
}});
AIDE_PERSO = _root.BERNARD;
var _loc5_ = undefined;
_loc4_ = 1;
while(_loc4_ <= 7)
{
_loc5_ = _root["PICTO_0" + _loc4_];
_loc5_.No = _loc4_;
_loc5_._visible = true;
_loc5_.CiblesDrag = [_root.BOITE_CONSEILS];
InitMC({mc:_loc5_,son:"B_0" + _loc4_,sonOnPress:"B_CLIC",IB:"IB_0" + _loc4_,CibleOverFrame:"E2",fonction:"dragdrop"});
_loc5_.OnPress = function()
{
_root.LM._visible = false;
};
_loc5_.PendantDrag = function()
{
if(this.CiblesTouchees[0] == _root.BOITE_CONSEILS)
{
if(this.LastCible != _root.BOITE_CONSEILS)
{
this.LastCible = _root.BOITE_CONSEILS;
_root.BOITE_CONSEILS.gotoAndStop("E2");
_root.joueBruitage({nomSon:"B_BOITE",actionFin:"FinBruitDepot0"});
}
}
else
{
this.LastCible = undefined;
_root.BOITE_CONSEILS.gotoAndStop("E1");
}
_global.CURSEUR._x = this._x;
_global.CURSEUR._y = this._y;
};
_loc5_.ApresDrag = function()
{
var me = this;
if(this.CiblesTouchees[0] == _root.BOITE_CONSEILS)
{
this._visible = false;
this.ComeBack();
_root.FinBruitDepot1 = function()
{
_root.FinBruitDepot2 = function()
{
_root.ZONE_ANIM.gotoAndStop("E3");
AIDE_PERSO.gotoAndStop("E1");
_root.gotoAndStop("AIDE_0" + me.No);
};
_root.BOITE_CONSEILS.gotoAndStop("E4");
_root.ZONE_ANIM.gotoAndStop("E2");
_root.joueBruitage({nomSon:"B_CRACHE",actionFin:"FinBruitDepot2"});
};
_root.BOITE_CONSEILS.gotoAndStop("E3");
_root.joueBruitage({nomSon:"B_DEPOT",actionFin:"FinBruitDepot1"});
}
else
{
this.ComeBack();
}
};
_loc4_ = _loc4_ + 1;
}
if(mod.ConseilsFromLabel != undefined)
{
mod.ConseilsFromLabel = undefined;
_root.FinAIDE_00 = function()
{
AIDE_PERSO.gotoAndStop("E2");
};
AIDE_PERSO.gotoAndStop("E1");
_root.joueSon({nomSon:"AIDE_00",actionFin:"FinAIDE_00"});
}
}
function BT_AIDE_Init(fromLabel)
{
AIDE_BTN = _root.BT_BERNARD;
InitMC({mc:AIDE_BTN,son:"B_BERNARD",FROM:fromLabel,IB:"IB_BERNARD",OnPress:function()
{
mod.ConseilsFromLabel = this.FROM;
_root.gotoAndStop("CONSEILS");
}});
}
_global.InitMC = InitMC;
_global.InitMC_reccurent = InitMC_reccurent;
_global.ResetMC = ResetMC;
_global.InitMC_standart = InitMC_standart;
_global.InitMC_BTN = InitMC_BTN;
_global.InitMC_dragdrop = InitMC_dragdrop;
_global.InitMC_slider = InitMC_slider;
_global.InitMC_titre = InitMC_titre;
_global.InitMC_texte = InitMC_texte;
_global.DistancePoints = DistancePoints;
_global.DistancePoints = DistancePoints;
_global.SetInterval = SetInterval;
_global.ClearInterval = ClearInterval;
_global.ClearAllIntervals = ClearAllIntervals;
_root.ExecuterApresDelaiNo = 0;
_global.ExecuterApresDelai = ExecuterApresDelai;
_global.BloquerActives = BloquerActives;
_global.DebloquerActives = DebloquerActives;
_global.LMaVider = new Array();
_global.LMaVider2 = new Array();
_global.trace_obj = trace_obj;
_global.xtrace_mc = xtrace_mc;
var mod = this;
var MEMO;
var FlashCookie;
trace("FlashCookie.getSize() : " + FlashCookie.getSize());
var MODE = "ATTENTE";
var FONTES_LISTE;
var FONTE_DEFAUT;
var COULEUR_LISTE;
var TAILLE_FONTE_LIMITE;
var BANKS;
var DIALOG_BOX_WEB;
var PALETTE_TEXTE;
var TEXTE;
var PARAMS_ATELIER;
var PARAMS_GENERATEUR;
var viewer1;
var viewer2;
var viewer3;
var viewer4;
var viewer5;
_root.StopAll = StopAll;
_root.ModulePause = ModulePause;
_root.ModuleResume = ModuleResume;
_root.InitChoixPartie = InitChoixPartie;
var TEXTE_TEMP;
var ZONE_ELEMENT_MODELE;
var PARAMS_ATELIER_LAST;
var PARAMS_ATELIER_AVANT_DERNIER;
var AIDE_PERSO;
var AIDE_BTN;