Clickable image not working

Hello everyone,
in practice by clicking on an image; it should close screen 1 and open screen 4; but instead exits the app :upside_down_face:
blocks
Saluti
Nicola

Have you ticked "clickable" in the designer ?

What happens if you replace the image with a button ?

@TIMAI2 I ticked clickable and also tried replacing the image with a button; but the resulting image is scaled down.

But does the app still close if you use a button instead of an image ?

(trying to find out if the problem is with the image event or the code within it!)

I have had similar issues when I open another screen in the Companion, it closes the Companion instead.

Try building it as an APK and install it.

I created the APK but the app still closes after clicking on the image

Post the aia (or better a small test aia that reproduces the problem).
I'm pretty sure there must be another reason for this.

The strange thing is that in the test yard; clicking on the image; successfully switch to screen2. Instead in my farmyard, by clicking on the image; I'm going to load screen 2..where there are more than 7000 blocks..do you think this could cause the app to close?

Yes :slight_smile:

Disable the Screen2.Initialize event block and try again.
Do you load (big) images on Screen2 (in the Designer)?

In the end I fixed it by simply setting a Timer to 5000ms; and after the time has elapsed; managed to switch to scree2 correctly. (Obviously making the image unclickable)

blocks2

Please show the blocks so everyone can learn how you solved it.

I don't see why that should change anything. :woman_shrugging:

grafik

what about set the timer interval a smaller one, like 100?

Same question:

In other words, what's the difference if I switch to another screen by clicking a button or an image or if I do it via a timer?

At least when the delay is actually not desired.

at least the end user will not feel the delay.

Indeed a 5000ms interval is slightly exaggerated :wink: so I opted for 1000ms; so that all 7000 blocks in screen2 can be loaded. And then the image that I posed; it is also very detailed; then the end user; will appreciate the delay.

To what extent should the timer (with whatever timer interval) provide more (enough) time for loading Screen2 :question: :woman_shrugging:

@Nicola_Imperati Please send me the aia via PM.
I would love to check it out and see it with "my own eyes"! :wink: