Combined Code
frame 1 {
Mouse.hide();
Stage.scaleMode = 'noScale';
var removeMcFirstArg = function (x) {
removeMovieClip(x);
};
var RAD2DEG = function (deg) {
return deg * 57.29577951308232;
};
var hsvInnerFunc = function (h, s, v, n) {
var v2 = (n + h / 60) % 6;
var v1 = 4 - v2;
if (v2 < v1) {
v1 = v2;
}
if (v1 > 1) {
v1 = 1;
return v - v * s * v1;
}
if (v1 < 0) {
v1 = 0;
}
return v - v * s * v1;
};
var hsv = function (h, s, v, n) {
h %= 360;
if (h < 0) {
h += 360;
}
return hsvInnerFunc(h, s, v, 5) * 255 << 16 | hsvInnerFunc(h, s, v, 3) * 255 << 8 | hsvInnerFunc(h, s, v, 1) * 255;
};
var pressed = false;
Mouse.addListener({'onMouseDown': function () {
pressed = true;
}, 'onMouseUp': function () {
pressed = false;
}});
var Math_random = Math.random;
var startTime = (new Date()).getTime();
var initMc = function () {
var v6 = 6;
var v5 = 6;
if (pressed) {
var v4 = 180 - RAD2DEG(Math.atan2(_root._xmouse - 275, _root._ymouse - 200));
} else {
var v4 = (startTime + getTimer()) * 0.0022 % 360;
}
var v3 = 17.5;
v4 += -v3 + Math_random() * v3 * 2;
var v7 = 0.9 + Math_random() * 0.1;
this.beginFill(hsv(v4, v7, 1));
this.moveTo(0, 0);
this.lineTo(v6, 0);
this.lineTo(v6, v5);
this.lineTo(0, v5);
this.lineTo(0, 0);
this.endFill();
this.onEnterFrame = onMcEnterFrame;
this.speed = 2 + Math_random() * 5;
this.maxAge = 1000 + Math_random() * 500;
setTimeout(removeMcFirstArg, this.maxAge, this);
};
var onMcEnterFrame = function () {
var v7 = _root.curtime - this.birthtime;
var v4 = v7 / this.maxAge;
var v3 = this.speed;
if (v4 >= 0.2) {
v3 *= 1 - v4 * 0.35;
}
var v6 = v3 - Math_random() * (v3 * 2);
var v5 = v3 - Math_random() * (v3 * 2);
v5 += v4 * 2;
this._x += v6 * _root.simAmount;
this._y += v5 * _root.simAmount;
this._alpha = 100 - v4 * 100;
};
onEnterFrame = function () {
var v3 = getTimer();
var v2 = (v3 - _root.curtime) / 16.66666666666667;
if (v2 > 4.5) {
v2 = 4.5;
}
_root.simAmount = v2;
_root.curtime = v3;
};
var cnt = 0;
var xmousePrev = Infinity;
var ymousePrev = Infinity;
var createOne = function () {
var v3 = _xmouse;
var v2 = _ymouse;
if (v3 === xmousePrev && v2 === ymousePrev) {
return false;
}
xmousePrev = v3;
ymousePrev = v2;
var v1 = createEmptyMovieClip('x' + cnt, getNextHighestDepth());
cnt = cnt + 1 >>> 0;
v1._x = _xmouse - v1._width / 2;
v1._y = _ymouse - v1._height / 2;
initMc.call(v1);
v1.onEnterFrame = onMcEnterFrame;
v1.birthtime = getTimer();
return true;
};
var recentPlayerOnLinux = (System.capabilities.os.split(' '))[0] === 'Linux' && parseInt((System.capabilities.version.split(' '))[1]) >= 27;
Mouse.addListener({'onMouseMove': recentPlayerOnLinux ? function () {
if (createOne()) {
updateAfterEvent();
}
} : createOne});
setInterval(function () {
ymousePrev = Infinity;
xmousePrev = ymousePrev;
createOne();
}, 83.33333333333333);
}