Hide some sprites when screen starts or loads

Hi, My app uses up to about 30 round dot sprites in preset fixed positions when various graphics are displayed. The sprites work properly (move to the correct position and show or hide) in all cases except when the screen first loads / opens. I tried using a function
Screen Shot 2022-08-12 at 5.21.43 PM
Screen Shot 2022-08-12 at 5.22.29 PM
I moved all sprites that need to be hidden to the left upper corner in design view, see below.
Screen Shot 2022-08-12 at 5.29.25 PM
I could also make the hidden sprite heights = .01 in design mode and then resize them after loading, but was hoping for a simpler method.
Thx!

1 Like

Have you tried adding a wait 0.1 seconds before hiding them?

That’s not a bad idea but I’d try using the When Canvas Loads block instead of the When Screen Opens block.

2 Likes

Thx,
I tried adding a 1 sec wait to the main Screen2 and Screen1 with no change in result.
Screen Shot 2022-08-12 at 8.21.08 PM
Screen Shot 2022-08-12 at 8.21.32 PM

Thx, I tried When Canvas loads but no change.
Screen Shot 2022-08-12 at 8.30.37 PM

1 Like

Hmm… I’m not sure what to recommend beyond that. I’ve found the Canvas blocks to be inconsistent — not necessarily related to loading or initial placement but in terms of positioning of sprites — so I haven’t used them all that much.

2 Likes

Have you tried setting them all to invisible in the designer? Then setting them to visible when you need them? (I have no experience with Sprites)

Thx, I used that method on another platform, but in Thunkable there is no initial show / hide sprite option in designer that I can see, only in the blocks. If there is no show / hide solution that works on startup I’ll likely set opacity of the sprites in designer to 0, and then change the opacity back in the blocks.

1 Like