Failed in ball of canvas

I set the coordinates of the canvas balls to position themselves according to the proportion of the canvas

using this procedure:
Opera Instantâneo_2020-01-09_183001_creator.kodular.io

when i use a test app that has only the screen it works the way i want:
Opera Instantâneo_2020-01-09_183204_creator.kodular.io

ads_Screenshot_2020.01.09_18.28.25.jpg

but when I use it on the real screen of the app it doesn’t work
Does the order of canvas x and y procedures influence functionality?
note: the procedure is the same in both apps:
Opera Instantâneo_2020-01-09_182843_creator.kodular.io
when it boots:
Alocar_Screenshot_2020.01.09_18.27.55.jpg
when i click to move to next image:
Alocar_Screenshot_2020.01.09_18.27.06.jpg

was supposed to come out just like the test
someone help me ;-;

This is probably the well known issue with the canvas getting its own sweet time to get its own information when the apps initialize.
Is like it’s too soon to ask a canvas how wide and tall it is when the app initializes, because it will tell you something wrong. You need to give it some time to have that information. What everyone does is to enable a clock in the Screen1.Initialize event. This clock can be something like a quarter of a second (250 ms).
When the Clock.Timer event triggers, then you position the balls.
Try it, I’m pretty sure, that’s the problem here.

3 Likes

Something like this
image

1 Like

wow
you’re the man
thanks :,)

1 Like

If it helped, please mark the answer as the solution. Thanks.

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