Thank you very much for your advice. I'm basically still a newbie here, so it helped me a lot to understand the problem. Just out of curiosity I even applied it with small changes into a timer (for counting seconds). Everything was running smoothly.
However, I will have to do more research, because this seems to be not working in my case. I don't know, what I'm doing wrong. In your sample, the pictures with digits are shown after the button is clicked. I tried to apply your sample on a timer, so after timer.timer pictures with digits started changing. But I'm not quite sure, where should I apply it in my case. I only have a label for score counting, for changing score, I used procedure (but first, I started by initialization of score to 0). There is no 'when something do' I could use.
Also, I keep getting these errors:
Property setter was expecting a com.google.appinventor.components.runtime.Image component but got a String instead.
It would be awesome if you could help me with this.
I'm so sorry for answering you so late. Thank you for your time. I'm trying to learn how to use AI2 (different blocks) by creating this very simple game
The component blocks are at the bottom of the palettes of their respective components.
The purple blocks are dead text, and unresponsive to attempts to use them to influence anything.
I'm not colorblind, that was just part of my original idea. I created a list and defined each purple block as a certain picture of the digit, made them non-visible and wanted to show them only in case when they are called (when the text label has the same number as number value on the picture). And then when I tried your idea, I completely forgot to delete them and replace them by green blocks, instead I just renamed them. I'm sorry, that was a really stupid mistake.
I am sorry for bothering you again, but I ran into another problem. When I try to run the app via AI Companion, everything is going well. However, I tried to download the app and launch it on other devices to see how it will look like on screens with different resolution. Everything is running without a problem, except for showing the score. It seems that there is some problem with those pictures of digits I replaced the text label because when I launch the app that counts score only with text label, it's running without a problem and I can see the current score. Is there something I overlooked?
This sounds like a problem in implementing responsive design with images.
(I mostly use the emulator, and draw what I need myself on Canvases, so I am not expert on this. @Italo is more expert at this than me.)
Italo: the pictures of the numbers aren't even shown on other devices. And not only there. Even on the original device, where I have MIT AI2 Companion installed. When I run the project via AI2 Companion, it's running ok, but when I download the app and instal it to the mobile, app is working fine but without showing the numbers (pictures of numbers).
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
Hello, sorry for answering so late, but yesterday I didn't have time. Here are the relevant blocks. ABG helped me with this. It is perfectly working on AI2 Companion on every device, however, when I downloaded the app to the mobile manually, it still works, but it doesn't show the pictures of numbers, they supposed to show. I tried everything, but couldn't find what is behind this. I'm basically still a newbie in this area, so I'm really sorry if there is a simple solution I didn't see.
So the '//' prefix for Media image file names worked for me in the Companion, but does not work on devices? ()
Still in search of the mythical file name Rosetta Stone.