Showing an image for each letter entered in a textbox

Hello everyone,
I recently joined the MIT App Inventor community and I am trying to make a program which would let you enter a word or a sentence in a TextBox and then display an image for 3 seconds for each specific character in that word, for example I would assign the letter "a" an image "A.png", letter "b" "B.png" and so on and when I enter the word "hi" in the TextBox, it would display the image "H.png" for 3 seconds and then the image "I.png" for 3 seconds.

This is the coding I've done so far(I only assigned a, b and c an image because I want them to start working before I add the other letters):

The issue is that instead of displaying images one by one, the program just skips to the last letter of the word in the TextBox.

Please keep in mind that I'm completely new to MIT App Inventor and not even a month has passed since I started using this program.
Any kind of help is much appreciated as I've been stuck on this problem for 3 days and I need to get it done with as soon as possible. Thanks in advance.

For delay/waiting, you need a Clock component, use it's Timer event.

Dear @LexoLux,
in addition to what has said @Kevinkun, please be aware that your Delay doesn't wait:
image
The do while has to be changed in "<" otherwise it exits immediately.
Give it a look.

I already tried that, but instead of showing the pictures, my app freezes for the amount I seconds I told it to show the pictures and then unfreezes back on the last letter.

You mean like this?

you can not use While test.
Try something like this:

Don't try to use a delay like that, they invariably either do not work or cause problems

Use the clock timer event, and run actions there

1 Like

For some reason, when I try this it just doesn't display any images

designer view, un-tick the TimerEnabled.
image

and make sure the image name is right.

It worked, but after it's done it just crashes, could it be that the picture format is.jpeg instead of .jpg?

Dear @LexoLux,
what you can find annexed is a bit different, always based upon clock events, as per @Kevinkun and @TIMAI2 hints, but you can elaborate it to get your needs. (it works with .jpeg's)
showimage.aia (88.8 KB)

Thank you all for helping me solve this problem. Also I apologize for the late reply, but I was busy so I couldn't reply earlier. I ended up going with Kevin's solution as I found it a little easier because other solutions eventually brought me up to the same problem, but I still appreciate all the help I received.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.