O'Reilly logo

Alice 3 Cookbook by Vanesa S. Olsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Playing background music

In this recipe, we will learn to play background music while the code in the run method is executed. We will add many statements that will play music while Alice executes other statements.

Getting ready

We need an MP3 file to use as the background music for this task. In addition, make sure that you read the previous recipe, Checking the procedures and functions for each instance. You can also use a WAV file as the background sound. In fact, if you face problems when trying to play the MP3 file, try a WAV file. Alice has some incompatibilities with certain MP3 files.

  1. Open an existing project based on one of the six predefined Alice templates. You can open the MyPurplePlanet project saved in the Working with templates to create ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required