Scrolling

To get objects to move you need to animate those objects. Animation options:

  • ReactOn = global switch / formula / BG Scroll

  • Action = Scroll

  • Ease (gv) = style of animation

  • Duration (gv) = how long the animation lasts (10 = 1 second)

  • Rule (BG) = you can block the animation before/after the Center screen that you set in the next step

  • Center (BG) = pick the screen you want that object/group/text to be visible on: SCREEN1, SCREEN2, etc.

  • Speed = how far the object scrolls: make it a formula (tap the square on the right and then the calculator icon in top right, then tap on the space where the slider was before and paste in the formula available on this page)

  • Angle = for moving horizontally: 0 or 180, vertically: 90 or 270

  • Delay (gv) = how much time the animation waits before starting (1/10s just like Duration)

  • Limit = Limit is sometimes useful, but usually not necessary when you use a formula for speed. (Keep in mind that the limit is in kp, unlike the speed)

Just make sure that you set the preferred number of blank pages in your launcher FIRST and save the wallpaper in KLWP after that.

Scrolling speed is a % calculated based on the screen width, where si(rwidth) = 100% .

Therefore, the formula for animation speed is:

$[distance]*100/si(rwidth)$


Global Switch / Formula

Customize the Ease, Duration, Angle and Delay of the animation. For speed use the formula above.

Example: scroll something when you activate a global switch for 240kp to the right:

  • Speed: $240*100/si(rwidth)$

  • Angle: 0

  • Limit: 0 or 240

You can also use one complex animation for fixed values like this, but that's a different tutorial.

BG Scroll

If you have 2 screens, to move an object from one screen to another, the animation speed is 100 (because it moves for the full screen width = 100% to get to the next screen). If you have 3, then it's 200...

Therefore you need to multiply the base animation speed formula with the number of screens the animated object will travel:

$(si(screenc)-1)*si(rwidth)*100/si(rwidth)$

Or in short:

$(si(screenc)-1)*100$

Move an Object Gradually from the Beginning to the End of One Screen

Just divide the formula with the number of steps the object has to complete before it gets to the end.

For example all pages:

$(si(screenc)-1)*100/si(screenc)$

Or just 3 scrolls on page 2:

  • Rule: From Center

  • Center: SCREEN 2

  • Speed: $(si(screenc)-1)*100/3$

  • Angle: 180

  • Limit: $si(rwidth)$

Move an Object for a Custom Distance

This is where we make use of the full speed formula 100*[distance]/si(rwidth).

To move something for 240kp:

$(si(screenc)-1)*100*240/si(rwidth)$

To move something for 240kp less than the whole screen width:

$(si(screenc)-1)*100*(si(rwidth)-240)/si(rwidth)$

Scroll Vertically

Change the angle of the animation to 90 or 270 and use the Custom Distance formula, where [distance] = si(rheight).

The formula for full screen scrolling animation is:

$(si(screenc)-1)*100*si(rheight)/si(rwidth)$

Move something for 240kp less than the whole screen height:

$(si(screenc)-1)*100*(si(rheight)-240)/si(rwidth)$

Scroll something down for 240kp twice on Screen 2:

  • Rule: From Center

  • Center: SCREEN 2

  • Speed: $(si(screenc)-1)*100*240/si(rwidth)$

  • Angle: 270

  • Limit: $240*2$



Copyright (c) 2018 Erik Bucik

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

BSD-3-Clause

Kustom formatted version