Combined Code
movieClip 2 conf2 {
}
movieClip 3 conf {
}
movieClip 21 {
frame 1 {
function getPorcentaje() {
var v1 = Math.ceil(Math.random() * 200);
return v1;
}
function getOffset() {
var v1 = Math.ceil(Math.random() * 700);
var v2 = Math.round(Math.random() * 1);
if (v2 == 1) {
v1 *= 1;
}
return v1;
}
screen_width = 1280;
screen_height = 400;
frecuency = 100;
MovieClip.prototype.serConfeti = function () {
this._x = Math.ceil(Math.random() * screen_width);
this._xscale = Math.ceil(Math.random() * screen_height);
this._yscale = this._xscale;
this.mover();
this.coloreame();
};
MovieClip.prototype.coloreame = function () {
var v3 = new Color(this);
var v2 = new Object();
v2.ra = getPorcentaje();
v2.rb = getOffset();
v2.ga = getPorcentaje();
v2.gb = getOffset();
v2.ba = getPorcentaje();
v2.bb = getOffset();
v3.setTransform(v2);
};
MovieClip.prototype.mover = function () {
this.onEnterFrame = function () {
if (this._y < 720) {
this._y += 10;
this._xscale = Math.random() * 200;
this._rotation = Math.random() * 360;
} else {
this.removeMovieClip();
}
};
};
MovieClip.prototype.caidaConfeti = function () {
this.createEmptyMovieClip('caida_mc', 1);
var count = 1;
var confCount = 200;
this.caida_mc.onEnterFrame = function () {
if (confCount > frecuency) {
caida_mc.removeMovieClip();
} else {
this.attachMovie('conf', 'conf' + confCount, confCount);
(eval('this.caida_mc.conf' + confCount)).serConfeti();
count = 200;
++confCount;
}
};
};
_root.caidaConfeti();
}
}
button 23 {
on (keyPress '<Space>') {
gotoAndPlay(450);
}
}
movieClip 81 {
}
movieClip 82 {
}
movieClip 83 {
}
movieClip 102 {
}
movieClip 105 {
}
movieClip 108 {
}
movieClip 116 {
}
movieClip 117 {
}
movieClip 162 {
}
movieClip 165 {
}
movieClip 166 {
}
movieClip 174 {
frame 1 {
function getPorcentaje() {
var v1 = Math.ceil(Math.random() * 200);
return v1;
}
function getOffset() {
var v1 = Math.ceil(Math.random() * 700);
var v2 = Math.round(Math.random() * 1);
if (v2 == 1) {
v1 *= 1;
}
return v1;
}
screen_width = 1280;
screen_height = 400;
frecuency = 100;
MovieClip.prototype.serConfeti = function () {
this._x = Math.ceil(Math.random() * screen_width);
this._xscale = Math.ceil(Math.random() * screen_height);
this._yscale = this._xscale;
this.mover();
this.coloreame();
};
MovieClip.prototype.coloreame = function () {
var v3 = new Color(this);
var v2 = new Object();
v2.ra = getPorcentaje();
v2.rb = getOffset();
v2.ga = getPorcentaje();
v2.gb = getOffset();
v2.ba = getPorcentaje();
v2.bb = getOffset();
v3.setTransform(v2);
};
MovieClip.prototype.mover = function () {
this.onEnterFrame = function () {
if (this._y < 720) {
this._y += 10;
this._xscale = Math.random() * 200;
this._rotation = Math.random() * 360;
} else {
this.removeMovieClip();
}
};
};
MovieClip.prototype.caidaConfeti = function () {
this.createEmptyMovieClip('caida_mc', 1);
var count = 1;
var confCount = 1;
this.caida_mc.onEnterFrame = function () {
if (confCount > frecuency) {
caida_mc.removeMovieClip();
} else {
this.attachMovie('conf', 'conf' + confCount, confCount);
(eval('this.caida_mc.conf' + confCount)).serConfeti();
count = 200;
++confCount;
}
};
};
_root.caidaConfeti();
}
}