# MC Speed

**URL:** https://forum.kirupa.com/t/mc-speed/2597
**Category:** flash
**Created:** [May 30, 2002, 2:15am UTC](https://forum.kirupa.com/t/mc-speed/2597 "2002-05-30T02:15:03Z")
**Posts on this page:** 5
**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: [May 30, 2002, 2:15am UTC](https://forum.kirupa.com/t/mc-speed/2597/1 "2002-05-30T02:15:03Z")

</div>

How can I have an MC play at different speeds upon a button click. For example, I want button one to play the MC “cars” at one speed, and button two to play the same MC (cars) at another speed? Thanks in advance…

---

<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: [May 30, 2002, 2:21am UTC](https://forum.kirupa.com/t/mc-speed/2597/2 "2002-05-30T02:21:28Z")

</div>

set variables. have the movieclips move at the speed “nSpeed” and then when the buttons are pressed change the values of “nSpeed”

or do you mean different FPS? cuz thats not easy, Sinf had a way to do it, but its very complicated.

---

<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: [May 30, 2002, 2:36am UTC](https://forum.kirupa.com/t/mc-speed/2597/3 "2002-05-30T02:36:43Z")

</div>

Ok, I wanted different FPS, but how do I change the values of nSpeed upon different clicks of a button?

---

<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: [May 30, 2002, 2:41am UTC](https://forum.kirupa.com/t/mc-speed/2597/4 "2002-05-30T02:41:47Z")

</div>

on(press){  
nSpeed = 4  
}

and on a different button would be

on(press){  
nSpeed = 9  
}

you could use this when moving movieclips. the code on a movie clip would look something like this.

onClipEvent(enterFrame){  
this.\_x += nSpeed  
}

this would move the movieclip to the right with a speed of “nSpeed”

---

<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: [May 30, 2002, 3:13am UTC](https://forum.kirupa.com/t/mc-speed/2597/5 "2002-05-30T03:13:50Z")

</div>

Thank you so much. That was great information you provided.
