Fixed sprites on scrolling canvas

429 views
Skip to first unread message

Scott Ferguson

unread,
Feb 9, 2016, 9:58:28 AM2/9/16
to App Inventor Developers Library
This solution is specific to a canvas that is 3x the screen width inside a HorizontalArrangment that is 5x the screen width.
This allows the entire Canvas to be scrolled left and right while keeping it always covering the device viewport.
So 1/3 of the Canvas is always visible.
The canvas scrolls horizontally only.
Canvas movement can be seen by the scrolling Canvas BackgroundImage.

Four ImageSprite instances are kept fixed and adjust their positions in the viewport as the Canvas scrolls left and right via a Slider.
A Ball sprite moves with the Canvas left and right so does not adjust it's position.
---
sf
SliderScroll.aia
Screenshot_2016-02-07-23-56-48.png
Reply all
Reply to author
Forward
0 new messages