Microsoft MakeCode

Sound and light animation at the same time

Hello… can anyone help me fix this up so the melody plays at the same time as the light animation please… at the moment they run one after the other… thanks Mike

ss

Maybe you can make each a function, then call them in the A button pressed.

That would be useless.

Oh… works for me sometimes.

How would you do it?

Really?

I don’t know, I just tried it and It doesn’t work anymore. My logic is that is calls one, and then moves on while the function is running.

In arcade, I would use darzu’s timer extension


But IDK if that would work in the OPs situation

I agree. This block?
image

1 Like

It looks like you want the run in parallel block from the control category - the issue is that both of these blocks pause so you can place multiple in a row to build larger animations / songs.

The block is here:

And you would use it like this:

This will cause the two actions to run without blocking eachother

1 Like

Thanks @jwunderl looks good but has unexpected results… I tried the way you suggested but the parallel blocks run later code in parallel too:

I also tried both actions in the same block which also ran later code at the same time:

I suspect the parallel block is the answer, I’ll read up on it’s use… Mike