Tengo un proyecto con animales, en pantalla están en B y N, cuando se pulsan cambian a color y se reproduce un sonido, cuando se termine de reproducir el sonido debe volver el botón a
B y N, pero solo vuelve cuando pulso otro botón
Tengo un proyecto con animales, en pantalla están en B y N, cuando se pulsan cambian a color y se reproduce un sonido, cuando se termine de reproducir el sonido debe volver el botón a
B y N, pero solo vuelve cuando pulso otro botón
Your description does not contain enough information to see what is wrong.
Please upload a screenshot of your blocks (click on an empty space in your blocks editor with your right mouse button and choose download blocks as image).
Cheers, Ghica
The exercise consists in that when you click on an image of an animal that is in BYN, it turns into color and at the same time the sound of said animal sounds, when the sound stops sounding, the image must go back to B and N alone. But with this arrangement of the blocks, when the sound stops playing it stays in color and turns to B and N when I press the image of another animal.
Hi Aprietonu
Your code is very nearly there. Since we do not know when the sound ends, we must end it. This can be done with a timer:
OnSoundStop.aia (1.3 MB)
Hi,
As an alternative to the suggestion of Chris, you could use the Player component instead of the Sound component, because the Player component has a completion event which you can use to make the picture black and white again.
I adapted Chris’ example to use the Player. Somehow you should maybe also use a timer to have a maximum sound duration. The frog sound of Chris never stops it seems.
Nice example and pictures, Chris!
OnSoundStop_wPlayer.aia (1.3 MB)
Gracias, voy a probar las soluciones.