home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 135
/
MOBICLIC135.ISO
/
pc
/
DATA
/
HOTE
/
libs
/
o
/
xb.swf
/
scripts
/
frame_1
/
DoAction.as
Wrap
Text File
|
2011-06-22
|
7KB
|
245 lines
function Test_xb()
{
trace("----------------------- Test_xb----- : " + Test_xb);
}
function StopAll()
{
ClearAllIntervals();
Mouse.show();
}
function ModulePause(p)
{
trace("xbModulePause : ");
if(_root.PauseEnCours == true)
{
return undefined;
}
_root.PauseEnCours = true;
ClearAllIntervals();
if(p == "jeu")
{
_root.Interface.NePasReferencer = true;
_o_.FigerMCs(_root);
trace("_o_.FigerMCs : " + _o_.FigerMCs);
trace("_o_ : " + _o_);
}
}
function ModuleResume(p)
{
trace("ModuleResume : " + ModuleResume);
if(_root.PauseEnCours != true)
{
return undefined;
}
if(p == "jeu")
{
_o_.DefigerMCs();
}
_root.PauseEnCours = false;
}
function FigerMCs(mc)
{
trace("FigerMCs : " + FigerMCs);
_xb_.ClipToPause = mc.Referencer();
var inc1 = 0;
_xb_.onEnterFrame = function()
{
inc1++;
if(inc1 == 1)
{
for(var _loc1_ in _xb_.ClipToPause)
{
if(typeof _xb_.ClipToPause[_loc1_] == "movieclip")
{
_xb_.ClipToPause[_loc1_].PauseFrame = _xb_.ClipToPause[_loc1_]._currentframe;
}
}
}
else if(inc1 == 2)
{
for(_loc1_ in _xb_.ClipToPause)
{
if(typeof _xb_.ClipToPause[_loc1_] == "movieclip")
{
_xb_.ClipToPause[_loc1_].PauseFrame2 = _xb_.ClipToPause[_loc1_]._currentframe;
if(_xb_.ClipToPause[_loc1_].PauseFrame2 != _xb_.ClipToPause[_loc1_].PauseFrame)
{
_xb_.ClipToPause[_loc1_].EnCoursDeLecture = true;
_xb_.ClipToPause[_loc1_].stop();
}
else
{
_xb_.ClipToPause[_loc1_].EnCoursDeLecture = false;
}
}
}
delete _xb_.onEnterFrame;
}
};
}
function DefigerMCs()
{
for(var _loc2_ in _xb_.ClipToPause)
{
if(typeof _xb_.ClipToPause[_loc2_] == "movieclip")
{
_xb_.ClipToPause[_loc2_].DejaReference = false;
if(_xb_.ClipToPause[_loc2_].EnCoursDeLecture == true)
{
_xb_.ClipToPause[_loc2_].play();
}
}
}
_root.PauseEnCours = false;
}
function Rectangle(p)
{
var _loc16_ = p.x != undefined ? p.x : 0;
var _loc14_ = p.y != undefined ? p.y : 0;
if(p.w != undefined)
{
var _loc9_ = p.w;
}
else
{
_loc9_ = Stage.width;
}
if(p.h != undefined)
{
var _loc15_ = p.h;
}
else
{
_loc9_ = Stage.height;
}
var _loc12_ = p.pere != undefined ? p.pere : _root;
var _loc10_ = p.level != undefined ? p.level : 10;
var _loc13_ = p.couleur != undefined ? p.couleur : 0;
var _loc11_ = p.nom != undefined ? p.nom : "ClipSansNom";
var _loc4_ = p.courbure != undefined ? p.courbure : 0;
var _loc17_ = p.alpha != undefined ? p.alpha : 100;
var _loc6_ = 0;
var _loc7_ = 0;
var _loc8_ = _loc9_;
var _loc5_ = _loc15_;
var _loc3_ = _loc12_.createEmptyMovieClip(_loc11_,_loc10_);
_loc3_._alpha = _loc17_;
_loc3_.beginFill(_loc13_,100);
_loc3_.moveTo(_loc6_,_loc5_ - _loc4_);
_loc3_.lineTo(_loc6_,_loc7_ + _loc4_);
_loc3_.curveTo(_loc6_,_loc7_,_loc6_ + _loc4_,_loc7_);
_loc3_.lineTo(_loc8_ - _loc4_,_loc7_);
_loc3_.curveTo(_loc8_,_loc7_,_loc8_,_loc7_ + _loc4_);
_loc3_.lineTo(_loc8_,_loc5_ - _loc4_);
_loc3_.curveTo(_loc8_,_loc5_,_loc8_ - _loc4_,_loc5_);
_loc3_.lineTo(_loc6_ + _loc4_,_loc5_);
_loc3_.curveTo(_loc6_,_loc5_,_loc6_,_loc5_ - _loc4_);
_loc3_.endFill();
_loc3_._x = _loc16_;
_loc3_._y = _loc14_;
return _loc3_;
}
function ConvertTimeToString(p)
{
var _loc2_ = p.Temps;
var _loc4_ = ":";
var _loc9_ = undefined;
var _loc5_ = undefined;
var _loc3_ = undefined;
var _loc6_ = undefined;
if(p.ModeAffichage == "hr:mn:sc")
{
_loc9_ = Math.floor(_loc2_ / 3600000);
var _loc10_ = _loc2_ % 3600000;
_loc5_ = Math.floor(_loc10_ / 60000);
var _loc8_ = _loc2_ % 60000;
_loc3_ = Math.floor(_loc8_ / 1000);
_loc6_ = Math.floor(_loc8_ % 1000 / 10);
Tstr = _root.gimme2digits(_loc9_) + _loc4_ + _root.gimme2digits(_loc5_) + _loc4_ + _root.gimme2digits(_loc3_);
}
else if(p.ModeAffichage == "mn:sc:cs")
{
_loc5_ = Math.floor(_loc2_ / 60000);
_loc8_ = _loc2_ % 60000;
_loc3_ = Math.floor(_loc8_ / 1000);
_loc6_ = Math.floor(_loc8_ % 1000 / 10);
Tstr = _root.gimme2digits(_loc5_) + _loc4_ + _root.gimme2digits(_loc3_) + _loc4_ + _root.gimme2digits(_loc6_);
}
else if(p.ModeAffichage == "mn:sc")
{
_loc5_ = Math.floor(_loc2_ / 60000);
_loc8_ = _loc2_ % 60000;
_loc3_ = Math.floor(_loc8_ / 1000);
_loc6_ = Math.floor(_loc8_ % 1000 / 10);
Tstr = _root.gimme2digits(_loc5_) + _loc4_ + _root.gimme2digits(_loc3_);
}
else if(p.ModeAffichage == "sc:cs")
{
_loc5_ = Math.floor(_loc2_ / 60000);
_loc8_ = _loc2_ % 60000;
_loc3_ = Math.floor(_loc8_ / 1000);
_loc6_ = Math.floor(_loc8_ % 1000 / 10);
Tstr = _root.gimme2digits(_loc3_) + _loc4_ + _root.gimme2digits(_loc6_);
}
return Tstr;
}
function RelanceLancer(p)
{
if(_root.RelanceLancer == undefined)
{
_root.RelanceLancer = function(p)
{
if(p != undefined)
{
_root.RelanceParams = p;
}
trace("(!) RELANCE de " + _root.RelanceParams.nomSon + " dans " + _root.RelanceParams.delai + " sec");
_root.RELANCE_INTERVAL_ID = _xlib1_.ExecuterApresDelai({mcRef:_root,methode:"RelanceLancer2",delai:_root.RelanceParams.delai});
};
_root.RelanceLancer2 = function(p)
{
trace("(!) RELANCE : " + _root.RelanceParams.nomSon);
_root.joueSon({nomSon:_root.RelanceParams.nomSon,actionFin:"RelanceLancer",zapBlock:"NOZAP_NOBLOCK"});
};
}
_root.RelanceLancer(p);
}
function RelanceStop()
{
trace("(!) RELANCE Stop");
ClearInterval(_root.RELANCE_INTERVAL_ID);
_root.stopComment();
}
var _xb_ = this;
_o_.Test_xb = Test_xb;
_o_.ModulePause = ModulePause;
_o_.ModuleResume = ModuleResume;
_o_.FigerMCs = FigerMCs;
MovieClip.prototype.Referencer = function()
{
trace("Referencer : " + this);
if(arguments[0] == undefined)
{
var _loc3_ = [];
}
else
{
_loc3_ = arguments[0];
}
_loc3_.push(this);
this.DejaReference = true;
for(var _loc4_ in this)
{
if(typeof this[_loc4_] == "movieclip" && this[_loc4_].DejaReference != true && this[_loc4_].NePasReferencer != true)
{
this[_loc4_].Referencer(_loc3_);
}
}
return _loc3_;
};
_o_.DefigerMCs = DefigerMCs;
_o_.Rectangle = Rectangle;
_o_.ConvertTimeToString = ConvertTimeToString;
_o_.RelanceLancer = RelanceLancer;
_o_.RelanceStop = RelanceStop;