home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Aventura
/
FireMan.swf
/
scripts
/
frame_349
/
DoAction.as
Wrap
Text File
|
2008-09-12
|
1KB
|
61 lines
function defaultKeys()
{
_root.ARRIBA = 38;
_root.DER = 39;
_root.IZQ = 37;
_root.SHOOT = 17;
_root.SLIDEKEY = 16;
}
function restoreKeys()
{
_root.heroe.ARRIBA = _root.controles.data.ARRIBA = _root.ARRIBA = 38;
_root.heroe.DER = _root.controles.data.DER = _root.DER = 39;
_root.heroe.IZQ = _root.controles.data.IZQ = _root.IZQ = 37;
_root.heroe.SHOOT = _root.controles.data.SHOOT = _root.SHOOT = 17;
_root.heroe.SLIDEKEY = _root.controles.data.SLIDEKEY = _root.SLIDEKEY = 16;
_root.controles.flush();
}
function aleatorio(a, b)
{
return Math.floor(Math.random() * (b - a + 1)) + a;
}
function m2s(tiempo)
{
var mins = Math.floor(tiempo / 60000);
var secs = Math.floor(tiempo % 60000 / 1000);
if(mins < 10)
{
mins = "0" + String(mins);
}
if(secs < 10)
{
secs = "0" + String(secs);
}
return "00:" + String(mins) + ":" + String(secs);
}
defaultKeys();
controles = SharedObject.getLocal("fiscontroles");
if(controles.data.ARRIBA != null)
{
ARRIBA = controles.data.ARRIBA;
}
if(controles.data.DER != null)
{
DER = controles.data.DER;
}
if(controles.data.IZQ != null)
{
IZQ = controles.data.IZQ;
}
if(controles.data.SHOOT != null)
{
SHOOT = controles.data.SHOOT;
}
if(controles.data.SLIDEKEY != null)
{
SLIDEKEY = controles.data.SLIDEKEY;
}
stopAllSounds();
getUrl("FSCommand:trapallkeys", "true");
play();