Discuss Scratch
- Discussion Forums
 - » Help with Scripts
 - » Background Music
        
         
- 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]
- 1234abcdcba4321
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
Background Music
when gf clickedAnd so on.
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
- 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
i cant get that to work the first music always playswhen gf clickedAnd so on.
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
- deck26
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
Background Music
Is the project shared?i cant get that to work the first music always playswhen gf clickedAnd so on.
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
- 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
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)
- Discussion Forums
 - » Help with Scripts
 - 
            » Background Music 
         







