Symbol 10 MovieClip Frame 1
onEnterFrame = function () {
bubbleCoord = 97 + (_root.accX / 11);
theBubble._x = theBubble._x + ((bubbleCoord - theBubble._x) / 2);
if (theBubble._x < 0) {
theBubble._x = 0;
}
if (theBubble._x > 194) {
theBubble._x = 194;
}
};
Symbol 16 MovieClip Frame 1
onEnterFrame = function () {
bubbleCoord = 97 + ((-_root.accY) / 11);
theBubble._y = theBubble._y + ((bubbleCoord - theBubble._y) / 2);
if (theBubble._y < 0) {
theBubble._y = 0;
}
if (theBubble._y > 194) {
theBubble._y = 194;
}
};
Symbol 19 MovieClip Frame 1
displayDevice = (((substring(getVersion(), 0, 2)) == "FL") ? "phone" : "pc");
if (displayDevice == "phone") {
gotoAndStop (3);
} else if (displayDevice == "pc") {
gotoAndStop (2);
}
Symbol 19 MovieClip Frame 2
onEnterFrame = function () {
_root.accX = (-(_root._xmouse - 120)) * 8.25;
_root.accY = (_root._ymouse - 160) * 6.1875;
};
Symbol 19 MovieClip Frame 3
onEnterFrame = function () {
loadVariables ("accelerometer://data", _root);
};
Symbol 21 MovieClip Frame 1
onEnterFrame = function () {
Radians = Math.atan2(-_root.accX, -_root.accY);
cleanDegrees = ((Radians * 180) / Math.PI) + 180;
Degrees = Math.round(cleanDegrees * 10) / 10;
if (Degrees == 360) {
Degrees = 0;
}
if (Degrees == Math.round(cleanDegrees)) {
_root.angleMc.angleDisplay.text = Degrees + ".0\u00B0";
} else {
_root.angleMc.angleDisplay.text = Degrees + "\u00B0";
}
toRotate = cleanDegrees - _root.angleMc._rotation;
if (Math.abs(toRotate) > 180) {
toRotate = ((toRotate > 0) ? (toRotate - 360) : (toRotate + 360));
}
_root.angleMc._rotation = _root.angleMc._rotation + (toRotate / 3);
};