home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 145
/
MOBICLIC145.ISO
/
pc
/
DATA
/
DSS145
/
DSS145_05
/
DSS145_05.swf
/
scripts
/
dss145_05
/
AttenteJeu.as
next >
Wrap
Text File
|
2012-07-18
|
7KB
|
213 lines
package dss145_05
{
import com.milanpresse.engineaddons.facades.EngineExt;
import com.milanpresse.engineaddons.initdisplayobject.ExtendedClip;
import com.milanpresse.engineaddons.labelstypes.AttenteLabel;
import flash.display.DisplayObjectContainer;
import flash.display.MovieClip;
public class AttenteJeu extends AttenteLabel
{
public var config:AttenteJeuConfig;
public var CONTAINER:DisplayObjectContainer;
public var BT_REJOUER:ExtendedClip;
public var BT_AIDE:ExtendedClip;
public var CLIP_AIDE:ExtendedClip;
public var TIMER:ExtendedClip;
public var OISEAUX:Vector.<ExtendedClip>;
public var OISEAUX_FRONT:Vector.<ExtendedClip>;
public var CURSEUR_CIBLE:ExtendedClip;
public var ANIM_OISEAUX_FOND:ExtendedClip;
public var ANIM_OISEAUX_FOND_2:ExtendedClip;
public var ANIM_OISEAUX:ExtendedClip;
private var _oiseauxManager:OiseauxManager;
private var _algo:CapsuleAlgo = null;
public function AttenteJeu(param1:EngineExt, param2:Function = null, param3:CapsuleAlgo = null)
{
this.config = new AttenteJeuConfig();
this.OISEAUX = new Vector.<ExtendedClip>();
this.OISEAUX_FRONT = new Vector.<ExtendedClip>();
super(param1,param2);
this._algo = param3;
}
public function init() : void
{
this.CONTAINER = this.config.CONTAINER;
this.CLIP_AIDE_Init();
this.OISEAUX_Init();
this.BT_AIDE_Init();
this.TIMER_Init();
}
private function run() : void
{
}
private function OISEAUX_Init() : void
{
var _loc1_:ExtendedClip = null;
var _loc2_:int = 0;
while(_loc2_ < this.config.OISEAUX.length)
{
_loc1_ = new ExtendedClip(this.config.OISEAUX[_loc2_] as MovieClip,_e);
_loc1_.no = _loc2_ + 1;
_loc1_.enabled = false;
_loc1_.init();
_loc1_.gotoAndStop(1);
this.OISEAUX.push(_loc1_);
_loc1_ = new ExtendedClip(this.config.OISEAUX_FRONT[_loc2_] as MovieClip,_e);
_loc1_.no = _loc2_ + 1;
_loc1_.enabled = false;
_loc1_.visible = false;
_loc1_.init();
_loc1_.gotoAndStop(1);
this.OISEAUX_FRONT.push(_loc1_);
_loc2_++;
}
}
private function ANIM_OISEAUX_FOND_Init() : void
{
var _loc1_:ExtendedClip = this.ANIM_OISEAUX_FOND = new ExtendedClip(this.config.ANIM_OISEAUX_FOND as MovieClip,_e,{"performAnimation":true});
_loc1_.enabled = false;
_loc1_.visible = true;
_loc1_.init();
_loc1_.x = 0;
_loc1_.y = 0;
_loc1_ = this.ANIM_OISEAUX_FOND_2 = new ExtendedClip(this.config.ANIM_OISEAUX_FOND_2 as MovieClip,_e,{"performAnimation":true});
_loc1_.enabled = false;
_loc1_.visible = true;
_loc1_.init();
_loc1_.x = 0;
_loc1_.y = 0;
}
private function ANIM_OISEAUX_Init() : void
{
var _loc1_:ExtendedClip = this.ANIM_OISEAUX = new ExtendedClip(this.config.ANIM_OISEAUX as MovieClip,_e);
_loc1_.enabled = false;
_loc1_.visible = false;
_loc1_.init();
}
private function CURSEUR_CIBLE_Init() : void
{
var _loc1_:ExtendedClip = this.CURSEUR_CIBLE = new ExtendedClip(this.config.CURSEUR_CIBLE as MovieClip,_e,{"performAnimation":true});
_loc1_.enabled = false;
_loc1_.visible = true;
_loc1_.init();
}
private function CLIP_AIDE_Init() : void
{
var clip:ExtendedClip = this.CLIP_AIDE = new ExtendedClip(this.config.CLIP_AIDE as MovieClip,_e);
clip.onPress = function():void
{
CLIP_AIDE.visible = false;
_algo.resetTimers();
_e.commentStop();
};
clip.enabled = false;
clip.visible = false;
clip.init();
}
private function BT_AIDE_Init() : void
{
var clip:ExtendedClip = this.BT_AIDE = new ExtendedClip(this.config.BT_AIDE as MovieClip,_e);
clip.onPressState = {"label":"E1"};
clip.onRollOverState = {
"label":"E2",
"noiseCode":"B_AIDE"
};
clip.onRollOutState = {"label":"E1"};
clip.onPress = function():void
{
_algo.stopTimer();
CLIP_AIDE.visible = true;
CLIP_AIDE.depthIndex = CONTAINER.numChildren - 1;
CLIP_AIDE.enabled = true;
_e.commentPlay({
"code":"AIDE",
"zapBlock":"NOZAP_NOBLOCK"
});
};
clip.enabled = true;
clip.visible = true;
clip.depthIndex = this.CONTAINER.numChildren - 1;
clip.init();
}
private function BT_REJOUER_Init() : void
{
var clip:ExtendedClip = this.BT_REJOUER = new ExtendedClip(this.config.BT_REJOUER as MovieClip,_e);
clip.onPressState = {"label":"E1"};
clip.onRollOverState = {
"label":"E2",
"noiseCode":"B_FLECHE",
"ibId":"IB_BT_01"
};
clip.onRollOutState = {"label":"E1"};
clip.onPress = function():void
{
rejouer();
};
clip.enabled = false;
clip.visible = false;
clip.depthIndex = clip.parent.numChildren - 1;
clip.init();
}
private function TIMER_Init() : void
{
var _loc1_:ExtendedClip = this.TIMER = new ExtendedClip(this.config.TIMER as MovieClip,_e);
this.TIMER.movie.TIMER_E1.stop();
_loc1_.depthIndex = _loc1_.parent.numChildren - 1;
_loc1_.init();
}
private function rejouer() : void
{
}
private function end() : void
{
this.BT_AIDE.visible = false;
this.TIMER.visible = false;
this.destroy();
_e.instanceToDestroyRemove(this);
_callbackEnd();
}
public function destroy() : void
{
var _loc1_:int = 0;
while(_loc1_ < this.OISEAUX.length)
{
if(this.OISEAUX[_loc1_] != null)
{
this.OISEAUX[_loc1_].destroy();
}
_loc1_++;
}
}
}
}