Показать сообщение отдельно
  #1 (permalink)  
Старый 14.03.2016, 00:22
Новичок на форуме
Отправить личное сообщение для Rashid Посмотреть профиль Найти все сообщения от Rashid
 
Регистрация: 14.03.2016
Сообщений: 6

ПРОШУ ВСЕХ ВНИМАНИЕ ! Заранее спасибо всем !!!
Это Игра в типе рулетка , помогите прочти очередь выпадание цифр . Заранее всем спасибо ! Весь код не поместится остальное напишу в коммент !

//\actions\scripts\DefineButton2_198\on(release).as
//----------------------------------------
on(release){
if(!(step == 0) && !(step == 4))
{
return undefined;
}
if(process)
{
reconnect();
}
else
{
if(game)
{
newreq("id=" + game + "&tmp=" + Math.round());
}
else
{
newgame();
}
}
}
//----------------------------------------

//\actions\scripts\DefineButton2_198\on(rollOut).as
//----------------------------------------
on(rollOut){
_root.hint5._visible = false;
}
//----------------------------------------

//\actions\scripts\DefineButton2_198\on(rollOver).as
//----------------------------------------
on(rollOver){
_root.hint5._visible = true;
}
//----------------------------------------

//\actions\scripts\DefineButton2_200\on(release).as
//----------------------------------------
on(release){
if(sndoff._visible)
{
sound.setVolume(100);
sndoff._visible = false;
}
else
{
sound.setVolume(0);
sndoff._visible = true;
}
}
//----------------------------------------

//\actions\scripts\DefineButton2_200\on(rollOut).as
//----------------------------------------
on(rollOut){
_root.hint4._visible = false;
}
//----------------------------------------

//\actions\scripts\DefineButton2_200\on(rollOver).as
//----------------------------------------
on(rollOver){
_root.hint4._visible = true;
}
//----------------------------------------

//\actions\scripts\DefineSprite_188\frame 1\DoAction.as
//----------------------------------------
if(_root.step < 2)
{
stop();
}
//----------------------------------------

//\actions\scripts\DefineSprite_188\frame 160\DoAction.as
//----------------------------------------
stop();
_root.step = 3;
//----------------------------------------

//\actions\scripts\DefineSprite_188\frame 65\DoAction.as
//----------------------------------------
sound.stop("loop");
sound.attachSound("result");
sound.start();
//----------------------------------------

//\actions\scripts\frame 1\DoAction.as
//----------------------------------------
function newgame()
{
_root.lastreq = "";
newreq("");
removeMovieClip(mcoin);
betar = bets.split(",",50);
mybet = mybets.split(",",50);
colors[win].setTransform(form(0));
i = 0;
while(i < ncoins)
{
removeMovieClip("ccoin" + i);
i++;
}
i = 0;
while(i < _root.wb.length)
{
colors[_root.wb[i]].setTransform(form(0));
i++;
}
game = 0;
betsum = 0;
ncoins = 0;
step = 0;
wbets = "";
popup._visible = false;
}
function reconnect()
{
if(!(_root.onEnterFrame == ut))
{
newreq(_root.lastreq);
}
}
function myData()
{
if(!_root.process)
{
return undefined;
}
_root.onEnterFrame = ut;
toggle(true);
utime = getTimer();
time = utime + time * 1000;
if(status == 1)
{
stop();
status = "Делайте ваши ставки!";
}
if(status == 2)
{
status = "Ставки сделаны!";
toggle(false);
if(win && step < 2 && process)
{
play();
game = 0;
rotat.inner._rotation = rotat.inner._rotation - (angles[win] - lasta);
lasta = angles[win];
rotat.play();
step = 2;
hilight(true);
}
}
if(status == 3)
{
status = "Игра окончена";
toggle(false);
game = 0;
}
removeMovieClip(mcoin);
i = 0;
while(i < _root.ncoins)
{
removeMovieClip("ccoin" + i);
i++;
}
_root.ncoins = 0;
var t = players.split(";;",10);
i = 0;
while(i < t.length)
{
set("popup.name" + (i + 1),t[i]);
i++;
}
i = i + 1;
while(i < 10)
{
set("popup.name" + i,"");
i++;
}
i = 1;
while(i < 5)
{
set("popup.bet" + i,"");
i++;
}
t = bets.split(",");
i = 0;
while(i < t.length)
{
tt = t[i].split("|",2);
tb = tt[1].split("-",6);
_root.attachMovie("coin" + nom[parseInt(tb[0])],"ccoin" + _root.ncoins,_root.ncoins);
var ob = eval("ccoin" + ncoins);
if(!parseInt(tb[1]))
{
newform(ob,4);
}
ob.pos = numpos(tt[0]);
var bound = eval(ob.pos);
ob._xscale = 75;
ob._yscale = 75;
ob._x = bound._x;
ob._y = bound._y;
ob.onRollOver = myRoll;
ob.onRollOut = myRollO;
ob.mybet = parseInt(tb[1]);
ob.bet1 = parseInt(tb[2]);
ob.bet2 = parseInt(tb[3]);
ob.bet3 = parseInt(tb[4]);
ob.bet4 = parseInt(tb[5]);
ncoins++;
i++;
}
process = false;
_root.onEnterFrame = ef;
swrecon.enabled = true;
swrecon._alpha = 100;
}
function ut()
{
if(time)
{
if(time > ctime)
{
timer = Math.floor((time - ctime) / 1000);
}
else
{
timer = "?";
}
}
}
function ef()
{
hilight(false);
ctime = getTimer();
if(process)
{
if(ctime - utime > 10000)
{
swrecon.enabled = true;
swrecon._alpha = 100;
}
return undefined;
}
if(time)
{
if(time > ctime)
{
timer = Math.floor((time - ctime) / 1000);
}
else
{
timer = "?";
if(!(game == 0))
{
newreq("id=" + game + "&");
play();
sound.attachSound("loop");
sound.start(0,20);
step = 1;
}
if(!process && game == 0 && step == 4)
{
newgame();
}
}
}
if(!(ctime - utime < 15000) && !process && !(game == 0))
{
newreq("id=" + game + "&");
utime = ctime;
}
}
function newreq(str)
{
loadVariables(script + "?" + str + "tmp=" + Math.random(),_root);
toggle(false);
process = true;
status = "Соединение...";
_root.lastreq = str;
swrecon.enabled = false;
swrecon._alpha = 75;
hint5._visible = false;
}
function myRoll()
{
popup._visible = true;
popup._x = _xmouse;
popup._y = _ymouse;
popup.betmy = this.mybet;
if(!(popup.name1 == ""))
{
popup.bet1 = this.bet1 || 0;
}
if(!(popup.name2 == ""))
{
popup.bet2 = this.bet2 || 0;
}
if(!(popup.name3 == ""))
{
popup.bet3 = this.bet3 || 0;
}
if(!(popup.name4 == ""))
{
popup.bet4 = this.bet4 || 0;
}
}
function myRollO()
{
popup._visible = false;
}
function endBet()
{
process = false;
moveBet();
toggle(false);
this.stopDrag();
sel._visible = false;
this.onMouseUp = nil;
this.onMouseMove = nil;
if(!this.denysign._visible)
{
ob = eval(dt(this));
this._x = ob._x + ob._parent._x;
this._y = ob._y + ob._parent._y;
_root.bet = _root.bet + this.price;
o = dt(this);
if(o.fields == undefined)
{
this.bet = o.substr(2,10);
}
else
{
this.bet = o.fields.join("-");
}
removeMovieClip(this.denysign);
newreq("id=" + game + "&bet=" + this.bet + "&coin=" + this.price + "&betid=" + betid + "&");
betid++;
}
else
{
ncount--;
cash = cash + this.price;
toggle(true);
removeMovieClip(this);
}
}
function moveBet()
{
var o = dt(this);
this.denysign._visible = o == false;
if(!(_root.last == o))
{
if(!(eval(_root.last).fields == undefined))
{
trmulti(eval(_root.last).fields,0);
}
if(gm(_root.last) == "n")
{
colors[gn(_root.last)].setTransform(form(0));
}
if(!(o == false))
{
if(!(o.fields == undefined))
{
trmulti(o.fields,1);
}
if(gm(o) == "n")
{
colors[gn(o)].setTransform(form(1));
}
}
_root.last = o;
}
}
function hilight(flag)
{
if(flag)
{
_root.wb = wbets.split(",",50);
i = 0;
while(i < _root.wb.length)
{
_root.wb[i] = gn(numpos(_root.wb[i]));
i++;
}
Ответить с цитированием