Hi, I’m testing a dice roll and it seems to not work anymore (after I added 4 dice). any suggestions?
var numspin = 0;
var stopnum = 0;
var finalrot = Math.ceil(Math.random() *30);
var dice = new Array();
dice = ["dice1","dice2","dice3","dice4"];
var die = new Array();
die = ["die1","die2","die3","die4"];
function diceRoll(){
if (numspin == 0) {
dice = stopnum; //_root.
die.gotoAndStop(stopnum);
if (stopnum != "X") {
die._rotation = finalrot;
}
} else {
numspin--;
dice = Math.ceil(Math.random()*6);
die.gotoAndStop(Math.ceil(Math.random()*6));
die._rotation = Math.ceil(Math.random() * 45);
}
}
on the roll button
on (release) {
diceRoll();
}
each dice instance is : die1 - 4
and there are 4 dynamic txt boxes : dice1 - 4
I can post an fla