I made a simple code for one here. Put this in the frame you want it to happen in:
dotcount = 0;
onEnterFrame = function () {
duplicateMovieClip("dot", "dot" + dotcount, dotcount);
tellTarget ("dot" + dotcount) {
_y = _root._ymouse;
_x = _root._xmouse;
_rotation = Math.random()*360
}
dotcount++;
};
Make the movieclip's instance name called "dot" and on the frame in the movieclip you it to dissapear put this:
removeMovieClip(this);