How to animate camera in side scroller?

Hi,
Would You be so kind and tell me how can I connect side scrolled camera and changed its Position or SpringArm? Example: Character goes right (right click) so camera follow like in side scroller but at the same time I want to move it away from Character. When Character goes left (left click) camera follows and get closer. Im sure You get the idea.
I can imagine theres a lot of ways to do it but Im not a programmer. Simple explenation (if possible) would be appreciated.
All the best!
MN

Hello ,

Although this may not be an exact solution, this example should get you started on controlling the length of your SpringArm

,
This is a great start and almost exactly what I was looking for. Thank You very much.
If You ll have more ideas, links or blueprints, Ill be happy to read.
All the best!
Nowak