Director Tutorials

 

Tutorial 8: Animating Celebs - Animation & Interactivity with behaviors

A behavior is prewritten Lingo script that can be attached to sprites or placed in frames of the Score to create interactivity or make objects behave in a certain way.

There are two types of behaviors:
Frame Behaviors are placed directly into a frame in the script channel in the Score.
Sprite Behaviors are attached to visual media in the sprite channels.

Director has a library palette containing a number of behaviors that can be dragged and dropped onto sprites or into frames of the Score.

1. Open celebs.dir. (Right click on the hyperlink to save the file.)

2. Extend all the sprites to start in frame 1 and end in frame 30

3. Open the Library Palette by choosing Window > Library Palette.

4. Click on the Library List button and select Animation > Automatic from the pop-up menu.
5. Click and drag the Color Cycling behavior icon onto the Julia Roberts sprite in channel 1. The parameters window appears as shown below.



6. Change the Color Cycles to -1 and leave all the other parameters as the default settings.

7. On the Control Toolbar under the stage, turn the Loop option on and rewind and play the movie.

8. In the Library Palette, click on the Library List button and select Animation > Interactive.

9. Click and drag the Turn Towards Mouse behavior icon onto the Paul Hogan sprite in channel 2. The parameters window appears as shown below.



10. Keep all the default settings in the parameter dialog box (as shown) and press OK.

11. Rewind and play the movie. Click and drag the Paul Hogan sprite.

In a later tutorial, you will see how you can apply an animated effect to an entire frame that changes from one to the next. These animated frame effects are called Transitions. Director also allows you to apply a transition to an individual sprite.

12. In the Library Palette, click on the Library List button and select Animation > Sprite Transitions.

13. Click and drag the Pixelate behavior onto the Dean Utian sprite and keep all the default settings.

Rewind and play the movie.
Experiment attaching other behaviors to the sprites. You can attach more than one behavior to a single sprite. To clear behaviors from a sprite, select the sprite, open the Property Inspector, choose the Behavior tab, then simply click and select the behavior you want to remove and press Delete. Clicking the Shuffle Down or Shuffle Up buttons changes the order by which the behaviors will be activated.

You can see the completed tutorial 8 here - tut8_fin.dir