Hello,
here is my little code…
move the mouse for better experience…
_root.totalcount = 0;
_root.stararray = [{altx:0, alty:-12}, {altx:3, alty:-3}, {altx:12.5, alty:-3}, {altx:5, alty:3}, {altx:7.5, alty:12}, {altx:0, alty:6.5}, {altx:-7.5, alty:12}, {altx:-5, alty:3}, {altx:-12.5, alty:-3}, {altx:-3, alty:-3}];
function drowstar(mc) {
mc.beginFill(random(16777215));
mc.moveTo(_root.stararray[0].altx, _root.stararray[0].alty);
for (id=1; id<_root.stararray.length; id++) {
mc.lineTo(_root.stararray[id].altx, _root.stararray[id].alty);
}
}
function startFirework(Cx, Cy) {
_root.totalcount++;
_root.createEmptyMovieClip((curentadres=('firework'+_root.getNextHighestDepth())), _root.getNextHighestDepth());
_root[curentadres]._x = Cx;
_root[curentadres]._y = Cy;
_root[curentadres]._xscale = _root[curentadres]._yscale=0;
_root[curentadres]._rotation = random(360);
_root[curentadres].onEnterFrame = function() {
this._yscale = this._xscale += (100-this._xscale)*(0.25+Math.random()*0.1);
this._x += (_root._xmouse-this._x)*0.1;
this._y += (_root._ymouse-this._y)*0.1;
if (this._yscale>95) {
if (_root.totalcount--<200) {
_root.startFirework(random(800), random(600));
_root.startFirework(random(800), random(600));
}
this.removeMovieClip();
}
};
_root.drowstar(_root[curentadres]);
}
_root.startFirework(400, 300);
have fun.