# Play/Pause Music with Single Button?

**URL:** <https://forum.kirupa.com/t/play-pause-music-with-single-button/297301>\
**Category:** Uncategorized\
**Created:** [September 29, 2009, 11:21pm UTC](https://forum.kirupa.com/t/play-pause-music-with-single-button/297301 "2009-09-29T23:21:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![codeoverride](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@codeoverride](https://forum.kirupa.com/u/codeoverride)\
**Post date:** [September 29, 2009, 11:21pm UTC](https://forum.kirupa.com/t/play-pause-music-with-single-button/297301/1 "2009-09-29T23:21:23Z")

</div>

'm extremely new to Flash and I don’t really know how to code yet… I’m making a website and want to have a single button that when pressed either plays or pauses the music file.

I found a tutorial that worked but it has two buttons (one for play and one for stop). You can see the tutorial here:

[http://www.aevision.com/tutorials/flash\_pause\_p3.htm](http://www.aevision.com/tutorials/flash_pause_p3.htm)

I’m hoping that someone can tell me how I might be able to change the code so that a single button acts as both play and pause (i.e.; If music is not playing then play, if music is playing then stop).

Thanks!
