home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 157 / MOBICLIC157.ISO / pc / DATA / ANI157 / ANI157_00 / ANI157_00.swf / scripts / ani_00 / CapsuleAlgo.as next >
Text File  |  2013-09-17  |  22KB  |  643 lines

  1. package ani_00
  2. {
  3.    import com.milanpresse.engine.Engine;
  4.    import com.milanpresse.engine.initmovieclip.InteractiveMovie;
  5.    import com.milanpresse.engine.managers.PauseManager;
  6.    import com.milanpresse.engine.managers.TimelineManager;
  7.    import com.milanpresse.engine.medias.MediaImage;
  8.    import com.milanpresse.engine.medias.MediaSwf;
  9.    import com.milanpresse.engine.medias.MediaVideo;
  10.    import com.milanpresse.engine.timelines.Timeline;
  11.    import com.milanpresse.engine.timelines.TimelineLinear;
  12.    import com.milanpresse.engine.typeargument.CommentObject;
  13.    import com.milanpresse.engine.typeargument.NoiseObject;
  14.    import com.milanpresse.tools.GlobalesFunctions;
  15.    import flash.display.MovieClip;
  16.    import flash.display.Sprite;
  17.    import flash.events.MouseEvent;
  18.    
  19.    public class CapsuleAlgo
  20.    {
  21.        
  22.       
  23.       private var menu:MediaSwf;
  24.       
  25.       private var menuTimeline:MovieClip;
  26.       
  27.       private var menuTL:Timeline;
  28.       
  29.       private var mainClip:MediaSwf;
  30.       
  31.       private var mainTimeline:MovieClip;
  32.       
  33.       private var _engine:Engine;
  34.       
  35.       private var labelList:Array;
  36.       
  37.       private var _timeline_:TimelineLinear;
  38.       
  39.       private var _timelineManager:TimelineManager;
  40.       
  41.       private var _pauseManager:PauseManager;
  42.       
  43.       private var labelsCallback:Object;
  44.       
  45.       private var firstLabel:String;
  46.       
  47.       public var _console_:Console;
  48.       
  49.       public var OUTIL_02:Outil_02;
  50.       
  51.       public var OUTIL_04_01:Outil_04_01;
  52.       
  53.       public var OUTIL_09_02:Outil_09_02;
  54.       
  55.       public var OUTIL_10:Outil_10;
  56.       
  57.       private var gListeMasc:Array;
  58.       
  59.       private var BUG_NEUTRE:MediaSwf;
  60.       
  61.       private var WIKI_NEUTRE:MediaSwf;
  62.       
  63.       private var BUG_LOUPGAROU:MediaSwf;
  64.       
  65.       public var gDrag:MovieClip;
  66.       
  67.       private var gTypeRessource:String;
  68.       
  69.       private var cadreWidth:Number;
  70.       
  71.       private var cadreHeight:Number;
  72.       
  73.       public var gTimerOn:Boolean = false;
  74.       
  75.       public var videoPlaying:MediaVideo = null;
  76.       
  77.       private var VIDEO_04_02_01:MediaVideo;
  78.       
  79.       private var gFinVideo_04_02_01:Boolean;
  80.       
  81.       private var gFinComment_04_02_01:Boolean;
  82.       
  83.       private var cz:Sprite;
  84.       
  85.       public function CapsuleAlgo(engine:Engine)
  86.       {
  87.          var item:XML = null;
  88.          var myMc:InteractiveMovie = null;
  89.          var nbEtat:String = null;
  90.          var etatActif:String = null;
  91.          this.labelsCallback = {
  92.             "_01_02":this._label01_02,
  93.             "FIN_01":this.retourATTENTE,
  94.             "_02_01":this._label02_01,
  95.             "FIN_02":this.retourATTENTE,
  96.             "INIT_03_01_02":this.init_03_01_02,
  97.             "FIN_03_01":this.retourATTENTE,
  98.             "INIT_03_02_02":this.init_03_02_02,
  99.             "FIN_03_02":this.retourATTENTE,
  100.             "FIN_03_03":this.retourATTENTE,
  101.             "FIN_04_01":this.retourATTENTE,
  102.             "INIT_04_02":this.init_04_02,
  103.             "FIN_04_02":this.retourATTENTE,
  104.             "_05_01_CRI":this.labelCRI,
  105.             "FIN_05_01":this.retourATTENTE,
  106.             "FIN_05_02":this.retourATTENTE,
  107.             "FIN_06":this.retourATTENTE,
  108.             "FIN_07":this.retourATTENTE,
  109.             "FIN_08":this.retourATTENTE,
  110.             "FIN_09_01":this.retourATTENTE,
  111.             "FIN_09_02":this.retourATTENTE,
  112.             "affichage":this.labelAffichage,
  113.             "FIN_10":this.retourATTENTE
  114.          };
  115.          super();
  116.          this._engine = engine;
  117.          this._engine.playMusic({"code":"MU_01"});
  118.          this._engine.setSubtitles(this._engine.host.subtitlesOn);
  119.          this._engine.setFrameRate(12);
  120.          this.mainClip = this._engine.showSwf({
  121.             "code":"A_" + this._engine.config.moduleName,
  122.             "parent":this._engine.config.layers["content"]
  123.          });
  124.          this.mainTimeline = this.mainClip.swfContent;
  125.          this._timelineManager = new TimelineManager();
  126.          this._timeline_ = new TimelineLinear(this.mainTimeline,this._engine,this,this._timelineManager,this.labelsCallback);
  127.          this._engine.levelCZ = this._engine.config.layers["content"];
  128.          var myNode:XMLList = this._engine.config.XmlConfig.Module.Config.Outils.ou;
  129.          for each(item in myNode)
  130.          {
  131.             nbEtat = item.@nbEtats.toString();
  132.             etatActif = "";
  133.             etatActif = item.@etatActif.toString();
  134.             myMc = new InteractiveMovie(this.mainTimeline["OUTIL_" + item.@idOutil.toString()],this._timelineManager);
  135.             myMc.mc.pNbCran = Number(nbEtat);
  136.             if(etatActif != "")
  137.             {
  138.                if(myMc.mc.pNbCran == 1 && Number(etatActif) == 2)
  139.                {
  140.                   myMc.gotoAndStop("E" + nbEtat + "_1_1-0");
  141.                }
  142.                else
  143.                {
  144.                   myMc.gotoAndStop("E" + nbEtat);
  145.                }
  146.                myMc.mc.etatActif = Number(etatActif);
  147.             }
  148.             else
  149.             {
  150.                myMc.gotoAndStop("E" + nbEtat);
  151.             }
  152.          }
  153.          this.gListeMasc = [];
  154.          this._console_ = new Console(this.mainTimeline,this._engine,this,this._timelineManager,this._timeline_);
  155.          this.firstLabel = this.mainTimeline.currentLabels[0].name;
  156.          this._timeline_.GotoAndPlayUntil({
  157.             "labelPlay":this.firstLabel,
  158.             "labelStop":this.mainTimeline.currentLabels[1].frame - 1,
  159.             "callback":this._timeline_.nextLabel
  160.          });
  161.       }
  162.       
  163.       public function labelPLAY_00() : void
  164.       {
  165.          var myMc:InteractiveMovie = new InteractiveMovie(this.mainTimeline.sol,this._timelineManager);
  166.          myMc.gotoAndStop(1);
  167.       }
  168.       
  169.       public function label00_01_BG() : void
  170.       {
  171.          this.BUG_LOUPGAROU = this._engine.showSwf({
  172.             "code":"BUG_LOUPGAROU",
  173.             "parent":this._engine.config.layers["content"]
  174.          });
  175.       }
  176.       
  177.       public function label00_02() : void
  178.       {
  179.          this._engine.changeMusic({"code":"MU_02"});
  180.          this._engine.hideSwf({
  181.             "code":"BUG_LOUPGAROU",
  182.             "parent":this._engine.config.layers["content"]
  183.          });
  184.       }
  185.       
  186.       public function labelATTENTE() : void
  187.       {
  188.          trace("labelATTENTE");
  189.          this._console_.initOutils();
  190.       }
  191.       
  192.       public function retourATTENTE() : void
  193.       {
  194.          trace("retourATTENTE");
  195.          this._timeline_.GotoAndPlayUntil({"labelStop":"ATTENTE"});
  196.       }
  197.       
  198.       public function labelATTENTE_01() : void
  199.       {
  200.          trace("labelATTENTE_01");
  201.          var outil01:Outil_01 = new Outil_01(this.mainTimeline,this._engine,this,this._timelineManager,this._timeline_);
  202.       }
  203.       
  204.       public function _label01_02() : void
  205.       {
  206.          trace("_label01_02");
  207.          this._engine.playComment(new CommentObject({
  208.             "code":"01_02",
  209.             "callback":this.fin01
  210.          }));
  211.          var myMc:InteractiveMovie = new InteractiveMovie(this.mainTimeline.COMPART_A,this._timelineManager);
  212.          myMc.gotoAndPlayUntil({
  213.             "labelPlay":1,
  214.             "labelStop":"ATTENTE"
  215.          });
  216.          myMc = new InteractiveMovie(this.mainTimeline.COMPART_A.BT_CROIX,this._timelineManager);
  217.          myMc.gotoAndStop(1);
  218.       }
  219.       
  220.       public function fin01() : void
  221.       {
  222.          trace("labelPLAY_01_FIN");
  223.          var myMc:InteractiveMovie = new InteractiveMovie(this.mainTimeline.COMPART_A,this._timelineManager);
  224.          myMc.gotoAndPlayUntilTheEnd("FERMER",this._timeline_.nextLabel);
  225.       }
  226.       
  227.       public function labelPLAY_02_DEBUT() : void
  228.       {
  229.          trace("labelPLAY_02_DEBUT");
  230.          var myMc2:InteractiveMovie = new InteractiveMovie(this.mainTimeline.ANIM_POIDS,this._timelineManager);
  231.          myMc2.gotoAndPlayUntil({
  232.             "labelPlay":1,
  233.             "beforeLabelStop":"DEPART"
  234.          });
  235.          this.OUTIL_02 = new Outil_02(this.mainTimeline,this._engine,this,this._timelineManager,this._timeline_);
  236.       }
  237.       
  238.       public function labelATTENTE_02() : void
  239.       {
  240.          trace("labelATTENTE_02");
  241.          this.OUTIL_02.active();
  242.       }
  243.       
  244.       public function _label02_01() : void
  245.       {
  246.          trace("_label02_01");
  247.          this._engine.playComment(new CommentObject({
  248.             "code":"02_01",
  249.             "callback":this.fin02
  250.          }));
  251.          var myMc:InteractiveMovie = new InteractiveMovie(this.mainTimeline.COMPART_B,this._timelineManager);
  252.          myMc.gotoAndPlayUntil({
  253.             "labelPlay":1,
  254.             "labelStop":"ATTENTE"
  255.          });
  256.          myMc = new InteractiveMovie(this.mainTimeline.COMPART_B.BT_CROIX,this._timelineManager);
  257.          myMc.gotoAndStop(1);
  258.       }
  259.       
  260.       public function fin02() : void
  261.       {
  262.          trace("labelPLAY_02_FIN");
  263.          var myMc:InteractiveMovie = new InteractiveMovie(this.mainTimeline.COMPART_B,this._timelineManager);
  264.          myMc.gotoAndPlayUntilTheEnd("FERMER",this._timeline_.nextLabel);
  265.       }
  266.       
  267.       public function init_03_01_02() : void
  268.       {
  269.          this._timeline_.GotoAndPlayUntil({
  270.             "labelPlay":this.mainTimeline.currentFrame,
  271.             "labelStop":"ATTENTE_03_01_02"
  272.          });
  273.          var myMc:InteractiveMovie = new InteractiveMovie(this.mainTimeline.ANIM_03_01,this._timelineManager);
  274.          myMc.gotoAndPlayUntil({
  275.             "labelPlay":1,
  276.             "labelStop":"PH01",
  277.             "callback":this.init_03_01_02_PH01
  278.          });
  279.       }
  280.       
  281.       public function init_03_01_02_PH01() : void
  282.       {
  283.          var nom_du_son:String = "03_01_02";
  284.          this._engine.playComment(new CommentObject({
  285.             "code":nom_du_son,
  286.             "callback":this.finComment_03_01_02
  287.          }));
  288.          this.afficheDiapo("PH" + nom_du_son,this.mainTimeline.ANIM_03_01.PH01);
  289.       }
  290.       
  291.       public function finComment_03_01_02() : void
  292.       {
  293.          var myMc:InteractiveMovie = null;
  294.          trace("fin son 03_01_02");
  295.          var myMedia:MediaImage = this._engine.getMediaImage("03_01_03");
  296.          if(myMedia === null)
  297.          {
  298.             myMc = new InteractiveMovie(this.mainTimeline.ANIM_03_01,this._timelineManager);
  299.             myMc.gotoAndPlayUntilTheEnd("FIN",this._timeline_.nextLabel);
  300.          }
  301.       }
  302.       
  303.       public function init_03_02_02() : void
  304.       {
  305.          this._timeline_.GotoAndPlayUntil({
  306.             "labelPlay":this.mainTimeline.currentFrame,
  307.             "labelStop":"ATTENTE_03_02_02"
  308.          });
  309.          var myMc:InteractiveMovie = new InteractiveMovie(this.mainTimeline.ANIM_03_02,this._timelineManager);
  310.          myMc.gotoAndPlayUntil({
  311.             "labelPlay":1,
  312.             "labelStop":"PH01",
  313.             "callback":this.init_03_02_02_PH01
  314.          });
  315.       }
  316.       
  317.       public function init_03_02_02_PH01() : void
  318.       {
  319.          var nom_du_son:String = "03_02_02";
  320.          this._engine.playComment(new CommentObject({
  321.             "code":nom_du_son,
  322.             "callback":this.finComment_03_02_02
  323.          }));
  324.          this.afficheDiapo("PH" + nom_du_son,this.mainTimeline.ANIM_03_02.PH01);
  325.       }
  326.       
  327.       public function finComment_03_02_02() : void
  328.       {
  329.          var myMc:InteractiveMovie = null;
  330.          trace("fin son 03_02_02");
  331.          var myMedia:MediaImage = this._engine.getMediaImage("03_02_03");
  332.          if(myMedia === null)
  333.          {
  334.             myMc = new InteractiveMovie(this.mainTimeline.ANIM_03_02,this._timelineManager);
  335.             myMc.gotoAndPlayUntilTheEnd("FIN",this._timeline_.nextLabel);
  336.          }
  337.       }
  338.       
  339.       public function labelPLAY_04_01_DEBUT() : void
  340.       {
  341.          trace("labelPLAY_04_01_DEBUT");
  342.          this.OUTIL_04_01 = new Outil_04_01(this.mainTimeline,this._engine,this,this._timelineManager,this._timeline_);
  343.       }
  344.       
  345.       public function label04_01_01() : void
  346.       {
  347.          this.OUTIL_04_01.afficheFirstLM();
  348.       }
  349.       
  350.       public function labelATTENTE_04_01() : void
  351.       {
  352.          trace("labelATTENTE_04_01");
  353.          this.OUTIL_04_01.active();
  354.       }
  355.       
  356.       public function init_04_02() : void
  357.       {
  358.          this._timeline_.GotoAndPlayUntil({
  359.             "labelPlay":this.mainTimeline.currentFrame,
  360.             "labelStop":"ATTENTE_04_02"
  361.          });
  362.          var myMc:InteractiveMovie = new InteractiveMovie(this.mainTimeline.ANIM_04_02,this._timelineManager);
  363.          myMc.gotoAndPlayUntil({
  364.             "labelPlay":1,
  365.             "labelStop":"ATTENTE",
  366.             "callback":this.initVideo_04_02
  367.          });
  368.       }
  369.       
  370.       public function initVideo_04_02() : void
  371.       {
  372.          this.cz = GlobalesFunctions.createRectangle({
  373.             "color":65280,
  374.             "alpha":0
  375.          });
  376.          this.cz.addEventListener(MouseEvent.CLICK,function():void
  377.          {
  378.             trace("clic zap video");
  379.             finVideo04_02_01(true);
  380.          });
  381.          this.mainTimeline.ANIM_04_02.addChild(this.cz);
  382.          this.cz.x = -400;
  383.          this.cz.y = -300;
  384.          this.cz.visible = true;
  385.          var myMc:InteractiveMovie = new InteractiveMovie(this.mainTimeline.ANIM_04_02.video,this._timelineManager);
  386.          myMc.gotoAndStop(this.mainTimeline.ANIM_04_02.video.totalFrames);
  387.          var nom_du_son:String = "04_02_01";
  388.          this.gFinVideo_04_02_01 = false;
  389.          this.gFinComment_04_02_01 = false;
  390.          this._engine.playComment(new CommentObject({
  391.             "code":nom_du_son,
  392.             "callback":this.finComment_04_02_01
  393.          }));
  394.          trace("mainTimeline.ANIM_04_02.video.videoBox",this.mainTimeline.ANIM_04_02.video.videoBox);
  395.          this.VIDEO_04_02_01 = this._engine.showVideo({
  396.             "parent":this.mainTimeline.ANIM_04_02.video.videoBox,
  397.             "code":"VID04_02_01"
  398.          });
  399.          this.videoPlaying = this.VIDEO_04_02_01;
  400.          this.VIDEO_04_02_01.play(0,this.finVideo04_02_01);
  401.       }
  402.       
  403.       public function finComment_04_02_01() : void
  404.       {
  405.          this.gFinComment_04_02_01 = true;
  406.          if(this.gFinVideo_04_02_01)
  407.          {
  408.             this.suite_04_02_01();
  409.          }
  410.       }
  411.       
  412.       public function finVideo04_02_01(zap:Boolean = false) : void
  413.       {
  414.          if(!zap)
  415.          {
  416.             this.videoPlaying = null;
  417.          }
  418.          this.mainTimeline.ANIM_04_02.removeChild(this.cz);
  419.          this.gFinVideo_04_02_01 = true;
  420.          if(this.gFinComment_04_02_01)
  421.          {
  422.             this.suite_04_02_01(zap);
  423.          }
  424.       }
  425.       
  426.       public function suite_04_02_01(zap:Boolean = false) : void
  427.       {
  428.          var myMc:InteractiveMovie = null;
  429.          if(this.mainTimeline.ANIM_04_02 !== null)
  430.          {
  431.             myMc = new InteractiveMovie(this.mainTimeline.ANIM_04_02,this._timelineManager);
  432.             if(!zap)
  433.             {
  434.                myMc.gotoAndPlayUntilTheEnd("FERMER",this._timeline_.nextLabel);
  435.             }
  436.             else
  437.             {
  438.                myMc.gotoAndPlayUntilTheEnd("FERMER",this.finVideoZap);
  439.             }
  440.          }
  441.       }
  442.       
  443.       public function finVideoZap() : void
  444.       {
  445.          this.videoPlaying = null;
  446.          this._timeline_.nextLabel();
  447.       }
  448.       
  449.       public function labelCRI() : void
  450.       {
  451.          var myMc:InteractiveMovie = new InteractiveMovie(this.mainTimeline.ANIM_CRI,this._timelineManager);
  452.          myMc.gotoAndPlayUntilTheEnd(1,this.finANIM_CRI);
  453.       }
  454.       
  455.       public function finANIM_CRI() : void
  456.       {
  457.          this._timeline_.nextLabel();
  458.       }
  459.       
  460.       public function label07_02_BG() : void
  461.       {
  462.          this.BUG_NEUTRE = this._engine.showSwf({
  463.             "code":"BUG_NEUTRE",
  464.             "parent":this._engine.config.layers["content"]
  465.          });
  466.          var bugBouche:InteractiveMovie = new InteractiveMovie(this.BUG_NEUTRE.swfContent.BUG.BUG.BOUCHE,this._timelineManager);
  467.          bugBouche.gotoAndPlay(1);
  468.       }
  469.       
  470.       public function label07_03() : void
  471.       {
  472.          this._engine.hideSwf({
  473.             "code":"BUG_NEUTRE",
  474.             "parent":this._engine.config.layers["content"]
  475.          });
  476.       }
  477.       
  478.       public function labelPLAY_09_02_DEBUT() : void
  479.       {
  480.          trace("labelPLAY_09_02_DEBUT");
  481.          this.OUTIL_09_02 = new Outil_09_02(this.mainTimeline,this._engine,this,this._timelineManager,this._timeline_);
  482.       }
  483.       
  484.       public function label09_02() : void
  485.       {
  486.          this.OUTIL_09_02.active();
  487.       }
  488.       
  489.       public function labelATTENTE_09_02() : void
  490.       {
  491.       }
  492.       
  493.       public function labelPLAY_10_DEBUT() : void
  494.       {
  495.          trace("labelPLAY_10_DEBUT");
  496.          this.OUTIL_10 = new Outil_10(this.mainTimeline,this._engine,this,this._timelineManager,this._timeline_);
  497.       }
  498.       
  499.       public function labelAffichage() : void
  500.       {
  501.          this.OUTIL_10.active();
  502.       }
  503.       
  504.       public function labelATTENTE_10() : void
  505.       {
  506.          trace("labelATTENTE_10");
  507.          var myMc:InteractiveMovie = new InteractiveMovie(this.mainTimeline.FICHE["BT_PRINT"],this._timelineManager);
  508.          myMc.mc.mcI = myMc;
  509.          myMc.mc.onRollOver = function(p:Object):void
  510.          {
  511.             if(gDrag == null)
  512.             {
  513.                _engine.playNoise(new NoiseObject({"code":"B_PRINT"}));
  514.                this.mcI.gotoAndPlayUntilTheEnd("E2");
  515.             }
  516.          };
  517.          myMc.mc.onRollOut = function(p:Object):void
  518.          {
  519.             if(gDrag == null)
  520.             {
  521.                _engine.stopNoise(new NoiseObject({"code":"B_PRINT"}));
  522.                this.mcI.gotoAndStop("E1");
  523.             }
  524.          };
  525.          myMc.mc.onPress = function(p:Object):void
  526.          {
  527.             _engine.stopNoise(new NoiseObject({"code":"B_PRINT"}));
  528.             new PrintableSprite(mainTimeline.FICHE.FICHE,_engine.config.ROOT_APP).print();
  529.          };
  530.          myMc.activeMC();
  531.       }
  532.       
  533.       public function afficheDiapo(pCode:String, mc:MovieClip) : void
  534.       {
  535.          var mc2:Sprite = null;
  536.          var myMedia2:MediaVideo = null;
  537.          var myMedia:MediaImage = this._engine.getMediaImage(pCode);
  538.          if(myMedia !== null)
  539.          {
  540.             this.gTypeRessource = "jpg";
  541.             this.cadreWidth = mc.width;
  542.             this.cadreHeight = mc.height;
  543.             mc2 = new Sprite();
  544.             mc.addChild(mc2);
  545.             mc2.addChild(myMedia.image);
  546.             this.adapteImage(mc2);
  547.          }
  548.          else
  549.          {
  550.             myMedia2 = this._engine.getMediaVideo(pCode);
  551.             if(myMedia2 !== null)
  552.             {
  553.                if(this.gTypeRessource == "jpg")
  554.                {
  555.                }
  556.                this.gTypeRessource = "flv";
  557.             }
  558.          }
  559.       }
  560.       
  561.       private function adapteImage(myC:Sprite, pFin:Number = 0) : void
  562.       {
  563.          var pCent:Number = NaN;
  564.          trace("cadrewidth + cadreHeight --> " + this.cadreWidth + " _ " + this.cadreHeight);
  565.          this.cadreWidth += 2;
  566.          this.cadreHeight += 2;
  567.          var general_width:Number = myC.width;
  568.          var general_height:Number = myC.height;
  569.          var pCentW:Number = this.cadreWidth * 100 / general_width;
  570.          var pCentH:Number = this.cadreHeight * 100 / general_height;
  571.          var myMc:Sprite = myC;
  572.          if(myMc.width > myMc.height)
  573.          {
  574.             pCent = this.cadreWidth * 100 / myMc.width;
  575.             if(myMc.height * pCent / 100 > this.cadreHeight)
  576.             {
  577.                pCent = this.cadreHeight * 100 / myMc.height;
  578.             }
  579.          }
  580.          else
  581.          {
  582.             pCent = this.cadreHeight * 100 / myMc.height;
  583.             if(myMc.width * pCent / 100 > this.cadreWidth)
  584.             {
  585.                pCent = this.cadreWidth * 100 / myMc.width;
  586.             }
  587.          }
  588.          myC.width = myC.width * pCentW / 100;
  589.          myC.height = myC.height * pCentH / 100;
  590.          myC.x = 0;
  591.          myC.y = 0;
  592.          myC.visible = true;
  593.       }
  594.       
  595.       public function G2D(value:int) : String
  596.       {
  597.          return GlobalesFunctions.gimme2digits(value);
  598.       }
  599.       
  600.       public function endMODULE() : void
  601.       {
  602.          trace("fin du module");
  603.       }
  604.       
  605.       public function sleep() : void
  606.       {
  607.          this._pauseManager = new PauseManager(this._engine,this._timelineManager);
  608.          this._pauseManager.sleepMovie(this.mainTimeline);
  609.          if(this.gTimerOn == true)
  610.          {
  611.             this.OUTIL_10.timerBloc.pause();
  612.          }
  613.          if(this.videoPlaying !== null)
  614.          {
  615.             this.videoPlaying.pause();
  616.          }
  617.       }
  618.       
  619.       public function wake() : void
  620.       {
  621.          this._pauseManager.wakeMovie(this.mainTimeline);
  622.          if(this.gTimerOn == true)
  623.          {
  624.             this.OUTIL_10.timerBloc.resume();
  625.          }
  626.          if(this.videoPlaying !== null)
  627.          {
  628.             this.videoPlaying.resume();
  629.          }
  630.       }
  631.       
  632.       public function destroy() : void
  633.       {
  634.          if(this._engine.cursor !== null)
  635.          {
  636.             this._engine.cursor.destroy();
  637.          }
  638.          this._engine.stopAllSounds();
  639.          this._timeline_.kilListeners();
  640.       }
  641.    }
  642. }
  643.