duplicateMC, removeMC ---?--- FMX

Somebody posted an effect like that in the old forums… but I don’t know who it was(I know that his nick started wih “d”)
here goes:
I have a movieclip following the mouse.
I want to duplicate it. So there would be like trail following the mouse (duplicateMovieclip)
But I don’t want then to be more that 50! (removeMovieClip)
How do I make it so?

what i do is that i have an animation that gradualy fades out and then has a removeMovieClip at the end in the movie clip…so this way you duplicate it then it slowly fades and disapears

Probably not the most advanced way but it works for me

the code you would need for duplicate is


Ok that should work :slight_smile:

hmm… Why didn’t I think of that?
actually I was just looking for the removemovieclip action stuff but I wanted to be sure… thx!

hmh… solving that problem causes another!
I was making radnom smooth movement with a trail. It worked fine until I added this: (the bold)

onClipEvent (load) {
	MovieClip.prototype.newpos = function() {
		_root.newx = random(1024);
		_root.newy = random(768);
onClipEvent (enterFrame) {
	**duplicateMovieClip(_root.ss.circle, "circledup"+d, d);
	_root.xpos = this._x;
	_root.ypos = this._y;
	_root.ss.circle._x += (_root.newx-_root.xpos)/10;
	_root.ss.circle._y += (_root.newy-_root.ypos)/10;
	if ((_root.xpos>=_root.newx-10) and (_root.xpos<=_root.newx+10) and (_root.ypos>=_root.newy-10) and (_root.ypos<=_root.newy+10)) {

It worked fine… a circle moved smoothly from one point to another, but when I put this code there it started … I don’t know what to call it!
I zipped and attached the fla (it’s without the duplicateMC code, you can add it yourself to see what happens)
Any help would be greatly appreciated :-\

Oops here’s the .fla
(forgot to attach :))

ur problem is that when u duplicate the movie clip you are also duplicating the actions that go with it…or at least that what i think it is :slight_smile:

Works like a charm!
Thanx Bezzer! :):):slight_smile: