Mouse trail effect for an object

i am trying to create a trail behind an object - like a mouse trailer. i have found many mouse trailer scripts but do not know what to adjust so that it will follow an object/symbol…thanks for you help…here is the script that i was gonna use…

//initialization
d=1;
speed=10;
ssize=10;
dif=60;

//create sample
_root.createEmptyMovieClip(“sample”, 16000);
with(_root.sample){
lineStyle(5, 0x0, 70);
moveTo(-10, 0);
lineTo(10, 0);
moveTo(0, -10);
lineTo(0, 10);
}

//hide sample
_root.sample._visible=0;

//duplicating clips
_root.onMouseMove=function(){
duplicateMovieClip(“sample”, “start”+d, d);
_root[“start”+d]._x=_root._xmouse+random(dif)-dif/2;
_root[“start”+d]._y=_root._ymouse+random(dif)-dif/2;
_root[“start”+d]._width=ssize;
_root[“start”+d]._height=ssize;
mColor=new Color(_root[“start”+d]);
mColor.setTransform({rb:random(256), gb:random(256), bb:random(256)});
_root[“start”+d]._visible=1;
_root[“start”+d].onEnterFrame=function(){
this._alpha-=speed;
if(this._alpha<=0) removeMovieClip(this);
}
d++;
}

instead of _root._xmouse and _root._ymouse, write in the x,y coordinates of your object, like: myObject._x, myObject._y

Wow! Thanks a lot for you for your help! I really appreciate it!

Will this work if the object is on a motion guide…thanks!

eh? What object?

you were saying to write in “the x,y coordinates of the object” - i was wondering if this will work if the object or symbol is on a motion guide…thank so much for you help!

well, those two things kind of conflict eachother. If it’s on a motion guide, then the guide is wanting to move it. If you use actionscript to start writing _x and _y corrdinates to it, then those will want to move it. All I can say is try it and find out!

You’re welcome for the help.