Sorry, if you don't understand because the title length. The title suppose to say: "How do I make an object scroll left and right when I move my mouse left and right?".
Develop games in your browser. Powerful, performant & highly capable.
If I understood you correctly:
Give the object bullet behavior and then Every Tick -> Set Bullet angle of motion to angle(self.x,self.y,mouse.x,self.y). In other words, towards your cursor with the Y axis locked.