I am building an app as a Quiz in which the questions are shown randomly but the questions are subject to certain images. Below I show the sequence of blocks that I have made for the selection of questions. I need help to associate the questions to the images.
Thank you for your collaboration!!
Welcome,
Your blocks are a bit blurry and I cannot see them clearly. Right-click on the procedure, select "Download blocks as PNG", and post the image here. Thank you.
I hope now you can see them clearly. Thank you very much for your collaboration.
Hi @gordonlu310
I enclose the missing variables so you can see all the blocks that I have programmed.
Thx!!
Have you changed ListaDeCompenentes over the program, e.g. added items to ListaDeCompenentes? If you haven't, the blocks here will do nothing.
Hi @gordonlu310,
Currently the app works. Both questions and answers appear on assigned buttons. What I can't do is make the image associated with the corresponding question appear and the questions continue to appear randomly but with their corresponding image.
If your image name is HELLO.png, you cannot just use HELLO. You also have to include the file format, i.e., HELLO.png.
If you are using ai2.appinventor.mit.edu, and you do not want to type the names, you can use helper blocks (found in the blocks with Screen1).
Thanks @gordonlu310 !!
I have solved that problem but no type of image is shown to me and I don't know how to associate the question to that image either. I have the images loaded in the corresponding Screen, but no image is displayed.
If you wish post your aia here. I do not see anywhere in your code where you set images besides the global variable. When a question is choosen then you have to select from image list the corresponding image according to the index of question
Thank you very much for your contribution @dora_paz !!!
The aia file is too heavy and won't let me upload it. The problem is that I don't know how to program the blocks so that the images associated with the questions appear. I would need to know how to program the blocks so that the random questions correspond to the images.
If you wish upload it to Google Drive and post here the link
Hello,
I have managed to get the images to appear along with the questions but the problem is that the images are shown randomly as well as the questions. I don't know what programming blocks I would have to use so that the questions are displayed randomly and associated with the corresponding images, could someone help me?