Ok, I'm really new to flash - so I'll be grateful for any help on this.

I basically have a movie that when the mouse goes over, the movie follows. However I've restricted it to only move up and down when my mouse goes over it. I want it so that when the mouse is dragged higher, the higher the sound goes, and when it is brought down lower, it get's quieter.

This was my attempt but it f***ed up the graphics for some reason:

soundone = new Sound();
soundone.attachSound("soundone");
soundone.start()

top = beforestate2._y-50;
bottom = beforestate2._y+50;
left = beforestate2._x;
right = beforestate2._x;
center = beforestate2._x;


this.onEnterFrame = function() {
_root.volposition.text = _root.one.beforestate.soundone.getVolume();
var yMouse = _root._ymouse;
soundone.setVolume((_y-bottom)*2);
if(Math.abs(xMouse - this._x) < 2) {
this._y = yMouse;
} else {
this._y -= (this._y-yMouse) / 6;
}

}

I've been trying this for a long time with no luck. Any help is appreciated!

Thanks, andifall.