feux d'artifice
Code-source frame1 : AS
for (i=1; i<5; i++) {
if (random(3)<1) {
attachMovie("explosion", "elt"+profondeur, profondeur);
feu = new Color(this["elt"+profondeur]);
feu.setRGB(couleurs[random(5)]);
with (this["elt"+profondeur]) {
_xscale = _yscale = 25+random(125);
_x = random(400);
_y = 300-random(200);
}
profondeur++;
profondeur %= 10;
}
}
Code-source frame2 : AS
i = 0;
effet = "effet"+random(3);
while (i<100) {
duplicateMovieClip("anim", "anim"+i, i);
with (this["anim"+i]) {
_rotation = random(360);
_xscale = _yscale=40+random(100);
gotoAndPlay(effet);
}
i++;
}
effet flamme
1) Frame 1
Code-source : AS
i = 0;
setProperty ("flam", _visible, 0);
posX = getProperty("flam",_x);
2) Frame 2
Code-source : AS
if(i < 50)
{
duplicateMovieClip ("flam", "flam"+i, i);
setProperty ( "flam"+i, _x,posX+random(3));
i++;
}
3) Frame 3
Code-source : AS
gotoAndPlay(2);