Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

Transcript

Many games play music in the background to set the mood and make the game more entertaining.

Yours can, too! While you can program music to play for a specific sprite, it’s usually a good idea to program the music on the stage. To do this, click on the stage. The music should start when the green flag is clicked, and keep playing forever. Scratch comes with a lot of sounds that sound good when they’re played over and over. These types of sounds are called “music loops.”

To choose a music loop for your project, click on the sound tab, “add sound from library,” then the Music Loops Menu. Test sounds by pressing the play button, so you can find the sound that works best for your program.

You’ve now added a music loop to your program, but you still need to program it to play.

Click on sound, and find the “play sound” blocks.

Adding “play sound” to your block stack will tell the computer to move on to the next instruction in the stack after it starts to play a sound. That means your sound can be interrupted by other sounds, and won’t work well when repeated because it never finishes playing.

Instead, add a “play sound until done” block inside a forever loop. This now reads: You can now test it to make sure your code does what you want.

Great! The music loop is playing in the background forever.

Choisir une extension
L'heure de faire la fête !
Crée une célébration de victoire de folie en utilisant certaines de ces idées.
Plates-formes en mouvement
Rends ton jeu plus difficile en créant des plates-formes qui bougent.
Plates-formes qui rétrécissent
Crée une plate-forme qui rétrécit pour augmenter la difficulté de ton jeu.
Plouf ! Tu as perdu
Crée une condition pour que le joueur perde à ton jeu.
Ajoute de la musique
Ajoute un fond sonore à ton jeu.
Résolution du bug : Atterris sur tes pieds... ou pas
Corrige le bug qui permet à d'autres choses que les pieds d'un lutin de rester sur une plate-forme.
arrow_backward Retour
Suivant arrow_forward
Instructions
  1. Choisis une extension, et clique sur "Regarder" pour découvrir comment personnaliser ton projet.
  2. Quand tu as fini, reviens à la page des extensions et essaies-en une autre !