# How to increase speed of a mc and also stop it?

**URL:** https://forum.kirupa.com/t/how-to-increase-speed-of-a-mc-and-also-stop-it/322063
**Category:** flash
**Created:** [May 9, 2011, 10:53am UTC](https://forum.kirupa.com/t/how-to-increase-speed-of-a-mc-and-also-stop-it/322063 "2011-05-09T10:53:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Chbook](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@Chbook](https://forum.kirupa.com/u/Chbook)
#### Post date: [May 9, 2011, 10:53am UTC](https://forum.kirupa.com/t/how-to-increase-speed-of-a-mc-and-also-stop-it/322063/1 "2011-05-09T10:53:26Z")

</div>

hi i wish to increase/decrease the speed that the mc plays (frames are inside the mc) but if the mc reaches a certain frame it should stop.

I have the code for stopping-

this.onEnterFrame = function() {  
Cholesterol.play();  
if (Cholesterol.\_currentframe == 10) {  
Cholesterol.stop();  
delete this.onEnterFrame;

here is the code for the speed-

function playMovie(){  
holder\_mc.gotoAndStop(holder\_mc.\_currentframe+1);  
}  
playID=setInterval(playMovie,100)//10 frames per second

but the two peices of code seems to cancel eachother out.  
Thank you for the help
