[FREE] ScrollImage - cyclic background rotation

With this extension, you can organize the cyclic rotation of the image inside the specified component (for example, inside a vertical arrangement). this can be useful in the game or in the layout design. I remember that I once felt the need for such an algorithm :slight_smile:

The extension allows you to scroll images vertically or horizontally cyclically. here is the entire list of expansion blocks:


Start
starts scrolling.
input data:component, image file name, scroll direction.
the file name can be either the absolute path “/storage/emulated…” where the sign “/” is taken as an absolute path or without it is understood as a file from assets (configured for Kodular).

blocks for pausing and continuing scrolling:
pause
the scroll stop block:
stop
direction control units
directtion
before changing the scrolling direction, I recommend that you first stop scrolling and then change the direction or image

The scrolling speed can also be set in the editor or as a block during scrolling
event:
event
numberOfScrolls - the number of completed scrolls (int)

Download:
ScroolImage_(com.TEST92).apk (4.7 MB)
ScrolImage_v1.aix (11.7 KB)

12 Likes

it doesn’t work for me

And my too

1 Like

what exactly is not working? Can you show the blocks? to understand what the problem is

here are my blocks.
it doesn’t work for me…


image
The background is set by the function. if you close it with another image, you just won’t see it.
here is an example:
image

it doesn’t work this way either


here is an example and here are the blocks and it works
EX_Scrool.aia (72.5 KB)
image
image
for you, I also checked back in the MIT APP. It also works


perhaps you have a picture set as a background. You don’t have to do that. the image is set precisely by the function. you don’t need to set backgrounds unless you want to add components directly on top of the moving picture

works perfectly, i can’t figure out what i was doing wrong.
great extension.
thanks

errors that may occur in such cases:

  1. You have set the background in the specified container. the background covers (completely or partially) the moving picture.this is very convenient if you want to place more components on top where there will be a picture moving in the background below them. in other words, you don’t care about the background, the function does.
  2. Access to the file. if you are working in a Kodular environment, then it is enough to specify the file name for the assets and not worry further (“myfile.jpg”). If you work in a different environment, then when working in the editor, one path follows (for example, for MIT, the path to the image should be specified in full (through “/”) and for the editor this will be

/storage/emulated/0/android/data/edu.mit.appinvertor.aicompanion3/files/assets/myfile.jpg

, and outside the editor is the way (for apk file)

“myfile.jpg”.

i.e. for Kodular it’s just always "myfile.jpg ".

I mentioned that first of all it is made for the Kodular editor
the code in the extension determines that if you are in the editor, then a special path is applied, otherwise if it is an apk, then standard access to assets is applied. in other editors, you should take care of this yourself, as I wrote above.