Creating a floating animation above another one

Hi everyone !

I'm new here, I discovered the app inventor a few days ago and it's an amazing tool, I plan to make a real mini pinball machine not a virtual one, and instead to use a raseberry pi where it is necessary to add a screen, I prefer to use an android phone, everything is integrated, the control, a screen, the audio, a GPIO interface to control the hardware, and I started the most difficult part of the project which is creating animations, I was able to create animated sprites which are supposed to be the background animation of the pinball screen by the common tools without any problem, and I also created an animated score using the (phase animation made easy expansion ) and my problem is that the animated score can not float above the canvas of the background animation, and when I try that the canvas is shrink and not accept the integration of the score, so is there any solution please ?

You will probably need an extension for floating animations, unless you can achieve everything on a canvas with imageSprites and Z levels.

https://puravidaapps.com/extensions.php

Thank you TIMA12 for your answer, following your advice, I managed to superimpose two annimations with different z axis levels, but I still cannot find how to float an animated score whose result may change with the progress of the game , I am looking for an extension and if you find that it is feasible with the tools already existing in the app, I would like to know how to do it, thank you.

I seem to remember doing this a while ago, using a separate canvas (visible but off screen) to generate an image of the "score", then setting this to an imageSprite, not the best solution but something you could try.

You may have more luck with some of the extensions that can float/move/display components and arrangements on top of each other....

yes I was thinking about your solution yesterday, making a kind of variable sprites, what do you mean about (visible but off screen)?

Attached a very simple example

Two canvases and a label in a horizontal arrangement. The HA is set to be wider than the screen, the label is set to fill parent, between the two canvases. This pushes canvas2 off screen.

offscreen.aia (2.1 KB)

actually use the saveas filename block in order to overwrite, otherwise you could end up with hundreds of images, each with a score on....

image

Thanks for the blocks, if I can increase the size of the score and animate it that would be a good solution, here is the effect I want to get in addition with an animation below, it has a fixable bug you need to wait the end of the animation before trying a second time

Score test.aia (2.4 MB)

You appear to have a solution in sight :slight_smile:

Perhaps use two score displays to overcome the "bug", in order to be able to start the second one before the first has finished, and repeat...

Really ? But I still can not understand how to integrate an animation below and this is what blocks my whole project :slightly_smiling_face:

What is the issue with the animation you have in your aia project? It appears to works as intended, or perhaps I don't yet fully understand your intentions :wink:

Ah ok, I don't think I was able to explain my problem well enough, in fact I don't want the background to be fixed, I want to create another independent animation which will change depending on the game situation behind the score display.