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

Dressing a person

In this recipe, we will change a girl's outfit when the user clicks on the desired costume. We will add five girls with different outfits. Then we will define mouse button listeners for four girls and we will add the necessary code to change the value of a property for one of the girls to copy the outfit of the clicked girl.

Getting ready

Follow these steps to create a new project and display the Model Gallery:

  1. Select File | New... in the main menu to start a new project. A dialog box will display the six predefined templates with their thumbnail previews in the Templates tab.
  2. Select GrassyProject.a3p as the desired template for the new project and click OK. Alice will display a grassy ground with a light blue sky.
  3. Click on Edit ...

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