# Moving MCs

**URL:** <https://forum.kirupa.com/t/moving-mcs/3020>\
**Category:** flash\
**Created:** [February 12, 2002, 9:18pm UTC](https://forum.kirupa.com/t/moving-mcs/3020 "2002-02-12T21:18:44Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [February 12, 2002, 9:18pm UTC](https://forum.kirupa.com/t/moving-mcs/3020/1 "2002-02-12T21:18:44Z")

</div>

Although this is so basic, I need some sum recollection refreshing on moving an MC across the stage. In fact, I really need sum codez to store in my actionscript archive in the event that my memory gets suddenly jaded, as it does sometimes.

Thus, for example, I want my MC to move from right to left and loop continiously? …something like Kirupa’s footer on the bottom of this page? How would I set up the variables and the actions for that?

Flamboyant Flasher…

---

<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:** [February 12, 2002, 9:22pm UTC](https://forum.kirupa.com/t/moving-mcs/3020/2 "2002-02-12T21:22:58Z")

</div>

You can use Actionscript or tweens for that.  
If you use tweens, which I don’t recommend, just make your tween go from out right to out left, and don’t put any stop () action so that it loops.  
If you use Actionscript, well, just play with the \_x properties… I don’t want to do it for you. Brainstorm a little bit and post back if you can’t get it to work.

pom 0]

---

<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:** [February 12, 2002, 9:53pm UTC](https://forum.kirupa.com/t/moving-mcs/3020/3 "2002-02-12T21:53:15Z")

</div>

assuming that the contents of the \_root timeline take up exactly the width of the stage in the publishing environment:  
a movie’s object actions:  
onClipEvent(load){  
\_x=\_root.\_width+\_width/2;  
}  
onClipEvent(enterFrame){  
if(\_x\>-(\_width/2)){  
\_x-=nSpeed;  
} else {  
\_x=\_root.\_width+\_width/2;  
}  
}

where ‘nSpeed’ is a variable that represents the number of pixels you would like the clip to move each frame.  
🙂  
jeremy

---

<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:** [February 12, 2002, 10:11pm UTC](https://forum.kirupa.com/t/moving-mcs/3020/4 "2002-02-12T22:11:13Z")

</div>

Hey Jeremy,  
Thanks for ruining my educational project ☹

pom 0]
