I’ve been trying to do this the whole day to no success so i needed help
I wanted to make a duplicated clip to follow another duplicated clip
like star1 is followed by star2 which is followed by star3 and so on…
my actionscript is as follow
onClipEvent(enterFrame){
_parent.star1._x += (_parent.star0._x - _parent.star1._x)/ 5;
_parent.star1._y += (_parent.star0._y - _parent.star1._y)/ 5;
for(i=2;i<20;i++){
j = i - 1;
duplicateMovieClip(_parent.star1,newname="star"+i,i);
_parent["star"+i]._x += (_parent["star"+j]._x - _parent["star"+i]._x)/ 5;
_parent["star"+i]._y += (_parent["star"+j]._y - _parent["star"+i]._y)/ 5;
}
}
this code only gets me all the duplicated star overlaped in 1 spot following only star0. How can i fix this?