Combined Code
movieClip 5 spot {
}
frame 1 {
function rpm(n) {
if (Math.random() * 50 > 25) {
return -n;
} else {
return n;
}
}
function toPos(n) {
if (n > 0) {
return n;
} else {
return n * -1;
}
}
function spawn() {
var v2;
v2 = _root.attachMovie('spot', 'm' + _root.spawn_num, _root.getNextHighestDepth() + 1);
v2.gotoAndStop(1 + Math.random() * 3);
v2._x = _root.cen.X + rpm(Math.random() * 30 + 10);
v2._y = _root.cen.Y + rpm(Math.random() * 30 + 10);
v2._rotation = Math.atan2(v2._y - _root.cen.Y, v2._x - _root.cen.X) * 57.29577951308232;
v2._xscale = (30 / toPos(v2._x - _root.cen.X)) * 30;
v2._yscale = v2._xscale;
v2.sp = v2._xscale / 30;
_root.spawn_num += 1;
}
function update() {
var v3;
var v2;
v3 = 0;
while (v3 < _root.spawn_num) {
v2 = _root['m' + v3];
v2._x += Math.cos(v2._rotation / 57.29577951308232) * v2.sp;
v2._y += Math.sin(v2._rotation / 57.29577951308232) * v2.sp;
v2.sp = v2._xscale / 20;
v2._xscale *= 1.004;
v2._yscale = v2._xscale;
if (v2._x > _root.st.mX || v2._x < 0 || v2._y < 0 || v2._y > _root.st.mY) {
removeMovieClip(v2);
false;
}
++v3;
}
}
stop();
var n1 = false;
var n2 = false;
var n3 = false;
var n4 = false;
var n5 = false;
var n6 = false;
e1.onPress = function () {
n1 = true;
};
e2.onPress = function () {
n2 = true;
};
e3.onPress = function () {
n3 = true;
};
e4.onPress = function () {
n4 = true;
};
e5.onPress = function () {
n5 = true;
};
e6.onPress = function () {
n6 = true;
};
e1.onEnterFrame = function () {
if (_root.n1) {
e1.stop();
} else {
if (!_root.n1) {
e1.play();
e1.gotoAndPlay(1 + Math.random() * 20);
}
}
};
e2.onEnterFrame = function () {
if (_root.n2) {
e2.stop();
} else {
if (!_root.n2) {
e2.play();
e2.gotoAndPlay(1 + Math.random() * 20);
}
}
};
e3.onEnterFrame = function () {
if (_root.n3) {
e3.stop();
} else {
if (!_root.n3) {
e3.play();
e3.gotoAndPlay(1 + Math.random() * 20);
}
}
};
e4.onEnterFrame = function () {
if (_root.n4) {
e4.stop();
} else {
if (!_root.n4) {
e4.play();
e4.gotoAndPlay(1 + Math.random() * 20);
}
}
};
e5.onEnterFrame = function () {
if (_root.n5) {
e5.stop();
} else {
if (!_root.n5) {
e5.play();
e5.gotoAndPlay(1 + Math.random() * 20);
}
}
};
e6.onEnterFrame = function () {
if (_root.n6) {
e6.stop();
} else {
if (!_root.n6) {
e6.play();
e6.gotoAndPlay(1 + Math.random() * 20);
}
}
};
re.onRelease = function () {
_root.n1 = false;
_root.n2 = false;
_root.n3 = false;
_root.n4 = false;
_root.n5 = false;
_root.n6 = false;
};
var t_num = 5424653520.0;
posText.text = t_num.toString() + ' Different possibilities!';
var spawn_num = 0;
var cen = {'X': 200, 'Y': 150};
var st = {'mX': 400, 'mY': 336};
var initD = _root.getNextHighestDepth();
spawnInterval = setInterval(spawn, 100);
updateInterval = setInterval(update, 5);
}
// unknown tag 88 length 217
movieClip 53 {
}
movieClip 98 {
}
movieClip 158 {
}
movieClip 206 {
}
movieClip 233 {
}
movieClip 272 {
}
// unknown tag 88 length 64