Discuss Scratch

sofeeuh
New Scratcher
4 posts

Background Music

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
Scratcher
41 posts

Background Music

hi, when you need to play another music use:
stop all sounds
play sound [another music v]
sofeeuh
New Scratcher
4 posts

Background Music

I tried it but the first music won't play
1234abcdcba4321
Scratcher
1000+ posts

Background Music

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
Scratcher
6 posts

Background Music

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

Last edited by epictree160 (April 22, 2015 18:29:10)

gamer_64
Scratcher
1 post

Background Music

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
Scratcher
1000+ posts

Background Music

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
Scratcher
24 posts

Background Music

when backdrop switches to [(any backdrop) v]
play sound [(any song v] until done
Raythornclaw
Scratcher
16 posts

Background Music

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

Last edited by Raythornclaw (Feb. 25, 2016 18:44:14)

Powered by DjangoBB