Frame 1
function getPorcentaje() {
var _local1 = Math.ceil(Math.random() * 100);
return(_local1);
}
function getOffset() {
var _local1 = Math.ceil(Math.random() * 255);
var _local2 = Math.round(Math.random() * 1);
if (_local2 == 1) {
_local1 = _local1 * 1;
}
return(_local1);
}
screen_width = 800;
screen_height = 200;
frecuency = 0;
MovieClip.prototype.serConfeti = function () {
var _local1 = this;
_local1._x = Math.ceil(Math.random() * screen_width);
_local1._xscale = Math.ceil(Math.random() * screen_height);
_local1._yscale = _local1._xscale;
_local1.mover();
_local1.coloreame();
};
MovieClip.prototype.coloreame = function () {
var _local2 = new Color(this);
var _local1 = new Object();
_local1.ra = getPorcentaje();
_local1.rb = getOffset();
_local1.ga = getPorcentaje();
_local1.gb = getOffset();
_local1.ba = getPorcentaje();
_local1.bb = getOffset();
_local2.setTransform(_local1);
};
MovieClip.prototype.mover = function () {
var _local1 = this;
_local1.onEnterFrame = function () {
var _local1 = this;
if (_local1._y < 600) {
_local1._y = _local1._y + 10;
_local1._xscale = Math.random() * 200;
_local1._rotation = Math.random() * 360;
} else {
_local1.removeMovieClip();
}
};
};
MovieClip.prototype.caidaConfeti = function () {
this.createEmptyMovieClip("caida_mc", 1);
var count = 0;
var confCount = 1;
this.caida_mc.onEnterFrame = function () {
if (count < frecuency) {
count++;
} else {
this.attachMovie("conf", "conf" + confCount, confCount);
eval ("this.caida_mc.conf" + confCount).serConfeti();
count = 1;
confCount++;
}
};
};
_root.caidaConfeti();