Side scrolling by moving a 2x Canvas

481 views
Skip to first unread message

Scott Ferguson

unread,
Mar 6, 2016, 5:28:02 PM3/6/16
to app-inventor-de...@googlegroups.com
In this side-scrolling demo, the canvas is twice the width of the device screen.
That means that the left and right sides of the ScrollingCanvas.BackgroundImage must be identical (see attached image).
The horizontal arrangement that contains the ScrollingCanvas is three times as wide as the device screen.
That allows the canvas to shift left and right by one screen width.
The horizontal arrangment ScrollingCanvasX is to the left of the ScrollingCanvas and it's Width pushes and pulls ScrollingCanvas left and right below the device screen.
When ScrollingCanvasX.Width = Screen1.Width, the left side of ScrollingCanvas is visible.
When ScrollingCavnasX.Width = 0, the right side of the ScrollingCanvas is visible.
This demonstrates the minimum width for a scrolling canvas.
A scrolling canvas may be larger, but if it is too large the device will run out of memory.
A larger canvas does allow the middle of a background image to be different from the outside edges, however.
---

blocks.PNG
Screenshot_2016-03-06-16-14-08.png
SideScrollingMoving2xCanvas.aia
clouds2x.png

mike walker

unread,
Oct 31, 2016, 6:10:48 PM10/31/16
to App Inventor Developers Library
Do you have a screen shot of the components used? 

Taifun

unread,
Oct 31, 2016, 7:55:17 PM10/31/16
to App Inventor Developers Library
what about importing the provided project (aia file) into App Inventor and taking some screenshots yourself?
Taifun
Reply all
Reply to author
Forward
0 new messages