Sound volume by position mouse

Is there any code in as3 that sets the volume by x&y- coordinates of the mouse?
So that my sound is in a MC, and how closer my mouse is at the MC, the louder the volume gets?