# It wont follow!?!

**URL:** <https://forum.kirupa.com/t/it-wont-follow/24152>\
**Category:** Uncategorized\
**Created:** [June 26, 2003, 4:26pm UTC](https://forum.kirupa.com/t/it-wont-follow/24152 "2003-06-26T16:26:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lt\_KEVLORD\_gt](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@lt\_KEVLORD\_gt](https://forum.kirupa.com/u/lt_KEVLORD_gt)\
**Post date:** [June 26, 2003, 4:26pm UTC](https://forum.kirupa.com/t/it-wont-follow/24152/1 "2003-06-26T16:26:31Z")

</div>

i want an mc to follow an mc but my code:

[COLOR=red]onClipEvent (load) {  
this.\_x = \_root.attach.car\_x;  
this.\_y = \_root.attach.car\_y;  
}[/COLOR]

doesent works ;( . its a field that has to stay straight and follow the car alltough the car is turning and moving:-.

if you could help id be thankfull:s:.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 26, 2003, 4:34pm UTC](https://forum.kirupa.com/t/it-wont-follow/24152/2 "2003-06-26T16:34:19Z")

</div>

[http://downloads.junioronline.us/details.php?section=3&item=2](http://downloads.junioronline.us/details.php?section=3&item=2)

```auto
MovieClip.prototype.moveMe = function(targetX, targetY, acc)
{
     this.onEnterFrame = function()
     {
          this._x += (targetX-this._x) / acc;
          this._y += (targetY-this._y) / acc;
     };
};

mymovieclip.moveMe(_root.attach.car._x, _root.attach.car._y, 20);

```

try this, with the mc that’s to follow the car named ‘mymovieclip’… 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 26, 2003, 4:36pm UTC](https://forum.kirupa.com/t/it-wont-follow/24152/3 "2003-06-26T16:36:23Z")

</div>

thanx;)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 26, 2003, 4:47pm UTC](https://forum.kirupa.com/t/it-wont-follow/24152/4 "2003-06-26T16:47:39Z")

</div>

vote on the poll!:d

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 26, 2003, 7:24pm UTC](https://forum.kirupa.com/t/it-wont-follow/24152/5 "2003-06-26T19:24:48Z")

</div>

mmmmmmmmmh ok it works… but only once.  
in the begin it comes towards the car but then it stays where the car started and it isent FOLLOWING the car.

\*\*\*\*!!!  
well thanx anyway for your trouble.  
maybe somebody else can help me:alien:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 8:06pm UTC](https://forum.kirupa.com/t/it-wont-follow/24152/6 "2003-06-27T20:06:44Z")

</div>

somebody else…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 9:03pm UTC](https://forum.kirupa.com/t/it-wont-follow/24152/7 "2003-06-27T21:03:30Z")

</div>

Looking at ahmeds code it should work all the time, theres nothing wrong and nothing to make it stop working :-\

Oh, and I voted no on the poll 🙂 The forum is a place to post questions and whoever is able to help can help if they want to, so I don’t see a point to having skills in the profile. Unless of course you wanted to hunt someone down and PM them your question and/or PM them to look at your thread, both of those defeat the entire purpose of the forum and I don’t agree with them, so either way my answer is still no 😛
