Sugestão para set imagens

qual outra solução para eu set imagens para utilizar menos blocos
what other solution for I set images to use less blocks.

.

How are your files named as? Make use of some patterns and take out the common thing.

1 Like

1.jpg
2.jpg

Como assim amigo??

If they are named as numbers then make a list of all the image component as variable, use Any Image’s set Picture property from Any Components category and finally, inside a for loop block, on Any Image. Picture, set component to get item and picture to (path + index) (store path as local or global variable)

1 Like

If that wasn’t clear to understand, then if you ask, I will show you with the blocks.

1 Like

Obrigado amigo,mas poderia me mostrar os blocos pois ainda sou leigo e não entendi muito bem.

Sure, wait for some time, while I create an example

1 Like

Obrigado amigo

Aguardo amigo

Just after I have my dinner…

1 Like

Hello @Ruan_Esmeraldo, here is the example

AIA file: Example.aia (2.9 KB)


@TurboProgramming, you wanted to see the code behind the builder. All App Inventor based builders generate YAIL, which is an intermediate language which itself convert to Java after compilation.

Here is the YAIL file for this example which is not readable as other languages.

Screen1.yail (1.2 KB)

3 Likes

amigo não funcionou

I just saw that I forgot to add the path variable block.

image

1 Like

isto amigo certinho obrigado