PDA

View Full Version : mc follow mc



gmftballa
November 27th, 2004, 08:11 PM
um can some1 tell me the script that makes one movieclip follow another?
thanks

Dr Warm
November 27th, 2004, 08:49 PM
what do u mean by follow?
- one movieclip is directly on the other

- one movieclip follows the other, but catches up when the other stops

- one heads towards the other, including rotation

gmftballa
November 28th, 2004, 03:52 PM
one movieclip follows another then when one stops the one following catches up

andr.in
November 28th, 2004, 04:02 PM
onClipEvent(enterFrame) {
_x = (_parent.othermc._x-_x)/5;
_y = (_parent.othermc._y-_y)/5;
}
where "othermc" is the name of the other mc and the number at the end is how fast it catches up... as well as the distance.

gmftballa
November 28th, 2004, 04:07 PM
k thanks :)