i have drawed a rectangle on my stage, which on mouseEnter
scrolls the background image 10 pixels to the left/right/up/bottom
etc. It uses the following function.
Now i was wondering if it is possible to create a smooth slow
to fast scroll.
For example: the rectangle is 50 pixels width, the first 5
pixels is speed 1 the second speed 2 etc. When i use seperate
retangles, it does not seem to go smooth. So i guess i need some
math for calculate the speed. Pixel 1, speed=0.2, pixel 2,
speed=0.4 etc. Something like this to make a smooth scroll.
Basicly i want to create a smooth scroll depending on the
location of the mouse cursor.
Hope someone understands what i am talking about and know how
to create that sort of thing.