Frame 1
var bOnOff;
var my_sound;
var flakes;
flakes = 20;
this.bOnOff = 1;
k = 0;
while (k < flakes) {
duplicateMovieClip (_root.snow, "snow" + k, k);
k++;
}
this.my_sound = new Sound();
this.my_sound.attachSound("carneval");
this.my_sound.setVolume(100);
this.my_sound.start(0, 10);
go.onRelease = function () {
getURL ("http://www.chronosconsulting.com/carnaval.asp", "_self");
};
Instance of Symbol 5 MovieClip "snow" in Frame 1
onClipEvent (load) {
movieWidth = 320;
movieHeight = 120;
i = 1 + (Math.random() * 2);
k = -3.14159265358979 + (Math.random() * Math.PI);
this._xscale = (this._yscale = -2 + (Math.random() * 100));
this._alpha = 20 + (Math.random() * 100);
this._x = -10 + (Math.random() * movieWidth);
this._y = -10 + (Math.random() * movieHeight);
}
onClipEvent (enterFrame) {
rad = rad + ((k / 180) * Math.PI);
this._x = this._x - Math.cos(rad);
this._y = this._y + i;
if (this._y >= movieHeight) {
this._y = -5;
}
if ((this._x >= movieWidth) || (this._x <= 0)) {
this._y = -5;
}
var rnd1;
rnd1 = Math.ceil(Math.random(4) * 20);
if ((rnd1 % 2) == 1) {
this._yscale = 100 * (rnd1 / 10);
this._xscale = 100 * (rnd1 / 10);
this._rotation = rnd1 * 10;
this.beginFill(16711680);
this.endFill();
}
if ((rnd1 % 2) == 0) {
this._yscale = 100 / (rnd1 / 10);
this._xscale = 100 / (rnd1 / 10);
this._rotation = rnd1 * 40;
}
}
Symbol 20 Button
on (press) {
if (_root.bOnOff == 1) {
_root.bOnOff = 0;
_root.my_sound.stop();
} else {
_root.bOnOff = 1;
_root.my_sound.start(0, loop);
}
}