# Play / stop button

**URL:** <https://forum.kirupa.com/t/play-stop-button/216574>\
**Category:** Uncategorized\
**Created:** [February 18, 2007, 10:42am UTC](https://forum.kirupa.com/t/play-stop-button/216574 "2007-02-18T10:42:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [February 18, 2007, 10:42am UTC](https://forum.kirupa.com/t/play-stop-button/216574/1 "2007-02-18T10:42:15Z")

</div>

this is too easy - but I cant work it out…

I have an MC which plays when movie is loaded. I have a button which I want to use to stop the MC playback. Then when it has stopped, have the same button to make it play. Simple… yep … Well my code went like this:

if (roller.stop = true) {  
btn.onRelease = function (){  
roller.play();  
}  
}

if (roller.play = true){  
btn.onRelease = function () {  
roller.stop();  
}  
}

where have I gone wrrong?

cheers
