Symbol 3 MovieClip Frame 1
displayDevice = (((substring(getVersion(), 0, 2)) == "FL") ? "phone" : "pc");
_root.timesToChange = 1;
_root.changeTimer = 0;
if (displayDevice == "phone") {
gotoAndStop (3);
} else if (displayDevice == "pc") {
gotoAndStop (2);
}
Symbol 3 MovieClip Frame 2
_root.warningMessage._visible = true;
onEnterFrame = function () {
accX = (-(_root._xmouse - 120)) * 8.25;
accY = (_root._ymouse - 160) * 6.1875;
};
Symbol 3 MovieClip Frame 3
_root.warningMessage._visible = false;
onEnterFrame = function () {
loadVariables ("accelerometer://data", _root);
if (Math.abs(_root.accX) > 1500) {
_root.timesToChange = _root.timesToChange + (random(10) + 5);
}
if (_root.timesToChange > 100) {
_root.timesToChange = 100;
}
if ((_root.timesToChange > 0) && (_root.changeTimer < 1)) {
diceDestination = random(6) + 1;
_root.theDice.gotoAndStop(diceDestination);
_root.timesToChange = _root.timesToChange - 1;
_root.changeTimer = 2;
}
if (_root.timesToChange > 0) {
_root.rollingInfo._visible = true;
_root.rollingInfo.text = _root.timesToChange + " more changes";
} else {
_root.rollingInfo._visible = false;
}
};
Symbol 15 MovieClip Frame 1
if (_root.changeTimer > 0) {
_root.changeTimer = _root.changeTimer - 1;
}
Symbol 15 MovieClip Frame 2
gotoAndPlay (1);