Discuss Scratch

sofeeuh
New to Scratch
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 to Scratch
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.

I'd highly appreciate it if you were to follow me. Don't forget to go to my profile.
All of my programming suggestions <— You should really get the suggestions move back to the suggestions forum!
Five hundred posts! I never expected to get up there… In only 2-3 months.
Does anyone know what a signature is? I mean, I've already seen 6-7 people get confused.
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)


epictree160,the future is now
oh,why hello there! im epictree160 i mostly make games and operating systems! also i love making new friends and meeting new people!
checkout the thunder operating system! https://scratch.mit.edu/projects/117159330/
when I receive [ make the future]    
forever
think [[The future] ] for (2) secs
broadcast [ Imagine,create,share]
end
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

when green flag clicked
say [STAY AWESOME AND SCRATCH ON!!!!!!]
DEATH_BY_AWESOME;)
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)


RAYTHORNCLAW

Powered by DjangoBB

Standard | Mobile