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.
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();