home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 145
/
MOBICLIC145.ISO
/
pc
/
DATA
/
DSS145
/
DSS145_10
/
DSS145_10.swf
/
scripts
/
dss145_10
/
BtRetour.as
< prev
next >
Wrap
Text File
|
2012-07-18
|
4KB
|
122 lines
package dss145_10
{
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.display.MovieClip;
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 _movie:MovieClip;
public function BtRetour(param1:Engine, param2:TimelineManager, param3:SharedObject)
{
var _engine:Engine = param1;
var _timelineManager:TimelineManager = param2;
var so:SharedObject = param3;
super();
var BT_RETOURswf:MediaSwf = _engine.showSwf({
"code":"BT_RETOUR",
"parent":_engine.config.layers["menu"]
});
this._movie = BT_RETOURswf.swfContent;
this.gListDone = so.data.listDone;
this.gDoneDepart = this.gListDone[_engine.config.moduleNum - 1] == 1;
this.BT_RETOUR = new InteractiveMovie(this._movie,_timelineManager);
this.BT_RETOUR.gotoAndStop(1);
this.BT_RETOUR.mc.onRollOver = function(param1:Object):void
{
funcHide();
this.gotoAndStop(2);
_engine.playNoise(new NoiseObject({"code":"B_RET"}));
_engine.showIB({
"id":"IB_RET",
"reference":_movie
});
};
this.BT_RETOUR.mc.onRollOut = function(param1:Object):void
{
funcShow();
this.gotoAndStop(1);
_engine.stopNoise(new NoiseObject({"code":"B_RET"}));
_engine.hideIB();
};
this.BT_RETOUR.mc.onPress = function(param1:Object):void
{
_engine.hideIB();
_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();
_engine.host.changeModule({"numMod":0});
};
this.BT_RETOUR.activeMC();
}
public function set _gameWon(param1:Boolean) : void
{
this.gameWon = param1;
}
public function set _gameOn(param1:Boolean) : void
{
this.gameOn = param1;
}
public function get _gameOn() : Boolean
{
return this.gameOn;
}
public function setFunctionHideCursorSpecial(param1:Function) : void
{
this.funcHide = param1;
}
public function setFunctionShowCursorSpecial(param1:Function) : void
{
this.funcShow = param1;
}
public function set visible(param1:Boolean) : void
{
this._movie.visible = param1;
}
public function get visible() : Boolean
{
return this._movie.visible;
}
}
}