Beginner and need help with something

Screenshot 2025-03-10 142512

I need to help with a project where if the use click on buttons (numbered 1-10 ) an image gets displayed showing the number of the objects same as the clicked button
I'm not sure how to go about this
I'm sorry if the wording is off

Here is one quick way, using a canvas that draws squares in different colours:

CanvasDrawSquaresCount.aia (2.8 KB)

Something like this?

1 Like

yeah i think so this is the as close as it can get I'm sorry if this is to much trouble but can you explain what blocks where used ? also is there a way to do this for different pictures ?

I'm sorry but i dont think this is it, it as to be a picture but thank you

Yes. :thinking:

  • You can use a different image for each image control.

  • you could have several images; one with one thing in it; another with 2 items in it; another with three and so on. Then select only the image with one thing when you use the Image1 and select a image with two things. Do you have example pictures?

What you do depends on providing a more detailed description of what you would like to happen.

Both ways to code (using single png or multiple pngs with different images) are shown in the example
numberOfObjects2.aia (14.3 KB)

There aaaaaaare an unbelievable numbers of ways this could be coded. :thinking:

1 Like

@Lian If total items are 10 then do this way-

Step-1: Upload all 10 images in asset of your app with names 1.png, 2.png, 3.png upto 10.png

Step-2: In Designer part- 10 buttons & 1 image (you already did this)

Step-3:

1 Like

I understand now thank you so much

1 Like

thank you so much i think i understand now how to do this and add on to it have good day

1 Like

I'm sorry to bother you again, but i cant find the when any button is clicked and my teacher want us to use variables something like this

image

You will find the green "getter" and "setter" anyButton properties in the same location

or you can simply right click on a button click event block in the blocks editor and select Make Generic

image

1 Like

Correct!