# Music control slider bar as2

**URL:** <https://forum.kirupa.com/t/music-control-slider-bar-as2/310840>\
**Category:** programming\
**Created:** [June 21, 2010, 5:09am UTC](https://forum.kirupa.com/t/music-control-slider-bar-as2/310840 "2010-06-21T05:09:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![overlordlink](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@overlordlink](https://forum.kirupa.com/u/overlordlink)\
**Post date:** [June 21, 2010, 5:09am UTC](https://forum.kirupa.com/t/music-control-slider-bar-as2/310840/1 "2010-06-21T05:09:49Z")

</div>

OK I have been following a tutorial and making modifications as I went to make it work with what i needed. Now the only problew is I cant get it to play my linked song right and the slider I am using wont stopDrag lol.  
here is my code.

```php

onClipEvent(enterFrame)
{
_root.mslider.slider.onPress = function(){
    _root.mslider.slider.startDrag(true, _root.mslider.bar._x, _root.mslider.bar._y, _root.mslider.bar._x + 200, _root.mslider.bar._y);
}
    _root.mslider.slider.onRelease = function() {
        _root.mslider.slider.stopDrag;
}
    _root.playbutton.onRelease = function() {
        Mysong = new Sound();
        Mysong.attachSound("battletheme");
        Mysong.start(0, 10);
}
    _root.stop_btn.onRelease = function() {
        stopAllSounds;
}
_root.mslider.slider.onMouseMove = function(){
    newPoint = new Object();
    newPoint.x = _root.mslider.slider._x;
    newPoint.y = _root.mslider.slider._y;
    _root.mslider.bar.globalToLocal(newPoint);
    _root.Mysong.setVolume(-1*newpoint.x);
}
}

```

Can someone please help me fix it?
