home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 145 / MOBICLIC145.ISO / pc / DATA / DSS145 / DSS145_08 / DSS145_08.swf / scripts / dss145_08 / BtRetour.as next >
Text File  |  2012-07-18  |  2KB  |  66 lines

  1. package dss145_08
  2. {
  3.    import com.milanpresse.engine.Engine;
  4.    import com.milanpresse.engine.initmovieclip.InteractiveMovie;
  5.    import com.milanpresse.engine.managers.TimelineManager;
  6.    import com.milanpresse.engine.medias.MediaSwf;
  7.    import com.milanpresse.engine.typeargument.NoiseObject;
  8.    import flash.net.SharedObject;
  9.    
  10.    public class BtRetour
  11.    {
  12.        
  13.       
  14.       private var BT_RETOUR:InteractiveMovie;
  15.       
  16.       private var gListDone:Array;
  17.       
  18.       private var gDoneDepart:Boolean;
  19.       
  20.       public function BtRetour(_engine:Engine, _timelineManager:TimelineManager, so:SharedObject)
  21.       {
  22.          var BT_RETOURswf:MediaSwf = null;
  23.          super();
  24.          BT_RETOURswf = _engine.showSwf({
  25.             "code":"BT_RETOUR",
  26.             "parent":_engine.config.layers["menu"]
  27.          });
  28.          this.gListDone = so.data.listDone;
  29.          this.gDoneDepart = this.gListDone[_engine.config.moduleNum - 1] == 1;
  30.          this.BT_RETOUR = new InteractiveMovie(BT_RETOURswf.swfContent,_timelineManager);
  31.          this.BT_RETOUR.gotoAndStop(1);
  32.          this.BT_RETOUR.mc.onRollOver = function(p:Object):void
  33.          {
  34.             this.gotoAndStop(2);
  35.             _engine.playNoise(new NoiseObject({"code":"B_RET"}));
  36.             _engine.showIB({
  37.                "id":"IB_RET",
  38.                "reference":BT_RETOURswf.swfContent
  39.             });
  40.          };
  41.          this.BT_RETOUR.mc.onRollOut = function(p:Object):void
  42.          {
  43.             this.gotoAndStop(1);
  44.             _engine.stopNoise(new NoiseObject({"code":"B_RET"}));
  45.             _engine.hideIB();
  46.          };
  47.          this.BT_RETOUR.mc.onPress = function(p:Object):void
  48.          {
  49.             _engine.stopNoise(new NoiseObject({"code":"B_RET"}));
  50.             this.kill();
  51.             if(gDoneDepart)
  52.             {
  53.                so.data.lastDone = 2;
  54.             }
  55.             else
  56.             {
  57.                so.data.lastDone = 0;
  58.             }
  59.             so.flush();
  60.             _engine.host.changeModule({"numMod":0});
  61.          };
  62.          this.BT_RETOUR.activeMC();
  63.       }
  64.    }
  65. }
  66.