Can someone help me with this mouse drag effect

Lets say I have a movieclip with 20 frames. How can I script it so when i click and drag my mouse on the movieclip and to the left the movieclip will auto play from frames 1 to 10 then when I drag back and to the right the movieclip will play backward from 10 to 1 and then play from 11 to 20. This effect should also work vice versa if user first chooses to move to the right.