Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Classroom in a Book ®
www.adobe.com/adobepress
LM_02.book Page 2 Thursday, May 23, 2002 10:05 AM
9 8 7 6 5 4 3 2 1
LM_02.book Page iii Thursday, May 23, 2002 10:05 AM
iii
Contents
Getting Started About Classroom in a Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
Installing the program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
Installing the Classroom in a Book fonts . . . . . . . . . . . . . . . . . .2
Copying the Classroom in a Book files . . . . . . . . . . . . . . . . . . . .3
Additional resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Adobe Certification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
iv CONTENTS
vi CONTENTS
vii
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
LM_02.book Page viii Thursday, May 23, 2002 10:05 AM
LM_02.book Page 1 Thursday, May 23, 2002 10:05 AM
Getting Started
Welcome to Adobe® LiveMotion™ 2.0 — the future of animation and interactivity for
the Web. LiveMotion is an extremely capable design and production tool that offers
unparalleled precision, control, and seamless integration with Adobe’s professional
Web applications, including Adobe Photoshop®, Adobe Illustrator®, and Adobe GoLive™.
Import your layered Photoshop and Illustrator files as discreet objects, or as frames in
your animations. LiveMotion lets you easily create rollovers, animated masks, and multi-
character compositions including sound and advanced interactivity. When you’re done,
you can save your work in the Macromedia® Flash™ (SWF), QuickTime®, JPEG, animated
GIF, and PNG formats. Then place your file in Adobe GoLive, and publish it on the Web.
Prerequisites
Before using Adobe LiveMotion 2.0 Classroom in a Book, you should have a working
knowledge of your computer and its operating system. Make sure you know how to use
the mouse and standard menus and commands, and also how to open, save, and close
files. If you need to review these techniques, see the printed or online documentation
included with your Windows® or Mac OS documentation.
LM_02.book Page 2 Thursday, May 23, 2002 10:05 AM
2
Getting Started
4
Getting Started
Additional resources
Adobe LiveMotion 2.0 Classroom in a Book is not meant to replace documentation that
comes with the program. Only the commands and options used in the lessons are
explained in this book. For comprehensive information about program features, refer
to these resources:
• The Adobe LiveMotion 2.0 User Guide. Included with the Adobe LiveMotion 2.0
software, this guide contains a complete description of all features.
• The Adobe LiveMotion 2.0 Scripting Guide. Also included with the Adobe LiveMotion
2.0 software, this guide provides details on LiveMotion 2.0’s scripting capabilities.
• The LiveMotion Video Quick Start Guide, available on the application CD.
•Online Help, an online version of the User Guide, which you can view by choosing
Help > Contents. (For more information, see Lesson 1, “Getting to Know the Work Area.”)
•The Adobe Web site (www.adobe.com), which you can view by choosing Help > Adobe
Online if you have a connection to the World Wide Web.
Adobe Certification
The Adobe Training and Certification Programs are designed to help Adobe customers
improve and promote their product proficiency skills. The Adobe Certified Expert (ACE)
program is designed to recognize the high-level skills of expert users. Adobe Certified
Training Providers (ACTP) use only Adobe Certified Experts to teach Adobe software
classes. Available in either ACTP classrooms or on site, the ACE program is the best way
to master Adobe products. For Adobe Certified Training Programs information, visit the
Partnering with Adobe Web site at http://partners.adobe.com.
LM_02.book Page 7 Thursday, May 23, 2002 10:05 AM
8 LESSON 1
Getting to Know the Work Area
Getting started
In this lesson, you’ll learn how to do the following:
• Open and save a file.
• Select objects.
• Move objects.
• Use and rearrange palettes.
• Preview compositions.
• Use online Help.
This lesson takes approximately 30 minutes to complete.
This lesson will get you started in LiveMotion by showing you around the work area.
You’ll explore the menus and palettes, the viewing features, and the basics of getting a
file started.
Your very first tasks in LiveMotion will be to open LiveMotion, open a file, and reset
the preferences.
Opening LiveMotion
To get started exploring, you’ll open LiveMotion.
1 Navigate to the location where you’ve installed LiveMotion, and open the
LiveMotion folder.
2 Choose Programs > Adobe LiveMotion from your system Start menu (Windows),
or double-click the LiveMotion icon (Mac OS) to start the program.
LM_02.book Page 9 Thursday, May 23, 2002 10:05 AM
Opening a file
Now you’ve opened LiveMotion, but you do not yet have a file to work with. Next you’ll
open a file and save it to your desktop. This is the file you’ll use for the rest of the lesson.
Choose File > Open and open the 01Start.liv file from the Lessons/Lesson01 folder.
As you work on this lesson, you’ll overwrite the start file. If you need to restore the start
file, copy it from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For more information,
see “Copying the Classroom in a Book files” on page 3.
Resetting preferences
Preferences help LiveMotion remember how you like the program to look and behave.
When you install LiveMotion, some default preferences are included. As you work, the
preferences change. You’ll remove these new preferences so that LiveMotion looks and
acts exactly as described in this lesson.
Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
LM_02.book Page 10 Thursday, May 23, 2002 10:05 AM
10 LESSON 1
Getting to Know the Work Area
1 Select a tool by clicking on its icon in the toolbox. The selected tool icon is depressed
in the toolbox.
Notice that if you leave the pointer over a tool icon, a small box appears showing the name
of the tool and its keyboard shortcut.
2 Select a new tool by pressing its keyboard shortcut. The Toolbox keyboard shortcuts
use just the letter keys (without any modifiers, such as Alt, Command, Shift, or Option).
Next you’ll use the selection tool to select an object.
3 Select the selection tool ( ) from the toolbox.
The Composition window is the area within the main LiveMotion window that contains
the white drawing area, or canvas.
LM_02.book Page 11 Thursday, May 23, 2002 10:05 AM
4 In the Composition window, click various objects. You can see a blue outline appear
around selected objects. To select more than one object at a time, hold the Shift key while
you click.
Once an object is selected, you can resize, move, and edit it using the tools and palettes.
12 LESSON 1
Getting to Know the Work Area
3 Make the window bigger and notice that a gray area appears around the canvas.
The canvas becomes the visible area of your composition when it is exported. You can
draw and store objects in the gray area outside the canvas, although they will not be visible
until they are on the canvas. This is useful if you want to bring objects in from off-screen
during animations, or keep them to the side for later use.
To see objects that are positioned outside the edge of the canvas, choose View > Objects
Off Canvas. This option shows just the outlines of objects.
4 Choose View > Zoom In, and notice how the Composition window changes. The title
bar of the Composition menu displays the current magnification level, changing from
01Start.liv @ 100% to 01Start.liv @ 200%.
5 Choose View > Zoom Out to return to the original composition size.
6 In the toolbox, select the zoom tool ( ). Click in the Composition window twice
to expand the view to 300%.
LM_02.book Page 13 Thursday, May 23, 2002 10:05 AM
7 Select the hand tool ( ) from the toolbox. Drag to move the composition in the
Composition window.
2 Enter 450 for Width and 200 for Height. This will change your canvas size to 450 pixels
by 200 pixels.
LM_02.book Page 14 Thursday, May 23, 2002 10:05 AM
14 LESSON 1
Getting to Know the Work Area
3 Click the Frame Rate menu to see the frame rate options. This controls how quickly
your animations play. You will not be animating anything in this lesson, so you can keep
the default rate.
4 Click OK. You can see that your composition’s canvas has enlarged to show more of
the composition.
3 Choose View > Snap to Grid. This feature ensures that your objects line up along
the grid.
4 Select the selection tool ( ) and select one of the squares in the upper left of the
composition.
LM_02.book Page 15 Thursday, May 23, 2002 10:05 AM
5 Drag the square in the Composition window. Notice that the square jumps to the
nearest grid line.
6 Choose View > Snap to Grid again to deselect it. Try moving the square again and
notice how its behavior changes. The square will not jump to the nearest grid line.
7 Choose Edit > Preferences, and change the Grid settings. Enter 40 in the Gridlines
every text box and 10 in the Subdivisions text box. Click OK and notice that the
grid becomes larger.
16 LESSON 1
Getting to Know the Work Area
11 Drag from the ruler on the left-hand side of the Composition window to pull out a
horizontal guide.
12 Drag the guides back off the sides of the Composition window to remove them.
• To rearrange or separate a palette group, drag a palette’s tab. Dragging a palette outside
of an existing group creates a new group.
• To move a palette to another group, drag the palette’s tab to that group.
• To display a palette menu, click the triangle in the upper right corner of the palette.
• Palettes that can be resized may have three ridges (Windows, except NT and 2000), or
two rectangles (Mac OS), in their lower right corners. To change the height of a resizable
palette, position the cursor over the palette’s lower right corner and drag.
18 LESSON 1
Getting to Know the Work Area
3 Enter new values into the R, G, and B text boxes until you have a new color you like.
When you enter a value into a text box, you must press Enter (Windows) or Return (Mac
OS), or select another text box, for the change to take effect. While following the lessons
in this book, be sure to use one of these techniques to enter values when you are asked to
enter a value into a text box.
Next, you’ll change the color using the sliders.
4 Adjust that color by dragging the sliders underneath the color bars. Notice that the
values in the text boxes change as you drag the sliders.
5 In the toolbox, select the background color box.
6 In the Color palette, position the pointer over the color bar at the bottom of the palette.
Notice that the pointer turns into the eyedropper tool.
7 Click the eyedropper tool over a color. The composition background changes to
the color.
8 In a different palette, you might use the pointer to move arrows up and down, or select
options represented by a number of icons.
Finally, you’ll use the pointer to select an option (in this case, a color) from the palette.
LM_02.book Page 19 Thursday, May 23, 2002 10:05 AM
Previewing in LiveMotion
You can preview your compositions within LiveMotion to get an idea of how they will
look when exported, and what your file size will be.
The Preview mode replicates the way your composition will look and act when it is
exported; the palettes disappear, and you can see a cursor move and text appear.
1 Click the Preview mode button ( ) in the toolbox.
2 Click the Edit mode button ( ) in the toolbox to leave Preview mode.
3 Choose View > Preview Export Compression.
4 Select the front saucer in the composition. Notice that the bounding box is red; this
indicates that you are in Preview Export Compression mode.
The status bar is located at the bottom left of the active window (or program window in
Windows NT and 2000). The status bar displays important information about the objects
in your composition, such as file size and object type.
5 Look at the status bar. The number on the left is the file size of your composition. The
number on the right shows the size of the selected object.
The status bar shows to what format the saucer will be exported; in this case it is a bitmap
object ( ). Objects can also be exported as vector objects ( ). If you have more than one
object selected, the status bar will indicate if the objects will be exported as vectors,
bitmaps, or a combination of both.
6 Choose View > Preview Export Compression to exit Preview Export Compression
mode. Click anywhere in the background to deselect any selected objects.
LM_02.book Page 20 Thursday, May 23, 2002 10:05 AM
20 LESSON 1
Getting to Know the Work Area
Previewing in a browser
Now you’ve tried the Preview mode, but there is another way to preview your work from
LiveMotion. You can also look at your work in the browser of your choice. This shows you
exactly how your composition will look when it is completed and viewed online.
1 Choose File > Preview In > Netscape Navigator / Internet Explorer. (Select a browser.)
2 View your composition in the browser.
3 Quit the browser.
24 LESSON 2
Drawing Basic Shapes
Getting started
In this lesson, you’ll learn how to do the following:
• Create shapes and layers.
• Create text objects.
• Add effects and textures to shapes.
• Change the size, color, and opacity of shapes.
• Use various combine commands.
This lesson takes approximately 45 minutes to complete.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson02
folder onto it.
Note: Windows users need to unlock the lesson files before using them. For more information,
see “Copying the Classroom in a Book files” on page 3.
You’ll begin this lesson by using LiveMotion to view a copy of the finished composition.
1 In Adobe LiveMotion, choose File > Open and open the 02End.liv file from the
Lessons/Lesson02 folder.
A logo made of a globe and a house shape is displayed.
ADOBE LIVEMOTION 25
Classroom in a Book
You can open the file 02End.liv at any time during the lesson to check your progress
against the finished LiveMotion version of the file.
3 Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
It may be helpful to turn on the rulers and grid during this lesson, to be able to line up
objects more easily.
Creating a shape
The first part of the logo is a circle with a globe on top of it. To make the circle, you will
create a simple shape, change it, and add color and different effects.
26 LESSON 2
Drawing Basic Shapes
4 Choose Window > Color, or click the palette’s tab to display the Color palette. You can
choose a green for the square by selecting a color from the palette with the eyedropper
tool, or by dragging the sliders. If you want to use the same color we’ve used in this
example, choose RGB View from the Color palette menu, and enter an R value of 140, a
G value of 245, and a B value of 80.
LM_02.book Page 27 Thursday, May 23, 2002 10:05 AM
ADOBE LIVEMOTION 27
Classroom in a Book
The 3D palette lets you apply 3D effects to your objects, and adjust the effects.
5 Choose Window > 3D, or click the palette’s tab to display the 3D palette. Choose
Emboss from the menu to make your square look like it’s raised slightly from the canvas.
Keep the default values of 1 for Depth and 1 for Softness.
You can add other interesting effects to your objects using the Distort palette. To open the
Distort palette, choose Window > Distort.
6 Choose Window > Properties, or click the palette’s tab to display the Properties palette.
7 Choose Ellipse from the menu to turn the square into a circle. This feature is useful for
modifying shapes even after you have made changes to them.
28 LESSON 2
Drawing Basic Shapes
ADOBE LIVEMOTION 29
Classroom in a Book
3 Make sure the second layer is selected in the Object Layers palette; then go to the color
palette and change the layer’s color to gray. The gray we used has R, G, and B values of 150.
4 Choose Window > Layer, or click the palette’s tab to display the Layer palette.
Change the layer’s width to 6 using the slider or text box.
You will see the edge of the second layer emerge from behind the first.
Currently, both layers have 100% opacity, which means they are completely opaque.
LM_02.book Page 30 Thursday, May 23, 2002 10:05 AM
30 LESSON 2
Drawing Basic Shapes
5 Choose Window > Opacity, or click the palette’s tab to display the Opacity palette.
Change the Object Layer Opacity to 75 to make the second layer more transparent.
6 Click the New Layer button in the Object Layers palette to add a third layer to the
object. With Layer 3 still selected in the Object Layers palette, go to the Layer palette and
enter 10 for the width of the third layer.
7 Choose Window > Textures or click the palette’s tab to display the Textures palette.
Textures are repeated patterns that can be used in LiveMotion compositions as
backgrounds or fills. The Textures palette provides a range of textures. In the next step,
you will add a new texture (from the Lesson02 folder) to the palette.
8 Select New Texture from the bottom right of the Textures palette. In the Open
dialog box, navigate to the Lesson02 folder. At Files of type, select GIF, then select
realbadreception and click Open. At the Name dialog box, click OK.
9 Select Name View from the palette menu at the top right of the Textures palette.
Click the realbadreception texture, and click the Apply Texture button to apply the
texture to the third layer. You can also apply a texture by double-clicking the texture in
the Texture palette.
LM_02.book Page 31 Thursday, May 23, 2002 10:05 AM
ADOBE LIVEMOTION 31
Classroom in a Book
Object layers
Layers in LiveMotion are parts of individual objects, not the entire
composition. An object is made up of 1 to 99 layers, with each layer the
shape of that object.
When you first create an object, it has just a single layer. You can then
add, delete, reorder, and offset object layers at any time. For example, a
layer can be added to an object, and then offset to simulate a shadow for
the object.
Attributes can be applied to any layer individually. Attributes include
color, opacity, gradients, and 3D and distortion effects. You can even
apply an image to texturize a layer.
By applying different attributes to each layer, you can create a variety
of effects and create complex objects. For example, to create a button out
of a simple geometric object, you might give it three layers, and apply
different effects to each layer. You could emboss the top layer and fill it
with a texture. You could make the second layer wider and fill it with a
color to give the effect of an outline around the button. And you could
offset the third layer, and fill it with semitransparent gray to simulate a
shadow for the button.
Object layers can also be animated just like any other object attribute.
You can make layers grow, disappear, and change over time in
an animation.
Adding an outline
Any shape you make can have a fill or just an outline. A filled object is solid.
It can be filled with a color, an image, or a texture. An outlined object is transparent,
except for a strip of color, image, or texture that defines its shape. To emphasize the globe,
you will add a simple black outline around it.
LM_02.book Page 32 Thursday, May 23, 2002 10:05 AM
32 LESSON 2
Drawing Basic Shapes
1 Select the ellipse tool ( ) from the toolbox, and drag to create an ellipse.
2 In the Transform palette, enter 144 in the width ( ) and height ( ) text boxes to make
a circle of the same size as the globe.
3 With the new circle still selected, select Outline in the Properties palette.
4 Enter 8 for the width of the outline. The width is measured in quarter-pixels to allow
for very fine lines, so your line will be 2 pixels wide.
LM_02.book Page 33 Thursday, May 23, 2002 10:05 AM
ADOBE LIVEMOTION 33
Classroom in a Book
34 LESSON 2
Drawing Basic Shapes
You’ve finished making the first part of the logo. Next, you’ll create the house shape that
completes it.
You can also create a filled object that is the size you want the final object to
be, then another one that is slightly smaller. Arrange the smaller object on top of the
larger one so that it becomes the fill, then choose Object > Combine > Unite with
Color to combine the two objects into one.
Objects with more than one layer, and objects that are combined using a Combine
command, are exported as bitmaps. You can create a stroke and fill effect but
have your objects export as vector objects. To do this, create a solid object and an
outline object, and choose Object > Group to create the stroke and
fill effect.
ADOBE LIVEMOTION 35
Classroom in a Book
2 In the Transform palette, enter a width ( ) of 125 and a height ( ) of 115 for the
rectangle. In the Properties palette, select Fill to make the rectangle solid.
3 Select the polygon tool, and draw a triangle in the Composition window. Set the Sides
to 3 with the Properties palette. Select the selection tool ( ).
4 Once the triangle is drawn, select Path from the dropdown menu in the Properties
palette. This will convert the object from a polygon into a path, so that the object’s
bounding box more accurately follows the object’s dimensions.
In the Transform palette, increase the size of the arrow to a width ( ) of 78 and a
height ( ) of 190. Enter 90 into the Rotation field. This will rotate the arrow counter-
clockwise by 90 degrees. (Note that the width and height dimensions reflect the object’s
original orientation.)
5 Drag the triangle on top of the rectangle so that it makes a roof above the rectangle.
LM_02.book Page 36 Thursday, May 23, 2002 10:05 AM
36 LESSON 2
Drawing Basic Shapes
6 Select both objects, and choose Object > Combine > Unite. Just like the globe and the
circle, the two shapes are now a single shape.
3 Choose a new color for the window from the Color palette, so you can see the window
as you position it.
4 Select the selection tool ( ). Place the square in the upper left corner of the house.
5 Shift-click to select the square and the house, and choose Object > Combine >
Minus Front.
LM_02.book Page 37 Thursday, May 23, 2002 10:05 AM
ADOBE LIVEMOTION 37
Classroom in a Book
This action combines the two objects into a new one and makes an empty space in the
new object where the top object was. In this case, it creates a small open area where the
square was, causing a window effect. You can see through this space to the area beneath.
Now you’ll practice a different way of selecting color while changing the color of the
house. The eyedropper tool lets you select a color from anywhere in LiveMotion, and even
on your screen outside of LiveMotion, and apply it to a selected object.
6 With the house still selected, select the eyedropper tool ( ).
7 In the Composition window, click the globe’s gray border (second layer) with the
eyedropper. The house will turn the same color gray as the layer.
8 In the 3D palette, choose Cutout from the menu. Enter 5 for Depth and 7
for Softness.
9 Choose File > Save.
LM_02.book Page 38 Thursday, May 23, 2002 10:05 AM
38 LESSON 2
Drawing Basic Shapes
ADOBE LIVEMOTION 39
Classroom in a Book
44 LESSON 3
Working with Type
Getting started
In this lesson, you’ll learn how to do the following:
• Use the type tool.
• Create, save, and apply a style.
• Break apart text.
• Create a group mask.
• Edit text.
• Change the alignment of text.
• Use the Combine commands.
• Use Edit Original.
This lesson takes approximately 60 minutes to complete.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson03
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For more information,
see “Copying the Classroom in a Book files” on page 3.
You’ll begin this lesson by using your Web browser to view a copy of the finished
composition.
1 Start a Web browser, such as Netscape Communicator or Microsoft Internet Explorer.
2 Use the browser to open the file 03End.html from the Lessons/Lesson03 folder.
LM_02.book Page 45 Thursday, May 23, 2002 10:05 AM
The end file shows what you will create in this lesson. It is a flyer for a club called
WAREHOUSE. Both text and photographs are incorporated into its design.
You can open the file 03End.liv at any time during the lesson to check your progress
against the finished LiveMotion version of the file.
3 Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
The start file includes partial art for the flyer: two background photographs stacked on
top of each other, and a smaller photograph in the upper right corner of the composition.
LM_02.book Page 46 Thursday, May 23, 2002 10:05 AM
46 LESSON 3
Working with Type
The Timeline lists all of the objects in a composition. Choose Timeline >
Timeline/Composition Window to display the Timeline.
2 Set the insertion point at the far left of the composition by clicking the pointer.
Wherever you begin typing with the type tool becomes the starting point for your text.
You can always reposition text once it’s created.
3 Select a font that’s easy to read from the Properties palette (we used Myriad Bold),
choose a font size of 60 from the Size menu, and type WAREHOUSE.
LM_02.book Page 47 Thursday, May 23, 2002 10:05 AM
4 Choose the selection tool ( ), and move the text so that it is directly below the lighter
colored warehouse picture on the right side of the composition.
48 LESSON 3
Working with Type
Creating a style
You’ll add layers to the text and then modify those layers to create your new style. You’ll
modify an object using several methods that you learned in the previous lessons,
including changing color and opacity.
1 Select the type tool ( ) and click in the bottom left corner of the composition.
Notice that Properties palette displays the specifications of the last text you typed.
2 Set the point size to 18 with the Properties palette, and type ambient.
3 Choose the selection tool ( ). With the text still selected, choose Window > Object
Layers or click the palette’s tab to display the Object Layers palette. Click the New Layer
button ( ) to add a new layer to the text object.
4 Choose Window > Layer or click the palette’s tab to display the Layer palette. Enter 2
for Width and 6 for Softness.
5 Choose Window > Opacity or click the palette’s tab to display the Opacity palette.
Change the Object Layer Opacity to 33.
LM_02.book Page 49 Thursday, May 23, 2002 10:05 AM
Dragging the style onto the Styles palette, choosing options for saving the style
50 LESSON 3
Working with Type
5 Drag “ambient” to the bottom left corner of the composition. Drag “house” to the
bottom right corner of the composition.
6 Select “ambient,” “hip-hop,” “trance,” and “house.” Choose Object > Align > Bottom.
7 With the objects still selected, choose Object > Distribute > Horizontal. They are
spaced evenly along the bottom of the composition.
2 Click the Align text vertically and Top align text buttons in the Properties palette. Select
the font (we used Myriad Roman), set the font size to 14, and type 18 Park Street.
3 Select the selection tool ( ). Drag “18 Park Street” so that it is over the light strip just
to the left of the smaller warehouse picture.
4 Shift-click the smaller warehouse picture and choose Object > Align > Top to line up
the text.
2 In the Composition window, drag to create an ellipse in the upper left of the composition.
3 Choose Window > Transform or click the palette’s tab to display the Transform palette.
Enter 67 for the width ( ) and height ( ) to create a circle. Enter 14 for X, and 18 for Y
to set the circle’s position.
4 Select the type tool ( ). In the Properties palette, set the font to Adobe Garamond
Semibold Italic, the font size to 65, and the alignment to Horizontal. Click near the circle
and type w.
5 Select the selection tool ( ), and select the “w” and the circle.
6 Choose Object > Combine > Exclude.
LM_02.book Page 52 Thursday, May 23, 2002 10:05 AM
52 LESSON 3
Working with Type
The Exclude command joins the two selected objects into one object, but any areas where the
two original objects overlap are made transparent so that the background shows through.
7 Select the subgroup selection tool ( ), and click the “w.” Move the “w” so that it is
in the center of the circle. You can see that the “w” is now transparent because of the
Exclude command.
Combining text with another object will result in a bitmap object upon SWF export. To
avoid this, select the text, then choose Object > Convert Into > Path before combining.
8 Choose the selection tool, and select the circle.
9 In the Opacity palette, change the Object Opacity to 50.
2 In the Properties palette, set the font to Myriad and the font size to 18. Type friday into
the text area.
3 Select the selection tool ( ). Choose Object > Convert Into > Objects. Each letter is
now selected separately rather than as part of the entire word.
4 Now select the selection tool ( ), and move each letter onto one of the six gray circles
to the left of the smaller warehouse picture. Arrange them so that they spell out “fri” on
the top row, and “day” on the bottom row.
Because the letters are small and close together, you may want to zoom into the compo-
sition to move them more easily.
5 Select the top row of letters and choose Object > Align > Bottom. Do the same with the
bottom row of letters.
6 Select the “f ” and its circle. Choose Object > Combine > Minus Front to make the
“f ” transparent.
LM_02.book Page 54 Thursday, May 23, 2002 10:05 AM
54 LESSON 3
Working with Type
7 Choose Window > Color or click the palette’s tab to display the Color palette. Change
the circle from gray to black.
60 LESSON 4
Working with the Pen Tool
Getting started
In this lesson, you’ll learn how to do the following:
• Draw straight lines.
• Draw curved lines.
• Add and remove control points.
• Convert smooth points to corner points and vice versa.
• Change shapes to paths.
• Create closed paths.
• Adjust lines.
• Use the fill and outline features.
This lesson takes approximately 45 minutes to complete.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson04
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For more information,
see “Copying the Classroom in a Book files” on page 3.
You’ll begin this lesson by using your Web browser to view a copy of the finished
composition.
1 Start a Web browser, such as Netscape Communicator or Microsoft Internet Explorer.
2 Use the browser to open the file 04End.html from the Lessons/Lesson04 folder.
The composition is a drawing of a bird, created with the pen tool.
2
1 3
4 6
5
12 7 8
10
11 9
LM_02.book Page 61 Thursday, May 23, 2002 10:05 AM
62 LESSON 4
Working with the Pen Tool
This step turns your shape into a thin line drawing. Fill creates a solid shape as you draw,
and makes it more difficult to see the line segments. Outline width is measured in
quarter-pixels, so your outline is 2.5 pixels wide.
Positioning the pointer, and dragging the control points toward the center
64 LESSON 4
Working with the Pen Tool
Currently you have the pointer over a direction point. You can drag the point in different
directions to change the curve.
You can open the file 04End.liv at any time during the lesson to check your progress
against the finished LiveMotion version of the file.
The start file consists of a template over which you will draw a bird.
66 LESSON 4
Working with the Pen Tool
2 2 2
1 3 1 3 1 3
12 12 12
11 11 11
Notice that the control point is still created on point 4. By holding the Shift key, you are
constraining the line to a right angle to the last point you created.
4 Hold the Shift key and click a ways below point 4. The new line forms a right angle with
the last one. Now click this point again to erase it.
3 3
4 4
5 5
7 7
10 10
11 11
Unconstrained Constrained
68 LESSON 4
Working with the Pen Tool
4 6 4 6
5 5
7 8 7 8
10 10
9 9
2
1 3
12
11
Now you’ve completed the basic shape of the bird, and developed a feel for how the pen
tool works. To complete the lesson, you’ll edit and fill the shape.
LM_02.book Page 69 Thursday, May 23, 2002 10:05 AM
Adjusting points
Drawing with the pen tool is very flexible. You can go back and alter any lines you create
as well as manipulate the direction points of a smooth point to change the shape of the
curve. You’ll adjust the lines you’ve drawn to make the bird look more like the one in the
end file.
1 Select the pen selection tool ( ), and click the bird. Notice that you can see all the
control points you’ve made on the bird.
2 Position the pointer over point 2. The pointer changes to an arrow, indicating that you
can adjust the point.
3 Click the point. Drag the direction point down to give the neck a deeper curve.
4 Click point 12. Drag the upper direction point up and to the left.
Experiment with adjusting the other smooth points.
2 2 2
1 3 1 3 1 3
12 12 12
11 11 11
Changing points
In the first part of this lesson, you converted smooth points to corner points and vice
versa. Now you will continue practicing converting points with the bird’s tail feathers.
1 Hold the Alt (Windows) or Option (Mac OS) key. Position the pointer over point 4,
and click-drag slightly to convert the point.
2 Convert point 9 the same way.
LM_02.book Page 70 Thursday, May 23, 2002 10:05 AM
70 LESSON 4
Working with the Pen Tool
2
1 3
4 6
5
12 7 8
10
11 9
5 Animating Position
80 LESSON 5
Animating Position
Getting started
In this lesson, you’ll learn how to do the following:
• Create an object to animate.
• Name the object.
• Display and work with the animation Timeline window.
• Create and edit keyframes.
• Animate an object’s position and other properties.
• Create and edit motion paths.
• Replace one object in an animation with another from a different file.
• Time-stretch an animation.
• Preview and export an animation.
This lesson takes approximately 45 minutes to complete
If needed, remove the previous lesson folder from your hard drive and copy the Lesson05
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For more information,
see “Copying the Classroom in a Book files” on page 3.
You’ll begin this lesson by using your Web browser to view a copy of the finished
Web animation.
1 Start a Web browser that can display SWF file format files, such as Netscape Commu-
nicator or Microsoft Internet Explorer. (If the necessary plug-in is not installed,
animation will not be visible.)
2 Use the browser to open the file 05End.html from the Lessons/Lesson05 folder.
LM_02.book Page 81 Thursday, May 23, 2002 10:05 AM
The animation consists of a flying saucer that zooms toward the bottom of the compo-
sition, turning and rotating as it comes closer.
Note: If you do not have enough memory to run a browser and LiveMotion at the same time,
quit the browser after viewing the animation.
You can open the file 05End.liv at any time during the lesson to check your progress
against the finished LiveMotion version of the file.
4 Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
LM_02.book Page 82 Thursday, May 23, 2002 10:05 AM
82 LESSON 5
Animating Position
You’ll use this rectangle throughout the animation. At the end, you’ll replace it with a
drawing of a flying saucer. You could start with the flying saucer, but by animating a
simple rectangle until the very end, you simplify the process of animation and increase
the speed of previewing it.
2 Choose Window > Transform or click the palette’s tab to display the Transform palette.
Now you’ll use the Transform palette to make the rectangle the same size as the flying
saucer drawing you’ll import later.
3 Enter 134 for the width ( ) and 70 for the height ( ).
LM_02.book Page 83 Thursday, May 23, 2002 10:05 AM
Note: You can zoom into and out of the Timeline window using the Zoom In ( ) and Zoom
Out ( ) buttons located on the bottom of the Timeline window. Because Windows and Mac
OS have different default zoom levels, your timeline zoom level may not be the zoom level
pictured in the illustrations.
LM_02.book Page 84 Thursday, May 23, 2002 10:05 AM
84 LESSON 5
Animating Position
Notice that the counter at the top left corner of the Timeline window changes. This repre-
sents where you are in the animation. The digits represent hours, minutes, seconds, and
frames. For example, 00:00:03:11 means 3 seconds and 11 frames into the animation. Our
composition is animated at 12 frames per second, so the next frame would be 00:00:04:00.
Because you’re not going to create an animation longer than several seconds, you’ll just
use the last two numbers in our lessons. For example, we’ll use 02:05 to represent 2
seconds, 5 frames into the animation.
3 Drag the end marker of the duration bar for the composition to 06:00, which
represents 6 seconds of animation. This duration bar defines how long the composition’s
animation lasts.
LM_02.book Page 85 Thursday, May 23, 2002 10:05 AM
Notice that dragging the end marker of the duration bar also lengthened the duration bar
of your object. Each object in a composition has its own duration bar because the
animation of an object can start and end at different times than the start and end of the
composition. In this lesson, the timelines for the object and the composition will be the
same. When dragging an object’s composition bar, be sure to stretch out the duration bar,
and not just move the entire bar.
Next, you’ll rename the object you’re animating. This helps you manage multiple objects
in your composition.
4 Click the name of the object in the Timeline window and press the Enter key
(Windows) or the Return key (Mac OS). In Name dialog box, enter the name you want
to give the object (we used “My_Object”) and click OK to change the name.
5 Choose File > Save to save your work.
Animating position
In this part of the lesson, you’ll animate the object’s position. Nearly every aspect of an
object can be animated. Properties that can be animated are listed in the Timeline window.
1 Click the triangle next to “My Object” in the Timeline window. This displays the three
basic properties you can animate for an object: transform, object attributes, and layer.
2 Now click the triangle next to Transform to expand the heading and display the most
common kinds of transformations you can animate.
LM_02.book Page 86 Thursday, May 23, 2002 10:05 AM
86 LESSON 5
Animating Position
3 If the current-time marker is not at this frame, move it to 00:00 by dragging the
current-time marker to the beginning.
This indicates the beginning of the animation and the time at which you would like to set
the initial properties of the object for the animation.
Notice that each property listed under Transform has a stopwatch to its left of the name.
To begin animating a property, click the stopwatch. This creates an initial keyframe for
the property. A keyframe indicates the status of a property at a certain time in the
animation. For example, a rectangle that changes from blue to red between 1 and 2
seconds in an animation has an initial color keyframe at 01:00 when the rectangle is blue,
and another at 02:00 when it is red. Most properties that can be animated are listed in the
timeline with a stopwatch. However, you can add other properties by changing that
property, using the palettes or tools. The property will then be added to the timeline.
4 Click the Position stopwatch ( ) in the Timeline window. This specifies the initial
position of the object and creates a keyframe.
Once you set keyframes at various frames in the animation, LiveMotion creates all the
frames in between. After the first keyframe is set for any property, LiveMotion will create
a new keyframe whenever that property is changed, without you clicking on the
stopwatch again. If you want to create a keyframe that is the same as the last keyframe but
at a different place in the timeline, click the Add Keyframe check box ( ) to the right
of the property name.
LM_02.book Page 87 Thursday, May 23, 2002 10:05 AM
5 Move the current-time marker to frame 03:00. This indicates the time at which you
want a change to occur.
6 Choose the selection tool ( ) from the toolbox, and drag the rectangle to the middle
of the composition.
The blue dots trailing from the rectangle represent its position at each frame in the
animation. This is the Motion Path preview option and can be turned off by choosing
View > Motion Path. It is turned on by default. When the dots are closer, the change is
less and the object moves more slowly. For example, if there are 20 dots spaced closely
together between two keyframes, it takes 20 frames of the animation for the change to
occur between those two keyframes.
7 Choose File > Save.
Playing animation
Now that you’ve animated the rectangle, you can play the animation in LiveMotion.
1 Select the timeline and drag the current-time marker to 00:00. Then click the Play
button ( ) in the Timeline window. The animation plays from where the current-time
marker is located.
Dragging the marker to the beginning ensures that the animation plays from
beginning to end. Instead of dragging the current-time marker, you can also click the
First Frame button ( ).
LM_02.book Page 88 Thursday, May 23, 2002 10:05 AM
88 LESSON 5
Animating Position
Notice that when you play the animation, the blue dots disappear. This is because the dots
would not appear in the actual animation; they are visible only for currently selected
objects as you work in the Composition window. Notice, too, that the rectangle stops
moving once the current-time marker in the Timeline window passes 03:00. This is
because the change in position ended at the keyframe you created at 03:00.
Now you’ll learn other ways to play the animation in LiveMotion.
2 Select the Timeline window and click the Go to the next frame button ( ) and Go to
the previous frame button ( ) several times to play the animation one frame at a time.
3 Drag the current-time marker in the Timeline window to show the current state of the
animation. This process is also known as “scrubbing.”
4 To create further motion, make sure the current-time marker is at 06:00 and then drag
the rectangle down and to the left in the composition.
Editing keyframes
Now you’ll learn how to edit existing keyframes. Keyframes have a number of options that
affect how the animation plays. Over the next few lessons you’ll learn how to edit
keyframes to create new effects. In this section, you’ll edit keyframes so that the saucer
makes a sharp curve rather than a smooth one.
Select the rectangle and look at the blue dots along its path again. Notice that the dots
represent a smooth curve rather than a sharp angle. That’s because by default, LiveMotion
assumes you’ll want a smooth motion as objects move. It applies the Auto Bezier
command, which provides this kind of motion.
1 Play the animation, either with the Play button ( ) or by scrubbing with the current-
time marker.
LM_02.book Page 89 Thursday, May 23, 2002 10:05 AM
The rectangle moves in a gentle curve. However, you can change this to a sharp angle by
using the Linear command.
2 Select the Position keyframe to which you want to apply the Linear command; in this
case, the keyframe at 03:00.
90 LESSON 5
Animating Position
7 Drag the rectangle to the left in the composition; then play the animation to view
your changes.
You can rotate more than 360° to make an object rotate multiple times during an
animation. For example, we entered -380° to make the object rotate clockwise a little over
one full rotation.
92 LESSON 5
Animating Position
Time-stretching an animation
To speed up or slow down an animation, you can either click and drag the individual
keyframes or use a handy time-stretching technique to adjust all of the keyframes at once.
These next steps demonstrate the time-stretching method.
1 Place the cursor over the end handle of My_Object’s duration bar. The cursor will
change to a two-headed arrow.
2 Hold down Alt (Windows) or Option (Mac). A tiny stopwatch will appear under the
two-headed arrow. Drag the duration bar end handle to the left.
Dragging the duration bar end handle to the left will shorten the animation. Watch the
keyframes move closer to one another as you drag the handle to the left. The end result is
that the animation runs much faster.
3 Play the animation.
LM_02.book Page 94 Thursday, May 23, 2002 10:05 AM
To slow down My_Object’s animation, click and drag the duration bar to the right while
holding down Alt (Windows) or Option (Mac).
6 Editing Keyframes
98 LESSON 6
Editing Keyframes
Getting started
In this lesson, you’ll learn how to do the following:
• Work with a file that contains animated objects.
• Create hold frames.
• Ease in and ease out of frames.
• Reverse animations by moving keyframes.
• Change the stacking order of objects.
This lesson takes approximately 30 minutes to complete.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson06
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For more information,
see “Copying the Classroom in a Book files” on page 3.
You’ll begin this lesson by using your Web browser to view a copy of the finished
Web animation.
1 Start a Web browser that can display SWF file format files, such as Netscape Commu-
nicator or Microsoft Internet Explorer. (If the necessary plug-in is not installed,
animation will not be visible.)
2 Use the browser to open the file 06End.html from the Lessons/Lesson06 folder.
LM_02.book Page 99 Thursday, May 23, 2002 10:05 AM
The animation consists of a purple plane that flies to three different cities as a cloud drifts
across the scene.
Note: If you do not have enough memory to run a browser and LiveMotion at the same time,
quit the browser after viewing the animation.
100 LESSON 6
Editing Keyframes
You can open the file 06End.liv at any time during the lesson to check your progress
against the finished LiveMotion version of the file.
3 Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
4 Choose Timeline > Timeline /Composition Window to display the Timeline window.
5 In the Timeline window, make sure the current-time marker is at 00:00.
The start file includes the plane, the map, and the cloud. Now, you’ll animate the plane
and the cloud.
2 In the Timeline window, expand Plane > Transform to display the Transform
properties. Click the Position stopwatch to set a keyframe for the plane’s initial position.
Now you’ll move the plane to Paris.
3 Drag the current-time marker to 02:00, the time in the animation at which the plane
will arrive in Paris.
When the Timeline window is active, you can press the left and right arrow keys to
expand and collapse an object’s properties.
LM_02.book Page 101 Thursday, May 23, 2002 10:05 AM
4 Drag the plane to the black dot at Paris. This creates a new position keyframe for the
plane at this point in the animation.
Now you’ll create a new keyframe at a later time but leave the plane in the same position.
This will represent the plane’s stopover for refueling in Paris.
5 Drag the current-time marker to 02:06. The plane will be stopped in Paris from 02:00
to 02:06.
6 Click the Add Keyframe box ( ) to the right of the plane’s Position stopwatch in the
Timeline window. A new keyframe with the same position property as in 02:00 is created
at 02:06.
102 LESSON 6
Editing Keyframes
11 Click the Go to the first frame button ( ) to return the current-time marker to the
beginning; then click the Play button ( ) to play the animation.
LM_02.book Page 103 Thursday, May 23, 2002 10:05 AM
104 LESSON 6
Editing Keyframes
2 Choose Timeline > Hold Keyframe. Notice that the keyframes change shape.
3 Play the animation, and notice that the plane holds its correct position while it’s
stopped in Paris and Rio de Janeiro.
The plane travels at different speeds between cities. You’ll fix this now by adjusting the
location of the keyframes so that it takes the plane the same amount of time to travel
between each city.
4 Select the plane, so you can see its motion path.
5 Shift-click to select the two keyframes for Paris (at 02:00 and 02:06). Drag them simul-
taneously so that the left keyframe is at 02:10 in the timeline, and the right keyframe is
at 3:04.
To make it easier to find a specific time for a keyframe on the timeline, you can
drag the current-time marker to the specific time and then move a keyframe on top of the
current-time marker.
6 Shift-click to select the two keyframes for Rio de Janeiro, and drag them together in
the timeline.
7 Adjust the two keyframes until the plane’s motion path displays similar dot patterns,
indicating similar velocities between each leg of the flight. We chose 06:05 for the left
keyframe, and 6:11 for the right).
8 Choose File > Save.
LM_02.book Page 105 Thursday, May 23, 2002 10:05 AM
3 Click the Rotation stopwatch in the plane’s timeline. This creates a new rotation keyframe.
4 Drag the current-time marker to 03:01 and rotate the plane so that it points toward
Rio de Janeiro.
5 Drag the current-time marker to 06:08 and then rotate the plane to point toward
New York.
6 Play the animation, and notice that the plane rotates slowly as it flies from one city
to another.
To fix this, you’ll use the Hold Keyframe command to hold the rotation.
7 In the Timeline window, shift-click to select all of the Rotation keyframes in the plane’s
timeline and then choose Timeline > Hold Keyframe.
8 Choose File > Save.
9 Play the animation.
LM_02.book Page 106 Thursday, May 23, 2002 10:05 AM
106 LESSON 6
Editing Keyframes
3 Shift-click to select the first Position keyframe in New York (at 00:00), and the
second Position keyframes for Paris (at 03:04) and Rio de Janeiro (at 06:11) in the
plane’s timeline.
4 Choose Timeline > Ease Out.
The shape of the keyframes changes to indicate that these are Ease Out keyframes. The
Ease Out command increases the motion as the plane leaves those keyframes/cities.
LM_02.book Page 107 Thursday, May 23, 2002 10:05 AM
Reversing keyframes
Now you’ll reverse the direction of an object by switching the position of keyframes.
1 Return the animation to 00:00.
2 Select the cloud in the composition.
3 Expand Cloud > Transform in the Timeline window, and click the Position stopwatch
to create an initial keyframe for the cloud.
4 Drag the current-time marker to 09:00, the end of the animation.
5 Begin dragging the cloud to the right and then hold down the Shift key as you drag,
making the cloud go straight across horizontally, and creating another Position keyframe
at that frame.
6 Play the animation to view the cloud drifting slowly from left to right.
LM_02.book Page 108 Thursday, May 23, 2002 10:05 AM
108 LESSON 6
Editing Keyframes
But what if you want the cloud to move from right to left, instead? You could select the
keyframes and move the cloud, making sure to move it to exactly the right spot in the
composition to reverse the motion. An easier way is to simply reverse the keyframes.
7 Select the first Position keyframe for the cloud and drag it to the right, near the end of
the cloud’s timeline.
8 Now select the second Position keyframe for the cloud and drag it to the beginning of
the cloud’s timeline, crossing over the other keyframe in the process.
9 Adjust both keyframes in their new positions so they are at the beginning and end of
the timeline.
10 Collapse the cloud’s properties in the Timeline window, and save the file.
11 Play the animation to view the cloud moving from right to left instead of left to right.
LM_02.book Page 109 Thursday, May 23, 2002 10:05 AM
2 In the Timeline window, select the name “Plane” of the duplicate you just created and
press Return.
3 Type the name Lower Plane and then click OK.
4 Drag the current-time marker to a point after the plane has crossed over the cloud.
We used 08:00.
LM_02.book Page 110 Thursday, May 23, 2002 10:05 AM
110 LESSON 6
Editing Keyframes
5 In the Timeline window, select Plane (the original plane) and drag the end of its
duration bar (the out point) to 08:00.
This is where the plane flying above the cloud will end.
6 Select Lower Plane (the duplicate) and drag the beginning of its duration bar (the in
point) to 08:01 (one frame after the original plane’s animation ends).
Moving the beginning of the duplicate plane’s animation so that it appears one frame
after the original plane disappears causes the duplicate to take up where the original’s
animation ends, replacing it.
7 Play the animation.
At this point, it looks no different from when it was a single plane flying over the cloud.
But in the next steps, you’ll move the lower plane below the cloud in the stacking order.
8 Drag the current-time marker to a point in the animation where the lower plane is
flying. We used 08:05.
LM_02.book Page 111 Thursday, May 23, 2002 10:05 AM
9 Select Lower Plane and choose Object > Arrange > Send Backward. Repeat this step
until Lower Plane is below Cloud in the Timeline window. This means it is also below the
cloud in the composition.
You can also change an object’s stacking order by clicking and dragging it upwards or
downwards in the Timeline.
116 LESSON 7
Animating Object Properties
Getting started
In this lesson, you’ll learn how to do the following:
• Work with a file that contains animated objects.
• Animate multilayered objects.
• Change color, object opacity, and layer opacity over time.
• Work with sound.
This lesson takes approximately 45 minutes to complete.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson07
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For more information,
see “Copying the Classroom in a Book files” on page 3.
You’ll begin this lesson by using your Web browser to view a copy of the finished
Web animation.
1 Start a Web browser that can display SWF file format files, such as Netscape Commu-
nicator or Microsoft Internet Explorer. (If the necessary plug-in is not installed,
animation will not be visible.)
2 Use the browser to open the file 07End.html from the Lessons/Lesson07 folder.
The animation shows a blue background with a blue stripe and a blue circle. Over time,
a meteor, text, and a yellow band appear in the composition as a sound repeats in the
background. The composition elements have shadowing and 3D effects that change as the
meteor passes through the scene.
Note: If you do not have enough memory to run a browser and LiveMotion at the same time,
quit the browser after viewing the animation.
LM_02.book Page 117 Thursday, May 23, 2002 10:05 AM
You can open the file 07End.liv at any time during the lesson to check your progress
against the finished LiveMotion version of the file.
3 Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
4 Choose Timeline > Timeline/Composition Window to display the Timeline window.
5 In the Timeline window, make sure the current-time marker is at 00:00; then click the
Play button ( ) to play the animation.
The start file consists of a blue background, a rectangle that doesn’t change during the
animation, and a white meteor that moves from right to left during the animation.
LM_02.book Page 118 Thursday, May 23, 2002 10:05 AM
118 LESSON 7
Animating Object Properties
In the Timeline window, notice that the meteor’s duration bar starts at 02:09 and ends at
08:06. The duration bar is not the length of the entire animation because the meteor
appears partway through the animation of the composition as a whole, and disappears
before the animation as a whole finishes.
Animating an ellipse
In this part of the lesson, you’ll create an embossed circle that gradually rises from the
background and whose highlight moves in relation to the meteor during the animation.
You’ll make this circle gradually rise out of the background and animate a highlight that
moves in relation to the meteor crossing the composition.
The circle
3 Choose Window > Transform or click the palette’s tab to display the Transform palette.
4 Enter 90 for the Width ( ) and Height ( ) of the circle.
Changing the width and height of the circle in the Transform palette
5 Choose Window > Layer or click the Layer tab to display the Layer palette.
6 With the circle still selected, choose Background from the Fill With menu in the
Layer palette.
The ellipse is invisible, but it is still there. It is just filled with what is behind it, which is
the blue background of the composition.
7 Choose Window > 3D or click the palette’s tab to display the 3D palette.
LM_02.book Page 120 Thursday, May 23, 2002 10:05 AM
120 LESSON 7
Animating Object Properties
8 Choose Emboss from the menu. Notice that with the embossing added, you can see the
circle again.
9 In the 3D palette, enter 5 for Depth, 10 for Softness, and 20 for Lighting.
2 Drag the current-time marker to 03:00, and increase the Lighting setting to 80 in the
3D palette. LiveMotion automatically adds a new keyframe to the timeline.
LM_02.book Page 121 Thursday, May 23, 2002 10:05 AM
3 Play the first part of the animation to watch the circle appear as the lighting increases.
When you’re through, stop the animation and drag the current-time marker to 07:00,
where you’ll create the next keyframe.
4 Click the Add Keyframe box ( ) to the right of Effect Lighting in the Timeline
window to give the keyframe at 07:00 the same value as the previous keyframe. This
maintains the lighting effect between these two frames in the animation.
5 Drag the current-time marker to 09:00. With the ellipse selected, decrease the
Lighting setting in the 3D palette to 0. This makes the embossed circle disappear at
the end of the animation.
Now you’ll change the Effect Angle setting, so that the light on the embossed circle
follows the light given off by the meteor.
6 Drag the current-time marker to 03:00, and change the Lighting Angle setting to -20.
7 Click the Effect Angle stopwatch to create an initial keyframe here. This makes the
animation look as if the meteor is casting light on the embossed circle.
8 Drag the current-time marker to 09:00, and change the Lighting Angle setting to -99.
This makes it look as if the lighting on the circle is caused by the light from the meteor
when the animation is played. Although you can’t see the circle any longer at this point,
the angle you just set ensures that the lighting is at the correct angle as the embossed circle
fades away.
LM_02.book Page 122 Thursday, May 23, 2002 10:05 AM
122 LESSON 7
Animating Object Properties
9 Drag the current-time marker back to 00:00, and play the animation from the
beginning.
10 Choose File > Save to save your work.
Selecting the Hide Shy Objects button saves space in the Timeline window by hiding all objects marked as shy.
Animating opacity
You’ll begin by drawing a circular outline and adjusting its opacity over time.
1 Drag the current-time marker to 04:06. This is where the animation of the circle
will begin.
LM_02.book Page 123 Thursday, May 23, 2002 10:05 AM
2 Select the ellipse tool and then Shift-drag to draw a large circle in the center of the
composition. In the Transform palette, make sure it has a width ( ) and height ( ) of 241.
124 LESSON 7
Animating Object Properties
5 Choose Window > Properties, or click the palette’s tab to display the Properties palette.
Select Outline to convert the solid circle to an outline, and enter 8 for Width. The width
is measured in 1/4-pixels. This turns the solid circle into a pale yellow band 2 pixels wide.
6 In the Timeline window, expand Medium Yellow Outlined Ellipse > Transform to
display the Transform properties. First you’ll set a keyframe for the entire object’s opacity.
7 Choose Window > Opacity, or click the palette’s tab to display the Opacity palette.
8 Set the Object Opacity (not the Object Layer Opacity) to 0 in the palette, and click the
Object Opacity stopwatch in the Timeline window.
This creates a keyframe for the entire object’s opacity at 04:06 and makes it invisible at this
point in the animation. As with the previous circle you made, the yellow band will
gradually appear over time.
9 Drag the current-time marker to 07:00, and set the Object Opacity to 100. This makes
the yellow band gradually come into view by becoming more opaque over time.
10 Drag the current-time marker to 00:00, and play the animation.
11 Choose File > Save.
2 Drag the current-time marker to 04:06. This is the point in the animation where the
yellow band first appears (the in point of the band).
3 In the Timeline window, expand Medium Yellow Outlined Ellipse > Layer 1 to display
the Layer properties.
Notice that there isn’t a property in the band’s timeline for Opacity Gradient Angle. By
specifying this property, you’ll create a stopwatch for it in the Timeline window now.
4 In the Opacity palette, choose Linear from the menu to set the opacity gradient type.
5 Change the Opacity Gradient Angle setting slightly to create a stopwatch for this
property in the Timeline window. We used -13.
Note: In addition to Opacity Gradient Angle, this creates additional properties, including
Opacity Gradient Type, Opacity Gradient Start, Opacity Gradient End, and Color Ramp.
6 Click the Opacity Gradient Angle stopwatch to create a new keyframe with this angle.
7 Drag the current-time marker to 11:00.
8 In the Opacity palette, rotate the angle marker several times to make the gradient angle
rotate within the circle that number of times. We rotated it three times, for a value of 750.
9 Drag the current-time marker to 00:00, and play the animation.
10 Choose File > Save.
11 In the Timeline window, click the Medium Yellow Outlined Ellipse Shy button.
Animating type
Now you’ll add a multilayered type object to your animation. You’ll make the color of the
top layer and the position of the shadow (second) layer change over time in response to
the meteor’s movement.
1 Drag the current-time marker to 00:00. This is where the text will begin.
LM_02.book Page 126 Thursday, May 23, 2002 10:05 AM
126 LESSON 7
Animating Object Properties
2 Select the type tool ( ), and click the rectangle in the composition.
3 Use the Properties palette to set the font and point size, such as Myriad Bold at 55-
point, then type Luna.
4 Choose the selection tool ( ) and drag the text onto the middle of the rectangle in
the composition.
3 Drag the current-time marker to 04:00, and click the Color stopwatch to create a
keyframe for color. By having the color the same at 00:00 and 04:00, the color remains
constant between frames 00:00 and 04:00.
4 Now drag the current-time marker to 05:06, and change the color to white by entering
255 for R, G, and B. This represents the color when the meteor is directly over the text,
whitening it.
5 Finally, drag the current-time marker to 07:00, and change the color back to medium
red. Again, we used 255 for R, 127 for G, and 127 for B.
6 Drag the current-time marker to the beginning, and play the animation to preview the
animation so far.
7 Choose File > Save.
128 LESSON 7
Animating Object Properties
2 Click Medium Red Luna in the Timeline window to select the text. Clicking the name
of an object in the Timeline window has the same effect as using the selection tool and
clicking the object in the Composition window.
6 Select “shadow” in the Timeline window so that you can change its properties.
Selecting the layer in the Timeline window is the same as selecting the layer in the Object
Layers palette.
Now you’ll animate the second shadow layer, so that it moves in response to the meteor
passing over the text.
7 Drag the current-time marker to 04:00. This represents where the meteor is when it’s
to the right of the text.
8 Choose Window > Layer, or click the palette’s tab to display the Layer palette.
9 In the Layer palette, change the X Offset to -10.
10 In the Timeline window, click the Offset stopwatch under “shadow” to create a
keyframe for the offset.
11 Drag the current-time marker to 07:00, and change the X Offset to 10. This represents
what the drop shadow looks like when the meteor is to the left of the text.
12 With the shadow layer still selected, drag the current-time marker to 03:00.
13 In the Opacity palette, set Object Layer Opacity (not Object Opacity) to 0. This makes
the shadow invisible at this point in the animation, without making the entire object (the
text) invisible.
LM_02.book Page 130 Thursday, May 23, 2002 10:05 AM
130 LESSON 7
Animating Object Properties
14 In the Timeline window, click the Object Layer Opacity stopwatch under “shadow” to
create a keyframe for the layer opacity.
15 Drag the current-time marker to 04:00 (the frame where the meteor is to the right of
the text), and set the Object Layer Opacity to 70.
16 Drag the current-time marker to 07:00.
17 In the Timeline window, click the Add Keyframe box ( ) to the right of Object
Layer Opacity to create a new keyframe with the same Object Layer Opacity value. This
keeps the layer opacity of the shadow the same while the meteor is moving from right to
left over the text.
18 Drag the current-time marker to 08:00, and set the Object Layer Opacity to 0. This
makes the shadow disappear as the meteor leaves the left side of the composition.
19 Choose File > Save.
20 Drag the current-time marker to 00:00, and play the animation.
21 In the Timeline window, collapse Medium Red Luna.
2 Choose Window > Sounds, or click the Sounds tab to display the palette.
3 In the Sounds palette, choose Name View from the palette menu.
4 Choose 17_Loop_Fantasy and click the Apply button ( ) at the bottom of
the palette.
Even though the sound is not an object you can see in the composition, Adobe
LiveMotion inserts the sound in the Timeline window and creates a duration bar for it.
5 Choose File > Save.
6 Drag the current-time marker to 00:00, and play the animation.
140 LESSON 8
Creating Basic Rollovers
Getting started
In this lesson, you’ll learn how to do the following:
• Create multiple rollover buttons simultaneously.
• Apply different layered effects to a button.
• Create a rollover state for each layered effect.
• Apply a sound effect to a rollover state.
• Use a linked URL with a rollover state.
• Add a label to each button.
This lesson takes approximately 30 minutes to complete.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson08
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion Classroom 2.0 in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For more information,
see “Copying the Classroom in a Book files” on page 3.
You’ll begin this lesson by viewing a copy of the finished rollover buttons.
1 Start a Web browser that can display SWF file format files, such as Netscape Commu-
nicator or Microsoft Internet Explorer. (If the necessary plug-in is not installed,
animation will not be visible.)
2 Use the browser to open the file 08End.html from the Lessons/Lesson08 folder.
LM_02.book Page 141 Thursday, May 23, 2002 10:05 AM
3 Roll the mouse pointer over the three buttons, and notice that a yellow glow appears
around the edges.
4 Click the 2002 button.
This button links to another page in a separate window.
5 Click the other buttons, and notice how the blue gradient changes.
A clicking sound has been applied to the down rollover state of each button so that you
hear the sound when you click the button.
Note: If you do not have enough memory to run a browser and LiveMotion at the same time,
quit the browser after viewing the animation.
You can open the file 08End.liv at any time during the lesson to check your progress
against the finished LiveMotion version of the file.
3 In the Composition Settings dialog box, enter 120 for the Width setting and 150 for the
Height setting, and click OK.
4 Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
When you reset the palettes to their default properties, the fill color changes to black
(as indicated in the toolbox and the Color palette).
LM_02.book Page 142 Thursday, May 23, 2002 10:05 AM
142 LESSON 8
Creating Basic Rollovers
As you continue to build any one of these aliased buttons, the same changes are applied
to the other two buttons.
13 Choose File > Save, name the file with the .liv extension, and click Save.
LM_02.book Page 143 Thursday, May 23, 2002 10:05 AM
144 LESSON 8
Creating Basic Rollovers
For Web-safe colors, select the Web Safe Colors cube in the Color palette, or enter RGB
color values that are multiples of 51.
8 In the Gradient palette, enter -50 for the Rotation Angle setting. This will rotate the
gradient 50 degrees in a clockwise direction.
Notice that the gradient effect is automatically applied to all three aliased buttons in the
Composition window.
9 Choose Window > 3D, or click the palette’s tab to display the 3D palette. Choose Bevel
from the pop-up menu. Enter 1 for the Depth setting, 1 for the Softness setting, 100 for
the Lighting setting, and 125 for the Rotation Angle setting.
10 In the Object Layers palette, select Layer 2 and apply the same bevel effect in the
3D palette.
3 In the Layer palette, enter -1 for the Width setting and 8 for the Softness setting.
4 In the Color palette, select a yellow color or enter 255 for R, 204 for G, and 0 for B.
5 Choose File > Save.
While multi-layer objects and special effects—such as 3D bevels and layer softness—
cause objects to be exported as bitmap objects, this is not necessarily a bad thing. Following
the methodology shown here, LiveMotion will automatically symbolize the bitmap button
objects upon export, to minimize file sizes. This topic will be explored in depth in Chapter 15.
LM_02.book Page 146 Thursday, May 23, 2002 10:05 AM
146 LESSON 8
Creating Basic Rollovers
The yellow glow no longer appears around the buttons in the composition.
Hide the yellow glow effect when the button is in its normal state.
LM_02.book Page 147 Thursday, May 23, 2002 10:05 AM
4 Click the Preview Mode button ( ) at the bottom of the toolbox, and move the
mouse pointer over the buttons in the Composition window to preview the effect.
5 Click the Edit Mode button ( ) at the bottom of the toolbox when you’re done
previewing.
6 Choose File > Save.
148 LESSON 8
Creating Basic Rollovers
By default, this third rollover state becomes the down state. Because it is a duplicate of the
over state, it also has a Changes submenu.
6 Click the Preview Mode button ( ) and then click the buttons in the Composition
window to preview the visual effect.
7 Click the Edit Mode button ( ) when you’re done previewing.
8 Choose File > Save.
LM_02.book Page 149 Thursday, May 23, 2002 10:05 AM
3 Click the Preview Mode button ( ) and then click the buttons in the Composition
window to preview the sound effect.
4 Click the Edit Mode button ( ) when you’re finished previewing.
To remove the sound effect, select the words “Audible of 02_Event Button_Push” in the
States palette, and click the Delete State button ( ) at the bottom of the palette.
150 LESSON 8
Creating Basic Rollovers
To change the size of the selected text, enter new settings in the Properties palette.
7 In the 3D palette, choose Bevel from the pop-up menu. (Note: This step will cause the
text to output as a bitmap object.)
8 Hold down Alt (Windows) or Option (Mac OS), and drag the selected text to duplicate
it for the second and third buttons.
Using the Web palette to add an URL link on one object applies the link to the selected
object(s) and does not affect other aliased objects.
4 Enter _blank in the Window field to make the page open in a new, separate browser
window. You can also use other options for a URL that goes to a particular frame.
5 Choose File > Save.
You’ve finished making basic rollover buttons.
LM_02.book Page 152 Thursday, May 23, 2002 10:05 AM
152 LESSON 8
Creating Basic Rollovers
Use the Web palette to build links for compositions that will be exported as sliced
JavaScript rollovers. Compositions that will be exported in the SWF format can use either the
Web palette or Scripting to assign URL links.
156 LESSON 9
Movie Clips and Advanced Rollovers
Getting started
In this lesson, you’ll learn how to do the following:
• Create movie clip groups.
• Incorporate artwork from other LiveMotion files.
• Animate a rollover button in different states.
• Build masked groups.
• Convert Illustrator artwork into a group of objects.
• Set up conditions for secondary, remote rollovers.
This lesson takes approximately 45 minutes to complete.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson09
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For more information,
see “Copying the Classroom in a Book files” on page 3.
You’ll begin this lesson by viewing an HTML file of the finished composition in your
Web browser.
1 Start a Web browser that can display SWF file format files, such as Netscape Commu-
nicator or Microsoft Internet Explorer. (If the necessary plug-in is not installed,
animation will not be visible.)
2 Use the browser to open the file 09End.html from the Lessons/Lesson09 folder.
3 Click the Preview Mode button ( ).
LM_02.book Page 157 Thursday, May 23, 2002 10:05 AM
The Launch button and rocket ship are remote rollovers. The Launch button will become
active when the Start Ignition button is clicked. The rocket ship will be launched when
the Launch button is clicked.
158 LESSON 9
Movie Clips and Advanced Rollovers
2 Choose File > Open and open 09Start.liv from the Lessons/Lesson09 folder.
You can open the file 09End.liv at any time during the lesson to check your progress
against the finished LiveMotion version of the file.
3 Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
4 Choose File > Place, select the file start_ignition.liv in the Lesson09 folder, and click
Open to place the Start Ignition button into the composition.
When you place a LiveMotion file into a composition, the placed artwork is grouped
by default. The imported group’s center point will correspond to the X-0 Y-0 position
of the original file. Before you go any further, you’ll ungroup and regroup the placed
artwork to reset the center point.
5 Select the Start Ignition button, and choose Object > Ungroup; then reselect all of the
Start Ignition button’s elements and choose Object > Group.
6 Drag the Start Ignition button group to the lower right side of the interface.
For an object to be interactive, the object must be made into a movie clip—groups of
objects must be made into movie clip groups. Only movie clips or movie clip groups can
be controlled by rollovers or scripts.
All rollovers are either movie clips (single objects) or movie clip groups (multiple
objects). When you start with a simple object or group, the act of creating a second state
with the States palette will automatically turn the object or group into a movie clip or
movie clip group. These attributes can be ascertained (as well as assigned) with the
Object menu.
While the buttons in the last lesson were simple movie clips, you’ll turn the Start Ignition
button into a movie clip group.
1 Select the Start Ignition group and choose Timeline > Timeline/Composition Window
to open the Timeline window.
2 Expand Group of 7 objects > Transform to see the individual elements of the Start
Ignition button.
Now you’ll make the group into a movie clip group in order to animate the attributes the
individual elements of the Start Ignition button. Each element in a movie clip group can
be animated over a timeline that’s separate from the composition’s timeline. Each rollover
state provides a separate timeline.
160 LESSON 9
Movie Clips and Advanced Rollovers
Notice that a small image of the red button in the States palette indicates that each rollover
state is for the Start Ignition Button.
3 Select Group of 7 objects in the Timeline window, and choose Object > Edit Name.
Enter Start_Ignition_Button in the Name dialog box and click OK.
All of the objects in the movie clip group are listed. Each of the objects can be animated
in this separate, time-independent timeline. With a movie clip displayed in the Timeline
window, LiveMotion will gray out the elements in the Composition window, with the
exception of the currently displayed movie clip.
162 LESSON 9
Movie Clips and Advanced Rollovers
4 Select red-button_surface (over) in the Timeline and expand its Layer 1 attributes.
5 In the Gradient palette, select Radial from the menu.
6 Click the stopwatch next to Color Gradient Start to add a keyframe at 00s seconds.
Move the current-time marker to 03f. In the Gradient palette, click and drag the starting
gradient color to the right.
7 Move the current-time marker to 06f in the Timeline. In the Gradient palette, click and
drag the starting gradient color to the left.
Scrub the current-time marker to observe the pulsing glow.
8 Select Start_Ignition_Button (over) at the top of the Timeline window, and then select
the Loop movie clip ( )button at the bottom left of the Timeline. A loop icon is added
to the movie clip name in the Timeline window.
9 Click the Preview Mode button ( ). Move the mouse pointer over the Start Ignition
button and then move the pointer away from the button to see the changes.
10 Click the Edit Mode button ( ) in the toolbox when you’re done previewing
the effects.
11 Choose File > Save.
LM_02.book Page 163 Thursday, May 23, 2002 10:05 AM
The techniques used to create this button yield a three-dimensional appearance without
resorting to any effects (such as the 3D palette) that might cause the button to be exported as
bitmapped objects.
9 Click the Edit Mode button ( ) in the toolbox when you’re done previewing
the effects.
LM_02.book Page 164 Thursday, May 23, 2002 10:05 AM
164 LESSON 9
Movie Clips and Advanced Rollovers
10 Click the arrow at the top left of the Timeline window to step out of the movie clip
group timeline and return to the composition timeline.
11 Choose File > Save.
10 In the Transform palette, enter 120 in the Width ( ) setting and 40 in the
Height ( ) setting.
11 With the 120 x 40 rectangle selected, choose Edit > Duplicate. Click and drag the
duplicate to the right of the first 120 x 40 rectangle.
12 Select the type tool ( ).
13 In the Properties palette choose a font and type size (such as Myriad Bold 30 point).
14 Click in the Composition window to set an insertion point and then enter LAUNCH.
166 LESSON 9
Movie Clips and Advanced Rollovers
4 Choose the selection tool, then select the second filled 240 x 40 rounded rectangle.
5 Select the eyedropper tool in the toolbox. Click in the button composition window,
hold the mouse down, and drag into the template composition window. Move the
cursor to the start ignition button on the template, find a nice bright red, and release
the mouse button.
Now you’ll copy the gradient style—not just the color—from the template to the two
120 x 40 rectangles.
While LiveMotion allows you to use the eyedropper tool with a keyboard modifier (Shift)
to copy styles within a window, this does not work across windows.
6 Select the template composition window.
7 Select Timeline > Timeline/Composition Window to display the template’s Timeline
window (if it’s not displayed).
8 In the Timeline window, select unit and choose Edit > Copy. This copies the unit object
to the clipboard.
9 Select the button composition window.
LM_02.book Page 167 Thursday, May 23, 2002 10:05 AM
10 Choose the selection tool, select both 120 x 40 rectangles, and choose
Edit > Paste Style.
The two 120 x 40 rectangles should now have a burst gradient fill.
Select an object in the Timeline window and then press Enter (Windows) or Return
(Mac OS) to access the Name dialog box.
3 Rename the remaining elements: “Medium Gray-Cyan Outlined Rectangle” becomes
“bezel,” “Black Rounded Rectangle” becomes “mask,” and “Red Rounded Rectangle”
becomes “red-lens.”
LM_02.book Page 168 Thursday, May 23, 2002 10:05 AM
168 LESSON 9
Movie Clips and Advanced Rollovers
Now, you’ll reorder the elements in the Timeline window, by clicking and dragging.
4 In the Timeline window, select Black LAUNCH, then click and drag it downwards, so
that it is just above red-lens. Release the mouse button.
5 In the Timeline window, select mask, then click and drag it upwards, so that it is just
above left-slider. Release the mouse button.
6 In the Timeline window, select bezel, then click and drag it upwards, so that it is above
the mask. Release the mouse button.
LM_02.book Page 169 Thursday, May 23, 2002 10:05 AM
8 Choose Edit > Select All to select all of the elements, then shift-click bezel to deselect it.
9 Choose Object > Group to group all of the objects (with the exception of the bezel).
LM_02.book Page 170 Thursday, May 23, 2002 10:05 AM
170 LESSON 9
Movie Clips and Advanced Rollovers
Group of 5 objects appears in the Timeline window. If you expand this group in the
Timeline, you’ll see the five original elements.
10 Choose Object > Top Object is Mask. This makes the highest object (the one we’ve
conveniently named “mask”) in the group into a mask.
11 In the Timeline window, select Masked Group of 5 objects and then choose Object >
Edit Name. Enter launch_button in the Name dialog box, and click OK.
7 With the Current Time Indicator at 00s, select left-slider (ready_to_launch); then shift-
click right-slider (ready_to_launch), and click the Position stopwatch. This will set
Position keyframes for both objects.
8 Move the Current Time Indicator to 06f.
9 Shift-click right-slider (ready_to_launch) to deselect and select the composition
window. Hold down shift, and press the left arrow 12 times. This will nudge the left-slider
to the left by 120 pixels (12 nudges x 10 pixels).
10 Select right-slider (ready_to_launch) in the Timeline window, then select the
Composition window. Hold down shift, and press the right arrow 12 times. This will
nudge the right-slider to the right by 120 pixels.
11 Select the Play button in the Timeline window to preview the animation.
12 Choose File > Save.
172 LESSON 9
Movie Clips and Advanced Rollovers
2 Select launch_button and then select the ready_to_launch state in the State palette.
3 Click the Duplicate State button. This creates an over state, by default.
4 In the States palette, select down from the over state menu. (There will be no
over state.)
5 In the Timeline, double-click launch_button (down) to open the movie clip state’s
own timeline.
6 Expand left-slider (down) and right-slider (down) so that the Transform attributes
are shown.
7 Move the Current Time Indicator to 06f.
8 Select left-slider (down); then shift-click right-slider (down), and click the Position
stopwatch. This will clear the Position keyframes for both objects, removing the
animation, with the left and right slider objects remaining in their open position.
9 Click the arrow at the top left of the Timeline window to step out of the launch_button
timeline and return to the composition timeline.
10 Test the states by selecting them with the States palette.
11 Choose File > Save.
Don’t select any of the existing objects in the composition when you drag; otherwise, the
rocket will replace the selected object(s).
LM_02.book Page 174 Thursday, May 23, 2002 10:05 AM
174 LESSON 9
Movie Clips and Advanced Rollovers
We want the rocket to appear to be flying past a viewport. This can be achieved by adding
a mask to the rocket.
6 Select viewport in the Timeline.
7 Choose Edit > Duplicate to duplicate the viewport.
8 Shift-click rocket in the Timeline.
9 Choose Object > Group and then choose Object > Top Object is Mask.
LM_02.book Page 176 Thursday, May 23, 2002 10:05 AM
176 LESSON 9
Movie Clips and Advanced Rollovers
19 With the current time indicator set to 00s, click the Position and Scale stopwatches to
set keyframes.
20 Move the current time indicator to 09s.
21 Choose the selection tool and scale the rocket to fill the viewport; then use the X and
Y coordinates in the Transform palette to position the rocket off the right side of the
composition. This will make the rocket appear to fly towards the viewport before disap-
pearing from sight.
22 Select the Play button in the Timeline window to preview the take-off animation.
23 Click the arrow at the top left of the Timeline window to return to the
composition timeline.
24 Choose File > Save.
178 LESSON 9
Movie Clips and Advanced Rollovers
Pressing the Start Ignition button will now trigger the Launch button to go into the
ready_to_launch state. Next, you’ll set up the Launch button to launch the rocket.
5 Select the Launch button.
6 In the States palette, select the down state.
7 Click and drag the target icon from the Launch button’s down state in the States palette
to the masked rocket in the Composition window. Release the mouse button when the
masked rocket is selected.
8 Below the down state in the States palette, choose the take_off state from the secondary
pop-up menu for the masked rocket.
182 LESSON 10
Basic Player Script Interactivity
Getting started
In this lesson, you’ll learn how to do the following:
• Assemble multiple animations into one composition.
• Create transitions between scenes.
• Use labels in the composition and movie clip timelines.
• Work with the Script Editor to add interactivity.
• Create a Wait for Download behavior.
This lesson takes approximately 45 minutes to complete.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson10
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For more information,
see “Copying the Classroom in a Book files” on page 3.
You’ll begin this lesson by using your Web browser to view a copy of the finished
Web animation.
1 Start a Web browser that can display SWF file format files, such as Netscape Commu-
nicator or Microsoft Internet Explorer. (If the necessary plug-in is not installed,
animation will not be visible.)
2 Use the browser to open the file 10End.html from the Lessons/Lesson10 folder.
3 Click the word “play” to see the main composition.
4 Move the pointer over the four destination buttons on the inside car door, and click to
see the different animations.
LM_02.book Page 183 Thursday, May 23, 2002 10:05 AM
Note: If you do not have enough memory to run a browser and LiveMotion at the same time,
quit the browser after viewing the animation.
You can open the file 10End.liv at any time during the lesson to check your progress
against the finished LiveMotion version of the file.
LM_02.book Page 184 Thursday, May 23, 2002 10:05 AM
184 LESSON 10
Basic Player Script Interactivity
3 Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
4 Choose Timeline > Timeline/Composition Window to display the Timeline window.
5 In the Timeline window, make sure the current-time marker is at 00:00 and then click
the Play button ( ) to play the animation.
The start file includes the artwork for the opening (title) sequence, which lasts for five
seconds. You’ll add three files to the composition to create the finished movie you saw in
the browser: the outer door scene, the interactive animation of the road trip, and a
window controller. The road trip uses looping landscapes, so the viewer can ride for as
long as their heart desires.
4 Choose File > Place, and open inner_door_group from the Lessons/Lesson10/
Source folder.
5 Choose File > Place, and open window_control from the Lessons/Lesson10/
Source folder.
4 Move the current-time marker to 00:00, and play the animation to preview your work.
5 Choose File > Save.
LM_02.book Page 186 Thursday, May 23, 2002 10:05 AM
186 LESSON 10
Basic Player Script Interactivity
5 With the rectangle still selected, select the eyedropper tool ( ) in the toolbox. Click in
the yellow text so that the rectangle takes on the same color as the text.
6 In the Timeline window, expand Yellow Rectangle > Transform; then, click its Position,
Rotation, and Scale stopwatches to set keyframes.
LM_02.book Page 187 Thursday, May 23, 2002 10:05 AM
The opacity fade at the end of the transition is very subtle. You can see it more clearly by
scrubbing the current-time marker.
LM_02.book Page 188 Thursday, May 23, 2002 10:05 AM
188 LESSON 10
Basic Player Script Interactivity
8 Move the current-time marker to 00:00, and play the animation to preview your work.
9 Choose File > Save.
2 Double-click the window movie clip to drill down into its timeline.
3 Select the window movie clip in the Timeline window and then select the States palette.
The window movie clip has three states: normal, roll_down, and roll_up.
4 Select the roll_down state in the States palette.
5 In the Timeline window, expand window_and_highlight (roll_down) > Transform
The position animation has been created for you. Scrub the current-time marker to see
how the semi-transparent window_and_highlight group moves from a closed to an open
position. A similar animation has been created for the roll_up state.
LM_02.book Page 190 Thursday, May 23, 2002 10:05 AM
190 LESSON 10
Basic Player Script Interactivity
4 In the Script Editor, select the Handler scripts button and then select onButtonPress
from the drop-down menu.
When you switch to the onButtonPress event handler, you’ll notice that a line of code has
already been added to the state:
LM_02.book Page 191 Thursday, May 23, 2002 10:05 AM
this.lmSetCurrentState(“down”);
The line of code explains that on button press, the down state will be applied to this (the
up-arrow) movie clip. You’re going to add another line of code that will wire this state to
window movie clip’s roll_up state.
5 Place the cursor in the script window, just to the right of the semi-colon; then click and
press Enter (Windows) or Return (Mac). This will add a second (blank) line to the script.
6 Select the Scripting syntax helper button at the top left corner of the Script Editor and
then expand LM 1.0 Behaviors.
7 Double-click the Change State behavior.
A second line of code will be added to the script:
this.lmSetCurrentState(STATENAME);
You’ll need to edit this new line of code, so that it properly targets the window movie clip’s
roll-up state. While you could do this by hand, the Script Editor allows you to point-and-
click your way through the procedure.
8 Double-click this in the second line of code.
9 Select the Composition browser button at the top left corner of the Script Editor and
then expand the Composition, if necessary.
10 Navigate through the elements in the Script Editor’s Composition browser listing;
double-click the window movie clip.
LM_02.book Page 192 Thursday, May 23, 2002 10:05 AM
192 LESSON 10
Basic Player Script Interactivity
Notice that this has been changed to _parent.inner_door.window. The proper movie clip
has been targeted. Now it’s time to set the state.
11 Double-click STATENAME in the second line of code.
12 Double-click roll_up in the Script Editor’s Composition browser listing.
13 Close the Script Editor.
14 Select Preview Mode from the toolbox to preview the movie. Click on the up_arrow
to see what happens.
1 Close the Debugger window by clicking on the Kill button (the big red X).
2 Select Scripts > Script Editor.
3 Select the Movie Clip Navigator button at the top left corner of the Script Editor. Select
up_arrow from the listing and then select onButtonPress from the drop-down menu.
4 Take a look at the two lines of code. What looks different?
If the quote marks are missing from the roll_up state, you’ll need to add them for the
script to be able to perform.
Click between ( and roll_up; then add a quote mark. Next, add a quote mark between
roll_up and ). The line of code should now read:
LM_02.book Page 193 Thursday, May 23, 2002 10:05 AM
_parent.inner_door.window.lmSetCurrentState(“roll-up”);
5 Select Preview Mode from the toolbox to preview the movie. Click on the up_arrow to
see what happens. The window should roll up each time the roll_up button is clicked.
6 Choose File > Save.
7 Select Preview Mode from the toolbox to preview the movie. Click on both the
down_arrow and the up_arrow to see what happens.
8 Choose File > Save.
LM_02.book Page 194 Thursday, May 23, 2002 10:05 AM
194 LESSON 10
Basic Player Script Interactivity
Note that the starting and ending Position keyframes have been preset.
4 With the current-time marker at 00:00 in the Timeline window, click the Label button.
5 Name the label beach_start and click OK.
LM_02.book Page 195 Thursday, May 23, 2002 10:05 AM
6 Move the current-time marker to 02:00 in the Timeline window and then click the
Script button. This will summon the Script Editor. The drop-down menu will show 02:00
as the current location of the keyframe script.
7 Select the Scripting syntax helper button at the top left corner of the Script Editor.
8 Expand LM 1.0 Behaviors in the Scripting syntax helper listing, if necessary, and
double-click Go to Label (and play).
A new line of code will be displayed in the Script Editor:
this.gotoAndPlay(LABEL);
9 Select LABEL in the Script Editor, and replace it with “beach_start” so that the line reads:
this.gotoAndPlay(“beach start”);
196 LESSON 10
Basic Player Script Interactivity
Move the current-time marker to 01:06 in the Timeline window and then click the Script
button. This will summon the Script Editor. The drop-down menu will show 01:06 as the
current location of the keyframe script.
5 Double-click double click Go to Label (and play) in the Scripting syntax helper listing.
A new line of code will be displayed in the Script Editor:
this.gotoAndPlay(LABEL);
6 Select LABEL in the Script Editor, and replace it with “mountain_start” so that the
line reads:
this.gotoAndPlay(“mountain start”);
13 Select LABEL in the Script Editor, and replace it with “city_start” so that the line reads:
this.gotoAndPlay(“city start”);
7 Place the cursor in the script window, just to the right of the semi-colon; then click and
press Enter (Windows) or Return (Mac). This will add a second (blank) line to the script.
8 Select the Scripting syntax helper button at the top left corner of the Script Editor and
then expand LM 1.0 Behaviors.
9 Double-click the Change State behavior in the Scripting syntax helper listing.
A second line of code will be added to the script:
this.lmSetCurrentState(STATENAME);
198 LESSON 10
Basic Player Script Interactivity
The beach_button should now be properly wired to the inner_door’s beach state.
That should take care of the mountain state. Let’s move on to the city state.
7 In the Script Editor, select city_button from the Movie Clip Navigator listing. Select
onButtonPress from the drop-down menu, if necessary.
8 Place the cursor in the script window, just to the right of the semi-colon; then click and
press Enter (Windows) or Return (Mac) to add a second line to the script.
LM_02.book Page 199 Thursday, May 23, 2002 10:05 AM
Creating a preloader
Composition preloaders tell the player to wait for a specified event before playing an
animation. This helps to avoid stuttered playback, where the player stalls while waiting for
content to download over the network. With the composition preloaded, the movie plays
smoothly from the client browser’s cache.
In the following section, you’ll create a simple preloader. You’ll start by adding two
labels to the composition timeline. You’ll then use the Script Editor to add a wait for
download behavior.
200 LESSON 10
Basic Player Script Interactivity
It can be difficult to see the preloader in action when viewing the file from your
computer’s hard drive. To get the full effect, you’ll want to upload the movie to a Web server
and view it over the Internet.
LM_02.book Page 202 Thursday, May 23, 2002 10:05 AM
202 LESSON 10
Basic Player Script Interactivity
206 LESSON 11
Adding Sounds to Your Composition
Getting started
In this lesson, you’ll learn how to do the following:
• Add streaming sound to a composition.
• Add sound to a movie clip group.
• Create a looping effect that makes a sound play continuously.
• Use the Solo Event Sound property.
• Create a controller to turn a looping sound on and off.
• Add a sound volume controller.
This lesson takes approximately 30 minutes to complete.
You’ll begin this lesson by viewing the final composition in a Web browser.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson11
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For information, see
“Copying the Classroom in a Book files” on page 3.
1 Start a Web browser that can display SWF file format files, such as Netscape Commu-
nicator or Microsoft Internet Explorer. (If the necessary plug-in is not installed,
animation will not be visible.)
2 Use the browser to open the file 11End.html from the Lessons/Lesson11 folder.
3 When the movie loads, you’ll hear the first music clip stream in the browser. Once
you’re inside the car, click the four location buttons to see the different animations and
hear the sounds.
This lesson uses sound files from the Lessons/Lesson11 folder and LiveMotion 2.0 Library
that you’ll add to the composition. You’ll place the first sound into the composition and
make it into a streaming sound. You’ll then add four additional sounds and use a special
technique to make each sound play continuously along with its animation.
Note: If you do not have enough memory to run a browser and LiveMotion at the same time,
quit the browser after viewing the animation.
LM_02.book Page 207 Thursday, May 23, 2002 10:05 AM
You can open the file 11End.liv at any time during the lesson to check your progress
against the finished LiveMotion version of the file.
3 Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
LM_02.book Page 208 Thursday, May 23, 2002 10:05 AM
208 LESSON 11
Adding Sounds to Your Composition
210 LESSON 11
Adding Sounds to Your Composition
9 In the Timeline window, click the left arrow ( ) in the upper left corner to go back to
the Composition timeline.
10 In the Timeline window, select city_music, and choose Object > Make Movie
Clip Group.
This will nest the city_music movie clip group into another (container) movie clip group.
In the next step, you’ll name the container appropriately.
11 With Group of 1 Objects selected in the Timeline window, choose Object > Edit
Name, enter city_music_container, and click OK.
12 Double-click on city_music_container in the Timeline window to drill down into the
movie clip group.
13 Click and drag the city_music_container duration bar to extend it to 00:03.
14 Click and drag the starting time of city_music movie clip to 00:01.
15 With the current-time marker at 00:00 in the Timeline window, click the Labels
button.
16 Name the label stop and then click OK.
LM_02.book Page 211 Thursday, May 23, 2002 10:05 AM
Once you become proficient with scripting, you will find it far more expedient to simply
type the script into the Script Editor window—especially in cases like this.
LM_02.book Page 212 Thursday, May 23, 2002 10:05 AM
212 LESSON 11
Adding Sounds to Your Composition
This targets the stop label in the city_music_container movie clip group and completes
the movie clip work for the first looping sound. Next, you’ll change the sound property.
31 Close the Script Editor.
LM_02.book Page 213 Thursday, May 23, 2002 10:05 AM
You can also use the Properties palette to change the volume and pan (shifting a stereo
signal from one channel to the other) of sounds over time. The first Volume or Pan keyframe
must be at the first frame of the sound object, and you cannot add more than six keyframes
per sound object.
LM_02.book Page 214 Thursday, May 23, 2002 10:05 AM
214 LESSON 11
Adding Sounds to Your Composition
216 LESSON 11
Adding Sounds to Your Composition
13 Select 11_Loop_Guitar (Event) in the Timeline window, and choose Solo Event
Sound from the pop-up menu in the Properties palette.
218 LESSON 11
Adding Sounds to Your Composition
5 Click the Movie Clip Navigator button in the Script Editor, and then select
mountain_button from the list.
6 Edit the mountain_button script onButtonPress script to read:
this.lmSetCurrentState("down");
_root.inner_door.lmSetCurrentState("mountain");
_root.city_music_container.city_music.gotoAndStop("start");
_root.beach_music_container.beach_music.gotoAndStop("start");
_root.home_music_container.home_music.gotoAndStop("start");
stopAllSounds();
_root.mountain_music_container.play();
7 Click the Movie Clip Navigator button in the Script Editor, and then select
beach_button from the list.
8 Edit the beach_button script onButtonPress script to read:
this.lmSetCurrentState("down");
_root.inner_door.lmSetCurrentState("beach");
_root.mountain_music_container.mountain_music.gotoAndStop("start");
_root.city_music_container.city_music.gotoAndStop("start");
_root.home_music_container.home_music.gotoAndStop("start");
stopAllSounds();
_root.beach_music_container.play();
9 Click the Movie Clip Navigator button in the Script Editor, and then select
home_button from the list.
10 Edit the home_button script onButtonPress script to read:
this.lmSetCurrentState("down");
_root.inner_door.lmSetCurrentState("home");
_root.mountain_music_container.mountain_music.gotoAndStop("start");
_root.beach_music_container.beach_music.gotoAndStop("start");
_root.city_music_container.city_music.gotoAndStop("start");
stopAllSounds();
_root.home_music_container.play();
220 LESSON 11
Adding Sounds to Your Composition
10 Click each of the location buttons, listen to the music, and play with the
volume controller.
3 Choose File > Export As, name the file with the .swf extension, and click Save to save
the file in the Lessons/Lesson11 folder.
Adobe LiveMotion creates an HTML file and a SWF file of your final composition, as well
as an HTML file that contains a report on the export settings.
4 Start a Web browser that can display SWF file format files, navigate to the
Lessons/Lesson11 folder, and open the HTML file of your composition.
LM_02.book Page 225 Thursday, May 23, 2002 10:05 AM
12 Working with
Dynamic Data
226 LESSON 12
Working with Dynamic Data
Getting started
In this lesson, you’ll learn how to do the following:
• Assemble a multi-page form.
• Use variable data fields for input and output.
• Create a password field.
• Use checkboxes to store variables.
This lesson takes approximately 45 minutes to complete.
You’ll begin this lesson by viewing the final composition in a Web browser.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson12
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For information, see
“Copying the Classroom in a Book files” on page 3.
1 Start a Web browser that can display SWF file format files, such as Netscape
Communicator or Microsoft Internet Explorer. (If the necessary plug-in is not installed,
animation will not be visible.)
2 Use the browser to open the file 12End.html from the Lessons/Lesson12/End folder.
3 Enter a name and password (swordfish) in all lower case, and then click the enter
button to explore the form. Fill in some form data on the next screen, and proceed
through the form.
Note: If you do not have enough memory to run a browser and LiveMotion at the same time,
quit the browser after viewing the animation.
LM_02.book Page 227 Thursday, May 23, 2002 10:05 AM
Variables
Until this point, our scripting has been fairly basic. Compositions have reacted to
OnButtonPress rollovers, and they’ve jumped around in the timeline. But we haven’t
worked with user data. For that, you’ll need to use variables. Variables allow you to collect
information from user input. Once that information is collected, it’s stored under specific
names, so that the data can be called upon and manipulated.
You might think of variables as cubby holes, or perhaps a wall of mailboxes in a post
office. Each of those cubby holes has a specific name, so that the mail (data) gets stored
in the right place until it is needed. The value of the data in each cubby hole can change
at any time.
There are three basic types of variable:
• Strings — most often used to store user input, strings contain a sequence of alphanu-
meric characters, i.e.: Joe Smith or 123 Main Street.
• Numbers — used to store numeric values.
• Booleans — true or false values.
LM_02.book Page 228 Thursday, May 23, 2002 10:05 AM
228 LESSON 12
Working with Dynamic Data
You can open the file 12End_main.liv at any time during the lesson to check your progress
against the finished LiveMotion version of the file.
3 Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
4 Choose Window > Timeline to open the Timeline window.
4 Enter coach_name in the Properties palette’s Var field. Set the typeface to Myriad, the
style to Roman, and the point size to 18.
5 Click the arrow at the top right of the Properties palette; then select Border and
Background from the menu.
6 Click and drag the new text field so that it aligns with the word Name.
230 LESSON 12
Working with Dynamic Data
232 LESSON 12
Working with Dynamic Data
This simple little script checks to see if the data entered in the _root.coach_password
variable is equal to the variable you defined as the_password in the onLoad handler.
If they are equal (in this case, the password swordfish), the composition plays and the
words Password Verified are displayed in the browser. If the data entered in the field does
not equal swordfish, the composition returns to the form_start label and then waits for
more input.
6 Close the Script Editor.
7 Select preview mode from the toolbox.
8 Try entering a name and password to see what happens.
If an error was made in typing the code snippets, LiveMotion’s Debugger window will
show you the problem.
9 Select edit mode from the toolbox.
10 Choose File > Save.
11 Select File > Preview in > your browser of choice.
It’s best to check interactive forms in a browser. (The text entered into the password field
will not be obscured in LiveMotion’s internal preview mode.)
When you preview the file in a browser, anything you enter in the Name field will appear,
while anything you enter in the Password field will be replaced by asterisks. Try entering
an incorrect password first, then try entering the correct password.
LM_02.book Page 233 Thursday, May 23, 2002 10:05 AM
The invalid_password movie clip has two states: normal and invalid. The text is visible in its invalid state, and
invisible in the normal state.
4 Shorten the timelines of invalid_password movie clip to 00:03 by clicking and dragging
its end time marker to the left.
5 Select the enter_button movie clip, then select Scripts > Script Editor to open the
Script Editor.
6 Select onButtonPress from the drop-down menu in the Script Editor. Add one line to
the script so that it reads:
LM_02.book Page 234 Thursday, May 23, 2002 10:05 AM
234 LESSON 12
Working with Dynamic Data
if (_root.coach_password == the_password) {
_root.play()
} else {
_root.gotoAndPlay("form_start");
_root.invalid_password.lmSetCurrentState("invalid");
}
7 Set a new insertion point below the words Our Team: and then type Their Team:.
8 Set a new insertion point below the words Their Team: and then type # of Paid Refs:.
9 Set a new insertion point at the top right of the composition and then type Score:.
10 Choose the selection tool from the toolbox, and reposition the text as necessary. Use
Object > Align to right align all of the text chunks (with the exception of Score:) on the
left side of the composition. Place Score at the upper right side of the composition.
236 LESSON 12
Working with Dynamic Data
The home_checkbox and away_checkbox use simple little scripts to affect each other.
When one checkbox is selected, it tells the other checkbox to change to its normal state.
"Hey, I’m selected and you’re not!" In addition, the script stores the applicable variable
information (in _root.home_away). With the home_checkbox selected, open up the
Script Editor and take a look at the onButtonRelease state:
this.lmSetCurrentState("selected");
// set other checkbox to normal state
_parent.away_checkbox.lmSetCurrentState("normal");
// set variable
_root.home_away = "1"
Now, select the Script Editor’s Movie Clip Navigator button, and select the
away_checkbox in the list. The onButtonRelease script provides the flip side of the coin:
this.lmSetCurrentState("selected");
// set other checkbox to normal state
_parent.home_checkbox.lmSetCurrentState("normal");
// set variable
_root.home_away = "2"
238 LESSON 12
Working with Dynamic Data
The scripting has been completed in the ref_checkboxes movie clip group, as well. Using
the same scheme as the Home/Away arrangement, the ref_checkboxes movie clip group
stores its variable as _root.number_of_refs.
3 Move the current-time marker to 00:09 in the Timeline window, and click the Script
button. This will summon the Script Editor. The drop-down menu will show 00:09 as the
current location of the keyframe script. Type:
stop()
LM_02.book Page 239 Thursday, May 23, 2002 10:05 AM
6 Select the check_button movie clip group and open the Script Editor.
7 Select the onButtonPress state, add a second line, and type:
_root.play()
240 LESSON 12
Working with Dynamic Data
If you want an output field to display the contents of a variable stored by other means, like
the Home/Away or # of Refs checkbox movie clip groups, you enter the applicable
variable name in the Properties palette. Again, you’ll leave the Properties palette’s Allow
user input in text field button unchecked.
9 Select the text field tool ( ), then click in the Composition window, next to the
second line of text (for reporting on your game of), and drag to create a text field.
10 Choose the selection tool in the toolbox.
LM_02.book Page 241 Thursday, May 23, 2002 10:05 AM
11 The new text field should be approximately 90 pixels wide by 30 pixels high. Adjust
the size as necessary via the Transform palette.
12 At the Properties palette, enter game_date in the Properties palette’s Var field.
13 Choose File > Save.
14 Select File > Preview in > your browser of choice.
4 The results box may have been placed as a movie clip group. If so, you’ll want to turn
off the movie clip attribute. Select Object > Movie Clip.
5 Choose File > Save.
6 Select File > Preview in > your browser of choice.
7 In the Timeline window, expand Group of 14 objects.
8 Select outcome_output, then select Scripts > Script Editor. Take a look at the if else
statement in the movie clips onLoad handler. The script has been written to determine
whether your team won, lost, or tied the game.
LM_02.book Page 242 Thursday, May 23, 2002 10:05 AM
242 LESSON 12
Working with Dynamic Data
The refs_output and home_away_output movie clips use if else statements in their
onLoad handlers, as well. Take a look at how their scripts work in the Script Editor by
selecting them with in the Movie Clip Navigator.
9 Close the Script Editor.
6 Select the Movie Clip Navigator in the Script Editor and then select submit_button.
LM_02.book Page 243 Thursday, May 23, 2002 10:05 AM
13 Advanced Interactivity:
The Game
254 LESSON 13
Advanced Interactivity: The Game
Getting started
In this lesson, you’ll learn how to do the following:
• Identify basic game components.
• Adjust game settings.
• Update an existing game.
This lesson takes approximately 60 minutes to complete.
You’ll begin this lesson by viewing the final composition in a Web browser.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson13
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For information, see
“Copying the Classroom in a Book files” on page 3.
1 Start a Web browser that can display SWF file format files, such as Netscape Commu-
nicator or Microsoft Internet Explorer. (If the necessary plug-in is not installed,
animation will not be visible.)
2 Use the browser to open the file 13End.html from the Lessons/Lesson13 folder.
Start your engines!
Note: If you do not have enough memory to run a browser and LiveMotion at the same time,
quit the browser after viewing the animation.
2 Choose File > Open and open the start file 13Start.liv from the Lessons/Lesson13
folder.
256 LESSON 13
Advanced Interactivity: The Game
The intro screen often uses three elements: a preloader, splash graphics, and game
instructions. The preloader sets up the first frame so that the movie waits for the entire
file to load. The splash graphics may use images from the game along with some fun
typography. The instructions tell the player the basics of the game. Simple games can get
away with one screen to cover all of these functions; more complex games may break these
functions into individual screens.
Our race car game does not use a preloader, as it has a small file size. The game
will merely sit and wait until the start button is clicked.
The playing field consists of backdrop graphics, over which the action takes place. The
action ensues when the player takes control over the actors (movie clips). A score box
(text field) tells the player how they’re doing.
The game-over screen tells the player whether they’ve won or lost. In addition, the game-
over screen gives the player the opportunity to play the game again.
LM_02.book Page 257 Thursday, May 23, 2002 10:05 AM
258 LESSON 13
Advanced Interactivity: The Game
this.gotoAndStop(l);
The hazards.
LM_02.book Page 259 Thursday, May 23, 2002 10:05 AM
_root.firstHazard = 1;
_root.lastHazard = 0;
_root.crashes = 0;
_root.maxCrashes = 5;
_root.spills = _root.crashes;
_root.totalhazards = 50;
_root.timeSinceLastHazard = 0;
_root.roadSpeed = 0;
_root.the_car.swapDepths(9999);
_root.the_car._x = 275;
_root.the_car._y = 300;
}
LM_02.book Page 260 Thursday, May 23, 2002 10:05 AM
260 LESSON 13
Advanced Interactivity: The Game
The moveCar function provides directional control over the race car, via the left and right
arrow keys, using the Key.isDown commands. The function starts out by telling the script
to ignore the arrow keys if the car is in the midst of a crash. MoveCar then checks for the
total number of crashes, before it allows directional control.
The car movie clip consists of a number of labeled frames. If the left arrow key is pressed,
the car movie clip jumps to the left frame where the car appears to be veering to the left.
Conversely, if the right arrow key is pressed, the car movie clip jumps to the right frame
where the car appears to be veering to the right.
The speed of the left and right movement is governed by the road speed, while the range
of movement is limited to the area between 150 and 400 pixels.
function moveCar() {
if (_root.the_car._currentFrame > 4) {
dx = 0;
_root.the_car.gotoAndStop("still");
} else if (Key.isDown(Key.RIGHT)) {
dx = _root.roadSpeed;
_root.the_car.gotoAndStop("right");
} else if (Key.isDown(Key.LEFT)) {
dx = -_root.roadSpeed;
_root.the_car.gotoAndStop("left");
} else {
// no key
dx = 0;
_root.the_car.gotoAndStop("still");
}
LM_02.book Page 261 Thursday, May 23, 2002 10:05 AM
_root.the_car._x += dx;
// go a little faster
The newHazard function controls the creation of hazards. It checks for the time between
hazards, starting only if the total number of hazards has not been exceeded. It then creates
a new hazard with the duplicateMovieClip command and uses a bit of randomness to
place the hazard.
Finally, the newHazard function sets the time delay and checks to see if the hazard was
struck before decreasing the time between hazards.
function newHazard() {
if (_root.timeSinceLastHazard > 5) {
_root.lastHazard++;
_root.Hazard.duplicateMovieClip("Hazard"+_root.lastHazard, _root.lastHazard);
_root["Hazard"+_root.lastHazard]._x = Math.random()*250+150;
LM_02.book Page 262 Thursday, May 23, 2002 10:05 AM
262 LESSON 13
Advanced Interactivity: The Game
_root["Hazard"+_root.lastHazard]._y = -50;
_root.timeSinceLastHazard = 0;
_root["Hazard"+i].hit = false;
_root.timeSinceLastHazard++;
The moveHazards function gives the game its feeling of speed. Since the road doesn't
actually move, the movement of hazards provides the illusion that the road is rushing by.
Just as importantly, the hit conditions are set. If a hazard is struck, the car movie clip
jumps to the crash frame–the car is spun and brought to a stop, before it heads back on
its way.
After that, the script checks to see if the maximum number of crashes has been met, thus
ending the game. If the maximum number of crashes has not been met, the play resumes
and the hazards continue to move.
function moveHazards() {
for (i=_root.firstHazard;i<=_root.lastHazard;i++) {
x = _root["Hazard"+i]._x;
y = _root["Hazard"+i]._y + _root.roadSpeed;
_root.crashes += 1;
_root["Hazard"+i].hit = true;
// spin racecar
_root.the_car.gotoAndPlay("crash");
_root.spills = _root.crashes;
// stop racecar
_root.roadSpeed = 0;
// is game over?
_root.removeAll();
_root.gotoAndPlay("lose");
_root["Hazard"+i]._y = y;
The removeHazard function removes Hazard movie clips at the end of their voyage from
the top of the screen to the bottom.
function removeHazard(n) {
LM_02.book Page 264 Thursday, May 23, 2002 10:05 AM
264 LESSON 13
Advanced Interactivity: The Game
_root["Hazard"+n].removeMovieClip();
_root.firstHazard = n+1;
if (n == _root.totalhazards) {
_root.removeAll();
_root.gotoAndPlay("win");
The removeAll function uses the removeMovieClip command at the end of the game to
clean up any remaining hazards, in addition to the car.
function removeAll() {
for (i=_root.firstHazard;i<=_root.lastHazard;i++) {
_root["Hazard"+i].removeMovieClip();
_root.the_car.removeMovieClip();
This script is placed into the actions movie clip’s onEnterFrame handler:
_root.moveCar();
_root.newHazard();
_root.moveHazards();
to:
_root.maxCrashes = 3;
Change:
_root.totalhazards = 50;
to:
_root.totalhazards = 25;
LM_02.book Page 266 Thursday, May 23, 2002 10:05 AM
266 LESSON 13
Advanced Interactivity: The Game
to:
_root.the_car._y = 200;
You may have noticed that the car’s hit area is overly generous; you really have to nail a
hazard squarely to initiate the crash sequence. This characteristic can be altered by
tweaking one line of code in the composition’s onLoad handler to expand the hit area to
a more realistic proportion.
Change:
else if ((_root["Hazard"+i].hit == false)&&(Math.abs(y-_root.the_car._y) < 60)&&(Math.abs(x-
_root.the_car._x) < 25)) {
to:
else if ((_root["Hazard"+i].hit == false)&&(Math.abs(y-_root.the_car._y) < 60)&&(Math.abs(x-
_root.the_car._x) < 60)) {
272 LESSON 14
Writing Automation Scripts and Live Tabs
Getting started
In this lesson, you’ll learn how to do the following:
• Use automation scripts to create new LiveMotion objects.
• Use the Script Editor to edit and debug automation scripts.
• Use the Automation menu to load automation scripts and Live Tabs.
• Create a Live Tab that makes 3D-style buttons with customizable features.
This lesson takes approximately 45 minutes to complete.
You’ll begin this lesson by learning to use LiveMotion 2.0’s tools to write automation
scripts in the JavaScript language.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson13
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For information, see
“Copying the Classroom in a Book files” on page 3.
The exercises in this lesson are designed to give you a glimpse at the potential of
LiveMotion 2.0’s automation capabilities. To fully exploit these new tools, you will need to
learn JavaScript and become familiar with the contents of the LiveMotion 2.0 Scripting Guide
and the LiveMotion 2.0 Automation Scripting Guide. The Scripting Guide manual is
included in the LiveMotion 2.0 package and also available in HTML format by selecting
Scripting Guide from LiveMotion 2.0’s Help menu. The Automation Scripting Guide is part
of the LiveMotion 2.0 SDK. The SDK and additional resources for learning about JavaScript
can be found at http://www.adobe.com.
LM_02.book Page 273 Thursday, May 23, 2002 10:05 AM
There are many useful automation scripts included with LiveMotion 2.0. To check them
out, take a look in the Automation/Scripts and Script Resources/Samples/Automation Scripts
folders on the drive where LiveMotion 2.0 is installed.
274 LESSON 14
Writing Automation Scripts and Live Tabs
We’ll start with a short and easy script that performs only one task: It opens a new
Composition window. The piece of code that does all the work is:
var comp = application.newComposition();
Notice all the lines that contain forward slashes. In JavaScript parlance, these are known
as comments. Comments are not acted on by the JavaScript interpreter, which is the brain
that tells Live Motion what to do with the script code. There are two types of comments. The
first four lines demonstrate the block comment. Anything between the /* and */ is ignored
by the interpreter. The second type of comment is identified by the double forward slashes.
Anything on a line that comes after the double slashes is also ignored. Comments are not
only useful for describing the contents of the script, but also for temporarily turning lines of
code off.
3 Click the Run script button at the top left of the Script Editor to create your new
Composition window.
If you typed the statements exactly as shown, execution of the script stops and the
Debugger window appears. Look in the Variable window and you’ll see that the Debugger
Message is: console is undefined. This error demonstrates how finicky the JavaScript
interpreter can be. Because the word Console is a keyword, it needs to be spelled with a
capital C. However, this sensitivity does not extend to other items contained in scripts,
such as variables. Now you can see why investing time to learn more about JavaScript will
be necessary if you want to write more advanced automation scripts.
LM_02.book Page 275 Thursday, May 23, 2002 10:05 AM
276 LESSON 14
Writing Automation Scripts and Live Tabs
1 Choose File > Save As, and navigate to the folder where LiveMotion 2.0 is installed.
Inside this folder, go to the Automation/Scripts folder, type 14CreateNewComposition.js
and then click OK.
Any files with the .js extension saved in this folder will be shown on LiveMotion 2.0’s
Automation > Scripts menu.
2 Close the Script Editor.
3 Select Automation > Scripts to view the menu of available automation scripts. Note
that the file you just saved does not appear on the list. This is because LiveMotion needs
to update the inventory of files in the Automation/Scripts folder.
4 Select Automation > Refresh Menu to have LiveMotion update the menu of
automation scripts.
5 Select Automation > Scripts > 14CreateNewComposition and watch as the script sets
up a new Composition window, complete with notification —via the Console window —
that all went as expected. You can run the script again by selecting Automation > Run
Last Automation.
To run a script that is not in the Automation/Scripts folder, you’ll need to select
Automation > Run Automation Script and then use the dialog box to navigate to the
folder containing the script file.
Setting up variables
Generally, the first step in writing a script is setting up variables. Variables can be
compared to containers for objects, or specific aspects of the objects. After you’ve named
the variable, the object that it contains can be manipulated by LiveMotion simply by
prefacing a command with the variable name.
1 Click the cursor in the Script window and type the following:
var comp = application.currentComposition;
var textColor = "black"
These first line sets up a variable that allows the script to send commands to the currently
selected composition; this composition is now known by the name comp. The second line
creates a variable named textColor to contain the color of the text. It’s value has been
assigned as the text string "black".
This piece of code creates an empty type object that can be addressed by the variable
named buttonText. The portion of the statement on the right side of the equal sign is
where the real magic happens; first, it tells LiveMotion to create the new object in the
composition named comp. Next, the information inside the parentheses define the object
to be Point Text (as opposed to Dynamic Text) and sets its left edge, baseline and z-order
in the Composition window.
2 On a new line in the Script window, type the following:
buttonText.text = "Test";
This line defines the actual word (or words) that will be displayed by the text object.
Technically, it sets the text property of the buttonText object to whatever is typed between
the quote marks. When this script is run, the word Test will appear in the composition;
however, you can change this by substituting any text you like.
LM_02.book Page 278 Thursday, May 23, 2002 10:05 AM
278 LESSON 14
Writing Automation Scripts and Live Tabs
Formatting type
Defining a Point Text object’s properties, such as font name, type style, and size via
scripting is not as straightforward as using LiveMotion’s interface. Changing these
properties programmatically requires much more explicit directions.
1 Start a new line, and enter the following lines of code:
var txtLength = buttonText.text.length;
var txtRun = buttonText.createTextRun(0,txtLength)
txtRun.font ="Myriad Roman";
txtRun.textSize = 20;
The first line of code ascertains the number of characters in the type object by reading the
length property of the buttonText object. The length property returns a number which is
assigned to the variable txtLength. In our case, the value of txtLength would be 4; the
amount of letters in the word Test.
The second line sets up an object called a text run. A text run is a way of defining a
selection. This is equivalent to a LiveMotion user clicking and dragging inside a text
object to select a portion, or all, of the characters. In our script we want to set the
properties of all of the characters in our text object. So, the starting position for our
"selection" is set to 0 and the end to the fourth character. The particulars of our selection
are assigned to the variable named txtRun.
The next two lines actually set the font and type size. This is accomplished by setting the
font and textSize properties of the characters defined in the variable txtRun.
If you do not define a specific font, style, or size for your text object, LiveMotion 2.0 will
create the object using default values. The defaults will vary according to each system and the
resources available. This would also be the case if a script called for a font name or style that
was not installed on the system.
This is the first portion of the if statement. The first line checks to see if a particular
condition is true. In our script, we are asking: is the variable textColor equal to the word
"black"? If the answer is true, the script carries out any instruction enclosed in the first set
of curly braces. In this case, it sets the color values (RGB) of our text object’s base layer
(layer 0) to zeros. This is equivalent to setting the RGB color sliders on LiveMotion’s Color
palette to all zeros.
Running this script will create the word Test and always make it black because we
explicitly set the variable textColor to the word "black" at the beginning of our script. But,
let’s say that if the textColor variable is set to any value other than "black", we want the
color of the word to be white (R255, G255, B255). To give our script this capability we
need to add another section to the if statement.
2 Start a new line in the Script Editor and then enter the following lines:
else
{
buttonText.layers[0].colorGradient.startColor.red = 255;
buttonText.layers[0].colorGradient.startColor.green = 255;
buttonText.layers[0].colorGradient.startColor.blue = 255;
}
Now we have an alternative — black or white — for our type object’s color setting. The
only way to see this alternative ending in action, however, is to change the textColor
variable in our script. But first, let’s see if our script functions the way we expect.
280 LESSON 14
Writing Automation Scripts and Live Tabs
Either comment out this line with a double forward slash (//) or change the word "black"
to anything else. Don’t remove the quotes — the interpreter won’t like it!
4 Run the script again. The word Test should be white. If your composition’s background
is white, change it so you are able to see the type.
• The code for creating the Live Tab is much longer and more complicated — it would
simply take too long to go into the specifics of each statement, function, or property.
Open the ButtonMaker.liv file in the Lessons/Lesson14/End folder, and use the Script
Editor to examine the script code. Many comments have been added to aid your under-
standing of each section of the code.
• There are many, many ways to accomplish any specific task — it’s better to try and
understand a program’s functionality first and then see how specific code fragments
contribute to that functionality.
• The real power of LiveMotion’s Live Tabs is your imagination — designing the look and
feel of your visual interface and its components is the real fun. Have a blast and don’t get
trapped into designing Live Tabs that look like someone else’s designs.
In addition to the LiveMotion 2.0 Automation Scripting Guide, there are several Live
Tabs found in the LiveMotion/Automation/Live Tabs folder that you should open and
examine in the Script Editor. Seeing how others have handled specific issues is an invaluable
learning resource.
282 LESSON 14
Writing Automation Scripts and Live Tabs
1 Open LiveMotion 2.0, select File > New Composition, and then select Load Live Tab
from the Automation menu.
2 Use the Open Live Tab dialog box to navigate to the Lessons/Lesson14/End folder, and
select the ButtonMaker.liv file.
3 Try out the Live Tab to get feel for it’s functionality. Try to make it work on more than
one object or on an object that is not filled with a linear gradient. Notice the error
feedback in the Console window. See how the Live Tab works on text objects. When you’re
satisfied that you understand how the Live Tab is supposed to work, move onto the next
section to start building your own version of ButtonMaker.
284 LESSON 14
Writing Automation Scripts and Live Tabs
Exporting as a Live Tab is essential. This option tells LiveMotion that the .liv file can be
loaded as a Live Tab. Saving the .liv file in the Automation/Live Tabs folder and issuing the
Refresh Menu command makes the Live Tab available on LiveMotion’s Automation > Live
Tabs menu. You can check this and see that ButtonMaker is one of the Live Tabs listed.
This instructs the script to go to the composition’s root timeline and execute the doIt
function. The doIt function does all the real work; we’ll get to that last.
Don’t forget to periodically save your work. It’s good practice to save before you test or
debug your scripts. You never know what kind of error you could run across that would make
the program unstable and cause you to lose your work.
4 Select on from the drop-down list of available states, and type the following into the
Script window:
this._alpha = 100;
on = true;
off = false;
5 Select the off state from the drop-down list, and type the following:
this._alpha = 0;
on = false;
off = true;
6 Select the rim object under Radio_White, and click the State scripts button. Select
down from the list of available states, and enter the following:
_root.Radio_White.dot.lmSetCurrentState("on");
_root.Radio_Black.dot.lmSetCurrentState("off");
_root.Radio_Black.rim.lmSetCurrentState("off");
That’s it for the Radio_White object. The code in Step 1 turns the white radio button off.
The next two lines set up variables that will be used to communicate the radio button’s on
or off state to the doIt function. Steps 4 and 5 control the look of the button, depending
on its state. Step 6 reacts when the user clicks the white button by turning off the black
radio button. Now you’ll tackle the Radio_Black button code.
7 Select the dot object under Radio_Black, and click on the Handler scripts button.
8 Choose onLoad from the list of events, and enter the following code:
on = true;
off = false;
9 Click the State scripts button, choose on from the list of available states, and type the
following into the Script window:
this._alpha = 100;
on = true;
off = false;
10 Choose off from the list of states and enter the following:
this._alpha = 0;
on = false;
off = true;
LM_02.book Page 286 Thursday, May 23, 2002 10:05 AM
286 LESSON 14
Writing Automation Scripts and Live Tabs
11 Select the rim object under Radio_Black, choose down from the list of states, and type
the following into the Script window:
_root.Radio_Black.dot.lmSetCurrentState("on");
_root.Radio_White.dot.lmSetCurrentState("off");
_root.Radio_White.rim.lmSetCurrentState("off");
Now you have a set of radio buttons that will work together and allow your Live Tab to
make either a black or white button label. This would be a perfect time to save your file
and test your work.
12 Select File > Save, and select View > Preview Mode.
Click on the radio buttons and watch how the script code causes them to act in unison.
If you press the Apply button, the Debugger window will appear with the message:
MovieClip.doIt is not a function. Not to worry. Click the Kill button on the Debugger
toolbar and then click OK in the dialog box informing you that Live Motion has shut
down your Live Tab. Next, you’ll start working on the brains of ButtonMaker: the
doIt function.
if (!application.compositions.length)
{
Console.show();
Console.write("There is no active composition open.\n");
return;
}
if (!comp.selection.length)
{
Console.show();
Console.write("You must select something first.\n");
return;
}
else if (comp.selection.length >1)
{
Console.show();
Console.write("Select only one object.\n");
return;
}
beginUndoAction(comp);
The last line enables the Undo command in LiveMotion’s Edit menu. If you don’t
explicitly include this code (along with the matching completeUndoAction that will be
added to the end of your script) you won’t be able to undo the changes ButtonMaker
makes to your original composition.
3 Save the file.
At this point, you don’t have enough code to even test your Live Tab. But when you do,
don’t use LiveMotion’s Preview mode. Instead, make sure you’ve saved the latest changes
made to the script and then select Automation > Live Tabs > ButtonMaker.
288 LESSON 14
Writing Automation Scripts and Live Tabs
currentObj.name = "Top";
The preceding lines take the selected object and assign it to a variable name that will be
easier to work with. After some information is gathered and stored in variables, a final
check ensures that the selection is filled with a linear gradient. If everything checks out,
the object’s name property is set to Top.
The fifth line tweaks the corner radius of the selected object if it happens to be a round
rectangle. This makes the bezel width look more uniform. The sixth line places the bezel
behind the Top object.
LM_02.book Page 289 Thursday, May 23, 2002 10:05 AM
copyObj.addState(LMStateType.mouseDown);
copyObj.currentState = LMStateType.mouseDown;
copyObj.layers[0].colorGradient.angle += 180;
The variable scriptPress is used to hold the code that currently exists in the various event
handlers and then appends the additional code generated by our script. Now, clicking on
a button will trigger a change in the state of the Bezel object.
buttonText.text = buttonName;
LM_02.book Page 290 Thursday, May 23, 2002 10:05 AM
290 LESSON 14
Writing Automation Scripts and Live Tabs
if (blackOn == true)
{
buttonText.layers[0].colorGradient.startColor.red = 0;
buttonText.layers[0].colorGradient.startColor.green = 0;
buttonText.layers[0].colorGradient.startColor.blue = 0;
}
else
{
buttonText.layers[0].colorGradient.startColor.red = 255;
buttonText.layers[0].colorGradient.startColor.green = 255;
buttonText.layers[0].colorGradient.startColor.blue = 255;
}
This section demonstrates the beauty of scripting: Well-thought-out code can be easily
copied and pasted into other scripts and Live Tabs.
comp.align(tempObj, LMAlignType.centers);
buttonGrp.name = "Button_Group";
buttonGrp.isMovieClip = true;
completeUndoAction(comp);
}
LM_02.book Page 291 Thursday, May 23, 2002 10:05 AM
After the text object is given a little nudge to help it align correctly later, all the objects are
placed into an array. All the elements in the array are then aligned on centers, grouped,
given a distinctive name, and finally made into a movie clip.
The script finishes with the all-important completeUndoActon statement and the even-
more-important closing curly brace. If you leave off this last character, the debugger will
rear it’s ugly head immediately.
292 LESSON 14
Writing Automation Scripts and Live Tabs
You may have already thought of other features that could be added to the ButtonMaker
Live Tab that would enhance the look of your 3D buttons. For example, you could add a
drop shadow to the button’s label. You might even allow the user to control the offset
position and softness of the shadow.
Now that you’ve gotten a taste of the power of automation scripting and the flexibility that
Live Tabs offer, you’re probably already thinking of tons of projects where you can apply
your new-found skills. The cool thing about Live Tabs is that you can put any visual
interface you can think of onto a script. It’s a snap to put a different the look on the
ButtonMaker Live Tab.
Open the ButtonMakerPurple.liv file in the Lessons/Lesson14/End folder to see a bold, new look for the Live Tab.
LM_02.book Page 295 Thursday, May 23, 2002 10:05 AM
15 Exporting
296 LESSON 15
Exporting
Getting started
In this lesson, you’ll learn how to do the following:
• Choose which export format best suits your composition.
• Use the Export palette.
• Adjust object settings for optimal size and quality.
• Export to different formats.
• Optimize SWF exports.
This lesson takes approximately 45 minutes to complete.
If needed, remove the previous lesson folder from your hard drive and copy the Lesson15
folder onto it. As you work on this lesson, you’ll overwrite the start files. If you need to
restore the start files, copy them from the Adobe LiveMotion 2.0 Classroom in a Book CD.
Note: Windows users need to unlock the lesson files before using them. For more information,
see “Copying the Classroom in a Book files” on page 3.
• The GIF format is a good choice for compositions with solid areas of color and sharp
detail, such as line art, logos, or illustrations with type.
• The JPEG file format is designed for use with raster images, and other continuous-tone
graphics. It preserves the broad range and subtle variations in brightness and hue found
in photographs.
• The PNG-Indexed format is a good choice for compositions with solid areas of color
and sharp detail, such as line art, logos, or illustrations with type.
• The Photoshop file format exports a flattened image (an image without any layers) to
the Adobe Photoshop format. Photoshop, Adobe ImageReady™, and Adobe Illustrator
can open a LiveMotion composition that is exported to this format.
• PNG-Truecolor preserves the broad color and tonal range of photographic images. The
Truecolor format is good for small bitmaps; the JPEG format is better for large bitmaps
(over 100 x 100 pixels).
298 LESSON 15
Exporting
2 Choose Window > Reset To Defaults to restore all of the palettes to their default settings.
3 In the toolbox, click the Preview Mode button ( ) to preview the file animation. Note
the animation of the wheel at left and the rollover effects on the images at right.
4 Click the Edit Mode button ( ) to return to Edit mode.
3 In the URL text box, enter origins.html. This is the page to which this image will link.
ALT text is text that displays if an image is not loaded, or, in some browsers, when the
mouse is over the image.
4 In the ALT text box, enter origins.
When you create a link from one Web page to another, you can choose how the new page
will open. You can replace the original page in the browser window with the new one, or
you can have the new page open in a separate browser window. In LiveMotion, you
control this with the Window option. In this case, you will leave the Window text box
blank, meaning the original page will be replaced in the browser window.
LM_02.book Page 299 Thursday, May 23, 2002 10:05 AM
Additional export
format setting
The top drop-down menu is used for choosing the format to which your composition is
exported. Selecting the Preview Export Compression button allows you to see how your
composition will look with the current export settings.
The second drop-down menu provides additional options for the chosen export format.
You’ll experiment with different settings to see how they affect your composition.
LM_02.book Page 300 Thursday, May 23, 2002 10:05 AM
300 LESSON 15
Exporting
2 Choose JPEG as the current export format from the Export format setting menu, and
select Preview Export Compression.
Notice the file size in the status bar at the bottom of the Composition window. The left
number is the file size ( ), and the right number is the size of any selected objects ( ).
If nothing is selected, no number is shown to the right.
3 Enter 0 for the Quality setting. Notice the decrease in image quality, and in file size.
Return the setting to its default of 100.
4 Change the current export format to Macromedia Flash (SWF).
In .swf files, some objects are exported as vector objects and some as bitmap objects. You
can choose the export format for any rasterized images in the second menu from the top.
5 In the Composition window, select the photo of the bicycling family. Notice the bitmap
icon ( ) that appears to the right of the object size in the status bar. This indicates that
the selected object is a bitmap object.
6 Now, select the black bicycle wheel in the Composition window. Notice the vector
icon ( ) that appears to the right of the object size in the status bar. This indicates that
the selected object is a vector object.
A selected bitmap image and the bitmap icon, and a selected vector drawing and the vector icon.
LM_02.book Page 301 Thursday, May 23, 2002 10:05 AM
You can create settings for individual components as well as for the entire composition.
Controlling the file format and quality for individual objects helps you determine file size.
7 With the current export option still set to SWF, select the image of the bicycling family
in the Composition window.
8 In the Export palette, click the Create a new object setting button ( ). The button at
the lower left of the Export palette indicates that the palette is in object setting mode,
rather than document setting mode.
9 In the additional export format settings menu, choose JPEG. Enter 100 for Quality, and
8 for Opacity Resolution.
10 Select the Document export settings button at the lower left of the Export palette.
Notice that the export settings for the document as a whole are unchanged.
11 Choose View > Preview Export Compression to turn off export compression preview.
302 LESSON 15
Exporting
2 In the Export palette, choose GIF from the Export format setting bottom
drop-down menu.
3 Choose File > Export. Choose a location to which the file will be exported, and
click OK.
4 View the exported HTML page in a Web browser.
Note: In your Web browser, choose the View Source Code option. Look at the source code of
the page that is generated. Notice that the images that line the right side of the composition
have been given the names you set in the Web palette. You can also see that Javascript is
automatically generated to allow the functionality of the rollovers.
Export options
A lot of factors determine the best way to export files. Each format has specific strengths.
To get the best output, you will need to balance file size, file quality, and compatibility.
For example, .swf files convert non-vector or multilayer objects to bitmaps, which can
increase file size. If you have a lot of gradient or opacity animations within your file, your
.swf file may be very large. Both SWF and PNG can require a plug-in, which limits the
accessibility of these images to people without the plug-in installed. GIF and JPEG
compositions that include rollover effects require a Javascript-enabled browser, which
can also limit accessibility, but is more common than the .swf or PNG plug-ins. In this
lesson, the two best options are to export the composition as a .swf file, or as an
AutoLayout GIF HTML page. The .swf file is smaller, but less compatible.
You can optimize file size by creating export settings for individual objects, as you did
previously in this lesson. If you choose to export to .swf, the composition will be exported
as a single file, and any non-.swf settings will be ignored. A sliced composition set as GIF
or JPEG cannot render any slices as a SWF file.
Exporting as SWF
LiveMotion exports SWF files with all of the bells and whistles.
1 In the Export palette, choose Macromedia Flash (SWF) from the export mode menu.
2 Choose View > Preview Export Compression.
3 In the Composition window, select the large black bicycle that fades out behind
the images.
LM_02.book Page 303 Thursday, May 23, 2002 10:05 AM
4 In the Export palette’s second menu, choose JPEG. Adjust the Opacity Resolution
slider, and notice how the bicycle is affected.
5 Enter 6 for Opacity Resolution.
6 Choose File > Export to export the composition to the .swf format.
7 View the exported HTML page in a Web browser.
Export report
When exporting to .swf format, LiveMotion automatically generates an export report, providing information
about download times, possible lags in the streaming process, and export settings.
The report is segmented into four sections: overview, download times, streaming, and resources. Overview
gives the size, duration, and number of frames of the animation.
Download times shows how long the animation will take to download on a 14.4, 28.8, or 56k modem
(assuming transfer rates of 1.2 kBps for 14.4, 2.3 for 28.8, and 4.7 for 56k modems). The streaming table lets
you find potential trouble spots in the streaming process. For each frame, it shows how many frames will be
preloaded on any of the three modem speeds listed above. Any table cell that is red indicates that the specific
modem speed will cause a pause in the animation to allow more frames to download before it can continue.
This is a good method for determining how long an introductory “Wait for Download” animation should
play. You can create a label past the last frame that shows the potential for pausing, and use that as your
“Wait until” label in a Wait for Download loop.
The resources section lists all bitmapped images, sprites (animated objects), and shapes in the animation at
any particular frame. Information for each is given, including file size and name of the object, allowing you
to see exactly how big each exported item is.
LM_02.book Page 304 Thursday, May 23, 2002 10:05 AM
304 LESSON 15
Exporting
Exporting as GIF
1 In the Export palette, choose AutoLayout and GIF from the top two drop-down
menus, and make sure Active Preview mode is selected.
2 Select the image of the bicycling family.
Because this image is a photograph, we should change its object settings to JPEG to
produce a higher image quality.
3 Choose the Create a new object setting button at the bottom right of the Export palette.
Choose JPEG for the object export setting, and enter 35 for the image quality.
There is very little degradation in the quality of the image, but the file size is greatly
reduced. You can do this for each of the image objects that appear on the right side of
the composition.
4 Choose Edit > Composition Settings.
5 In the Export palette, select AutoLayout from the menu, and verify that Export HTML
Page is selected.
6 Choose File > Export to export the composition.
Note: LiveMotion creates an image for every rollover state of an exported slice, whether or not
the image has changed. Having these other rollover states will create additional files per slice,
with letters added to the filename to indicate which state the file represents. For example, the
over state for the origins image will generate the file originsov. Each of these images is called
in the Javascript in the generated HTML. If you are comfortable with Javascript, you can
remove references to these extra images, and delete the images to save download time.
LM_02.book Page 305 Thursday, May 23, 2002 10:05 AM
306 LESSON 15
Exporting
• Outlined objects with gradient fills—avoid using a gradient fill on an outlined object.
Apply a gradient fill to a compound path object. When properly executed, this will look
exactly the same (minus the petnapping).
• Double-burst gradient fills—objects with a double-burst gradient fill will output
as bitmaps.
• Cropping an object—try using the Combine Minus Front function, rather than using
the crop tool.
It’s possible in many cases, nonetheless, to create complex effects with bitmaps that are
smaller than a pure vector implementation. That’s why it’s important to experiment and
repeatedly test your compositions.
Try to set the composition bitmap export settings for the smallest possible file, without
negatively impacting the overall quality. Deal with individual objects using per object
compression settings as necessary.
308 LESSON 15
Exporting
Simplify paths
The fewer the control points in a path, the smaller the exported object. If you can describe
an object with six control points, rather than three dozen, by all means do so.
• Movies can be unloaded from a layer with the Unload Movie behavior. This behavior
does not target specific movies; it only targets the layers. You may also use the Replace
option (as opposed to Append) to kick a movie out of a layer.
• Load Movie cannot be previewed within LiveMotion, nor can they be previewed
with the File > Preview In > Your Browser of Choice feature. You must export the
SWF with the directory structure intact. (Make sure that you’re calling the movies
from their actual locations.)
Breaking up a large SWF site into separate components provides additional benefits.
Once your site is up and running, you can determine the popularity of certain movies by
analyzing the server logs. With separate components, it’s easy to spot what’s hot and
what’s not. Over time, you can streamline your container document to preload the most
frequently requested pieces.
Congratulations! You have completed the Adobe LiveMotion 2.0 Classroom in a Book. Now
you’re ready to create your own animated Web compositions.
LM_02.book Page 311 Thursday, May 23, 2002 10:05 AM
Index
A Auto Bezier command 88 removing 65
Actual Size command 13 Automation scripts 271 convert
Add Keyframe checkbox 86 Illustrator artwork 175
adding links 298 B corner points 63, 67
adding URLs 298 Back One Frame button 88 current-time marker 84
Adjust palette 55 background color box 18
aliases 141, 307 Bezier curves 65 D
Align command Break Apart Text command 53 Debugger 274
Bottom 50, 53 ButtonMaker 280 Deselect All command 11
Centers 28, 33 direction lines 63, 64
Left 142 C direction points 63, 64
Top 51 canvas 10, 12 Distribute command
ALT text 298 Color palette Horizontal 50
animated rollovers 159 RGB View 17 Vertical 142
animated sequences 183 Combine command drawing
animation Exclude 51 paths 61
Auto Bezier command 88 Minus Front 36, 53 pen tool 61
layer properties 85 Unite 36 shapes 25
lighting 120 Unite with Color 29, 34 Duplicate command 109
Linear command 89 combining objects 29 Duplicate Rollover State button 147
object attributes 85 Composition Settings duration bars 83
opacity 122 command 13 dynamic data 225
opacity gradient angle 124 dialog box 13
playing 87 composition settings 301 E
playing frame-by-frame 88 editing 13 Ease In command 106
position 85 frame rate 14 Ease Out command 106
rotation 90 Composition window Edit mode 19
scale 91 about 10 Edit Name command 160
scrubbing 88 offscreen area 12 Edit Original command 54
sounds 130 resizing 11 ellipse tool 32
stacking order 109 Console 274 Export commands 299
time stretching 93 constraining proportions 38 Export palette 299
transform properties 85 control points Export report 303, 305
Apply Sound button 149 adding 62 export settings
Arrange command adjusting 69 compositions 299, 301
Send Backward 111 converting 63 individual objects 301
moving 63 optimizing 302
LM_02.book Page 312 Thursday, May 23, 2002 10:05 AM
312 INDEX
314 INDEX
V
variables 227, 277
viewing the Timeline window 83
volume controller 219
W
wait for download 200
Web palette 298
Z
Zoom In command 12
zoom levels 83
Zoom Out command 12
zoom tool 12
zooming 11
LM_02.book Page 315 Thursday, May 23, 2002 10:05 AM
Production Notes
This book was created electronically using Adobe FrameMaker ®. Art was produced
using Adobe Illustrator, Adobe ImageReady, Adobe LiveMotion, and Adobe Photoshop.
The Minion® and Myriad families of typefaces are used throughout the book.
Photography
Photographic images, video clips, and audio clips provided are intended for use with
tutorials only.
Auria™ CDs by Gira™ Sound: Lesson 11 audio clip (Song.aif).
Lisa Milosevich: Lesson 3, photograph (Warehouse).
National Archives and Records Administration: Lesson 15 photographs
(4-Wheeled bicycle, Child on bicycle, Family with bicycles).
For more information on the ACE and ACTP programs, go to partners.adobe.com, and look for these programs
under the Join section.
LM_02.book Page 73 Thursday, May 23, 2002 10:05 AM
Review Project A:
Creating Objects
Creating effects
Creating text
Drawing shapes
Using masks
In this review project, you’ll use the techniques you learned in Lessons 1 through 4 to
create a greeting card. You’ll use the tools and palettes to create objects, modify them, and
create effects. Then you’ll use masking to complete the project. Your greeting card doesn’t
need to look just like ours; simply follow along and use your LiveMotion knowledge to
complete the steps.
74 REVIEW PROJECT A
Tools and Palettes
Make a greeting
1 Use the text tool to create text.
2 Place the text in the gray rectangle.
Make a flower
1 Draw five circles, and arrange them in a circle to create the petals of a flower. Group the
circles and send the group backwards.
2 Draw a smaller circle and place it on top of the petals. Group the circle and the petals,
then combine them, minus the front.
3 Use the pen tool to draw a stem and leaves for the flower.
4 Group the petals, leaves, and stem.
5 Color the flower white, and place it in the black rectangle.
Adjust a texture
1 Select the textured rectangle next to the leaf.
2 Change the Saturation setting in the Adjust palette to increase the texture’s color
intensity.
Make masks
1 Draw a rectangle slightly larger than the green flowered rectangle. Drag it on top of the
green rectangle.
2 Bring the new rectangle to the front.
3 Select both rectangles, group them, and make the top object a mask.
4 Draw a rectangle slightly larger than all the elements of the card. Drag it on top of
the card.
5 Bring the rectangle to the front.
6 Select all the objects, group them, and make the top object a mask.
LM_02.book Page 135 Thursday, May 23, 2002 10:05 AM
Review Project B:
Basic Animation
Animating position
Animating rotation
Adding sound
In this review project, you’ll use the techniques you learned in Lessons 5 through 7 to
create an animated winter scene. You’ll make elements of the animation move, rotate, and
loop. You’ll also add a song that will play through the animation. Your scene doesn’t need
to look just like ours; simply follow along and use your LiveMotion knowledge to complete
the steps.
Add music
1 Double-click “Audio” to open the movie clip group.
2 Drag Snowman.aif from the Lessons/LessonB folder onto the timeline.
3 Drag the “Snowman (Event)” duration bar so that the sound loops 20 times.
LM_02.book Page 247 Thursday, May 23, 2002 10:05 AM
Review Project C:
Movie Clip Groups
Animating movie clip groups
Adding interactivity
Creating animated and remote rollovers
In this review project, you’ll use the techniques you learned in lessons 8 through 11
to make a wire figure move in and out of the composition, and another figure move along
a series of animated rectangles. You’ll do all this by creating movie clip groups. You’ll then
create rollovers and add scripts to trigger the animations you created.
Your animation doesn’t need to look just like ours; simply follow along and use your
LiveMotion knowledge to complete the steps.