sofeeuh

I'm trying to figure out how to change the background music in the project I'm working on so that when it goes to a different stage/background, the music will change. I've tried several different scripts but either the music doesn't play in the first place or I have to wait until the music finishes playing until it changes to the second music. Any ideas on how to have the music change smoothly?

karmanhof

hi, when you need to play another music use:
stop all sounds
play sound [another music v]

sofeeuh

I tried it but the first music won't play

1234abcdcba4321

when gf clicked
stop all sounds
repeat until <(backdrop name) = [backdrop of second music]>
play sound [first music v] until done
end
when backdrop switches to [backdrop of second music v]
stop all sounds
repeat until <(backdrop name) = [backdrop of third music]>
play sound [second music v] until done
end
And so on.

epictree160

when backdrop switches to [ v]
stop all sounds
wait () secs
play sound [ v]

gamer_64

1234abcdcba4321 wrote:

when gf clicked
stop all sounds
repeat until <(backdrop name) = [backdrop of second music]>
play sound [first music v] until done
end
when backdrop switches to [backdrop of second music v]
stop all sounds
repeat until <(backdrop name) = [backdrop of third music]>
play sound [second music v] until done
end
And so on.
i cant get that to work the first music always plays

deck26

gamer_64 wrote:

1234abcdcba4321 wrote:

when gf clicked
stop all sounds
repeat until <(backdrop name) = [backdrop of second music]>
play sound [first music v] until done
end
when backdrop switches to [backdrop of second music v]
stop all sounds
repeat until <(backdrop name) = [backdrop of third music]>
play sound [second music v] until done
end
And so on.
i cant get that to work the first music always plays
Is the project shared?

DEATH_BY_AWESOME

when backdrop switches to [(any backdrop) v]
play sound [(any song v] until done

Raythornclaw

sofeeuh wrote:

I'm trying to figure out how to change the background music in the project I'm working on so that when it goes to a different stage/background, the music will change. I've tried several different scripts but either the music doesn't play in the first place or I have to wait until the music finishes playing until it changes to the second music. Any ideas on how to have the music change smoothly?
make a
when green flag clicked
forever

set [background v] to [ (backdrop #) ]
play sound [(backdrop #) v] until done
if <not <(backdrop #) = [ (background) ]>> then

stop all sounds
end

end