# Pause music

**URL:** <https://forum.kirupa.com/t/pause-music/237681>\
**Category:** flash\
**Created:** [September 2, 2007, 1:38pm UTC](https://forum.kirupa.com/t/pause-music/237681 "2007-09-02T13:38:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emiel](https://avatars.discourse-cdn.com/v4/letter/e/57b2e6/32.png) [@Emiel](https://forum.kirupa.com/u/Emiel)\
**Post date:** [September 2, 2007, 1:38pm UTC](https://forum.kirupa.com/t/pause-music/237681/1 "2007-09-02T13:38:27Z")

</div>

Hello! i have a problem with my music palyer i can’t get it to just pause/mute the music.  
could sombody help me? here’s the code.

```auto
bgSound = new Sound();
bgSound.loadSound("ChrisBrow-RunIt.mp3",true);

playIt.enabled = false;

slider.slideBar._x = 130;
slider.slideBar.onEnterFrame = function() 
{
    bgSound.setVolume(0+this._x);
};

slider.slideBar.onPress = function() 
{
    startDrag(this, false, this._x, 130, this._y, 0);
};

slider.slideBar.onRelease = function () 
{
    stopDrag();
};

stopIt.onRelease = function() 
{
    bgSound.stop();
    playIt.enabled = true;
    stopIt.enabled = false;
};

pauseIt.onRelease = function() 
{
    timeIt = bgSound.duration
    bgSound.stop();
    playIt.enabled = true;
    stopIt.enabled = true;
    pauseIt.enabled = false;
};

playIt.onRelease = function() 
{
    bgSound.start(timeIt);
    playIt.enabled = false;
    stopIt.enabled = true;
    pauseIt.enabled = true;
};

stop();

```
