# Sound play button

**URL:** <https://forum.kirupa.com/t/sound-play-button/136155>\
**Category:** Uncategorized\
**Created:** [February 2, 2005, 6:52pm UTC](https://forum.kirupa.com/t/sound-play-button/136155 "2005-02-02T18:52:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![beamond](https://avatars.discourse-cdn.com/v4/letter/b/e47774/32.png) [@beamond](https://forum.kirupa.com/u/beamond)\
**Post date:** [February 2, 2005, 6:52pm UTC](https://forum.kirupa.com/t/sound-play-button/136155/1 "2005-02-02T18:52:48Z")

</div>

What code would i use for a play button that would tell it not to play if the sound is already playing?

The problem i’m having is with music that auto plays when a page is loaded. if i click the play button while it is already playing, it starts playing another loop of the same sound object over the top. i’m sure this is a simple one line of code. can you help??

thanks
