# Locking a MC to a path

**URL:** <https://forum.kirupa.com/t/locking-a-mc-to-a-path/311216>\
**Category:** flash\
**Created:** [June 30, 2010, 10:56am UTC](https://forum.kirupa.com/t/locking-a-mc-to-a-path/311216 "2010-06-30T10:56:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FunkMaster\_J](https://avatars.discourse-cdn.com/v4/letter/f/9e8a1a/32.png) [@FunkMaster\_J](https://forum.kirupa.com/u/FunkMaster_J)\
**Post date:** [June 30, 2010, 10:56am UTC](https://forum.kirupa.com/t/locking-a-mc-to-a-path/311216/1 "2010-06-30T10:56:17Z")

</div>

Hi all,

I’m trying to find a way to lock a MC (or any other instance) to a path.

Best way to describe what I want to do is … imagine there’s a drawn out rail track (the path), and at the press of a button a train (MC) will constantly move along the path until the button is pressed again.

Trying to code this within AS3 too.
