Scrolling MC

Hi all,

I’m using the following code to move my MC left and right with the mouse. But I need to flip the direction that the code works, I’ve tried and tried but can’t seem to get it working. Please can someone help me out!

var r:Number = (mouseX)/(stage.stageWidth);
   var left:Number = 0
   var dx:Number = Math.round((((left - (left - scrollMaxX) * r) - (_tCamera.x)) / speed) * friction);
   _tCamera.x +=  dx

Thanks