home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 145
/
MOBICLIC145.ISO
/
pc
/
DATA
/
DSS145
/
DSS145_02
/
DSS145_02.swf
/
scripts
/
dss145_02
/
BtRetour.as
next >
Wrap
Text File
|
2012-07-18
|
3KB
|
112 lines
package dss145_02
{
import com.milanpresse.engine.Engine;
import com.milanpresse.engine.initmovieclip.InteractiveMovie;
import com.milanpresse.engine.managers.TimelineManager;
import com.milanpresse.engine.medias.MediaSwf;
import com.milanpresse.engine.typeargument.NoiseObject;
import flash.net.SharedObject;
public class BtRetour
{
private var BT_RETOUR:InteractiveMovie;
private var gListDone:Array;
private var gDoneDepart:Boolean;
private var gameWon:Boolean = false;
private var gameOn:Boolean = false;
private var funcHide:Function;
private var funcShow:Function;
private var funcFin:Function;
public function BtRetour(_engine:Engine, _timelineManager:TimelineManager, so:SharedObject)
{
var BT_RETOURswf:MediaSwf = null;
super();
BT_RETOURswf = _engine.showSwf({
"code":"BT_RETOUR",
"parent":_engine.config.layers["menu"]
});
this.gListDone = so.data.listDone;
this.gDoneDepart = this.gListDone[_engine.config.moduleNum - 1] == 1;
this.BT_RETOUR = new InteractiveMovie(BT_RETOURswf.swfContent,_timelineManager);
this.BT_RETOUR.gotoAndStop(1);
this.BT_RETOUR.mc.onRollOver = function(p:Object):void
{
funcHide();
this.gotoAndStop(2);
_engine.playNoise(new NoiseObject({"code":"B_RET"}));
_engine.showIB({
"id":"IB_RET",
"reference":BT_RETOURswf.swfContent
});
};
this.BT_RETOUR.mc.onRollOut = function(p:Object):void
{
funcShow();
this.gotoAndStop(1);
_engine.stopNoise(new NoiseObject({"code":"B_RET"}));
_engine.hideIB();
};
this.BT_RETOUR.mc.onPress = function(p:Object):void
{
_engine.stopNoise(new NoiseObject({"code":"B_RET"}));
this.kill();
if(gDoneDepart)
{
so.data.lastDone = 2;
}
else if(gameWon == true)
{
so.data.lastDone = 1;
}
else
{
so.data.lastDone = 0;
}
so.flush();
funcFin();
};
this.BT_RETOUR.activeMC();
}
public function set _gameWon(isWon:Boolean) : void
{
this.gameWon = isWon;
}
public function set _gameOn(isOn:Boolean) : void
{
this.gameOn = isOn;
}
public function get _gameOn() : Boolean
{
return this.gameOn;
}
public function setFunctionHideCursorSpecial(maFunction:Function) : void
{
this.funcHide = maFunction;
}
public function setFunctionShowCursorSpecial(maFunction:Function) : void
{
this.funcShow = maFunction;
}
public function setFunctionFin(maFunction:Function) : void
{
this.funcFin = maFunction;
}
}
}