home *** CD-ROM | disk | FTP | other *** search
- function efface()
- {
- var i = 0;
- while(i < tabObjs.length)
- {
- eval(tabObjs[i])._visible = false;
- i++;
- }
- var i = 1;
- while(i < 8)
- {
- this["d" + i].num = i;
- this["d" + i]._visible = false;
- i++;
- }
- }
- function resetObjs()
- {
- var _loc3_ = _parent;
- var _loc2_ = 0;
- while(_loc2_ < objZones.length)
- {
- var _loc1_ = _loc3_.menuDD[objZones[_loc2_]];
- _loc3_.menuDD.croixrouge._visible = false;
- _loc1_.softGoTo(_loc1_.startx,_loc1_.starty,0.5);
- _loc2_ = _loc2_ + 1;
- }
- }
- function flashNext()
- {
- var _loc1_ = _parent;
- var _loc2_ = this;
- if(_loc2_._parent["d" + numflash] != null)
- {
- trace("flash");
- _loc2_._parent["d" + numflash]._visible = true;
- _loc2_._parent["d" + numflash].flashSoluce(flashNext);
- numflash++;
- }
- else
- {
- _loc1_.expliDD._visible = true;
- _loc1_.expliDD._xscale = 1;
- _loc1_.expliDD._yscale = _loc1_.expliDD._xscale;
- _loc1_.expliDD.bounceScale(100,100,0.2,0.8);
- }
- }
- function initDD()
- {
- decors.bateau.gotoAndStop(136);
- var i = 1;
- while(i < 8)
- {
- dzone = this["d" + i];
- dzone.obj = objZones[i - 1];
- dzone.num = i;
- dzone.fond._name = objZones[i];
- dzone.gotoAndStop(2);
- i++;
- }
- numflash = 1;
- d1.flashNext = flashNext;
- d1.flashNext();
- var i = 0;
- while(i < objZones.length)
- {
- var obj = _parent.menuDD[objZones[i]];
- obj.startx = obj._x;
- obj.starty = obj._y;
- obj.onPress = function()
- {
- this.startDrag();
- };
- obj.onRelease = obj.onReleaseOutside = function()
- {
- var zone = eval(this._droptarget)._parent;
- if(zone.num == _root.activeNum)
- {
- this.stopDrag();
- if(zone.obj == this._name)
- {
- trace("gagné");
- _root.mcgagne._visible = true;
- _root.mcgagne._xscale = 5;
- _root.mcgagne._yscale = 5;
- _root.mcgagne.bounceScale(100,100,0.2,0.8);
- _root.btnmask._visible = true;
- _root.btnsuite._visible = true;
- this._visible = false;
- zone._visible = false;
- _root.mcscene[this._name]._visible = true;
- _root.mcscene[this._name].flashSoluce();
- _root.mcscene.decors[this._name]._visible = true;
- _root.mcscene.decors[this._name].flashSoluce();
- _root.mcscene.decors[this._name].play();
- zone.gotoAndStop(3);
- }
- else
- {
- trace("perdu");
- _root.playSound("sonerreur",60);
- this._parent.croixrouge._visible = true;
- this._parent.croixrouge._x = this._x;
- this._parent.croixrouge._y = this._y;
- _root.mcperdu._visible = true;
- _root.mcperdu._xscale = 5;
- _root.mcperdu._yscale = 5;
- _root.mcperdu.bounceScale(100,100,0.2,0.8);
- _root.btnmask._visible = true;
- _parent.nbfaux = _parent.nbfaux + 1;
- }
- }
- else
- {
- this.softGoTo(this.startx,this.starty,0.5);
- this.stopDrag();
- }
- };
- i++;
- }
- }
- tabObjs = ["camion","gisement","derrick","decors.bateau","tuyau","station","reservoir","chauffeau"];
- objZones = ["camion","gisement","derrick","bateau","reservoir","station","chauffeau"];
- efface();
-