Professional Documents
Culture Documents
In this tutorial you will see how easy it is to bring video and graphics together for a
seamless, custom experience using Flash Professional CS5. You’ll learn how to import
video, apply a custom skin, and create your own video buttons without writing any
ActionScript code. Then you’ll learn how to add cue points, making synchronization
between video and graphics a snap. Let’s take a tour of these capabilities.
13 SET UP GRAPHICS
Since you don’t want all the movie clips to appear at the beginning of the movie, you
need to set their visibility to false using ActionScript. In order to control the movie clips
with ActionScript, they first need instance names. Select the john movie clip and in the
Properties panel give it an instance name of “john.” Give the agencies movie clip an
instance name of “agencies” and the nonprofit movie clip an instance name of
“nonprofit.” Select the first frame of the Actions layer and open the Actions panel
(Window>Actions). Using those instance names, set the visibility of each movie clip to
false as shown above.
[If you’d like to download the file used in this tutorial to practice these techniques, visit
www.layersmagazine.com and navigate to the Magazine section. All files are for personal
use only.]
Let’s face it, in the past new Flash users had to deal with a dauntingly empty Actions
panel and advanced users had to pillage previous projects to speed up development. Flash
CS5 has changed all this with the introduction of the surprisingly easy Code Snippets
panel, advanced code hinting, and custom class introspection. Let’s take a look.
5 CENTER HORIZONTALLY
Before we can center the image, we need to determine where the center of the Stage and
image is. To determine the horizontal center of the Stage, we need to get the Stage width
and divide by two. Apply this to the x position of the image and it will only put the left
edge of the image in the center. So, we need to also get the center of the image and
subtract that from the stageWidth. Then we can apply it to the x position of the image.
Add the line of code circled above to the imageLoaded function.
6 CENTER VERTICALLY
Centering the image vertically is done similarly to centering the image horizontally. Get
the stage height and divide by two to get the center. Then, get the height of the image and
divide by two. Subtract the center of the Stage from the center of the image, then apply
that to the image’s y position. Review the image here and add the circled line to center
the image vertically.
Adobe flash CS4 has introduced a great new tool named Bone Tool that uses Inverse
kinematics (IK) for creating animations. Bone tool is a great addition especially for flash
cartoon designers, as it speeds up development and gives a realistic look to their cartoon
animations.
Concept of Bone Tool in flash is taken from human body, and it simply works like
human bones. In this tutorial we will see how adobe flash cs4 bone tool can help us
achieve real human body like movements in just few clicks using Inverse kinematics
(IK).
A Little Experiment:
To understand real implementation of flash cs4 bone system and use of inverse
kinematics, let's do a quick experiment. Raise your hand in front of you straight, with
your palm facing the sky. Now touch your shoulder with fingers of same hand.
What has happened is, two bones of your arm, one from shoulder till elbow, and other
from elbow till your hand have moved, bending at elbow joint, thus enabling you to touch
your shoulder.
We will mimic the same bone structure in this tutorial using the bone tool, and see how
flash will automatically constraint our drawing’s movements to comply with human arm
like motions only.
Above image shows a vector graphic of human arm which we will use to learn working
of bone tool in flash.
Pick Selection Tool (Arrow Tool) and drag select (by making a box around) the whole
arm drawing just to make sure everything is selected including outlines and shadows.
Note: Make sure everything you need to animate with bone tool is on a single layer.
Now select Bone tool from Tools panel or simply press X on your keyboard. Mouse
pointer will change to a small plus sign and black bone along with it.
Fig. 3 - Bone tool in tools panel Fig. 4 - First bone of arm created using bone tool
First change is that our original vector graphic is automatically grouped by flash. This
happens because when we created our first bone on original layer, flash recognized it as a
new bone structure, thus grouped all the vector shapes on that particular layer, into a
symbol and created our first bone, shown in gray color in above figure.
Second change is that, flash moved newly created hand
symbol to a new layer and labeled it Armature_1. Armature
layers are animation layers created by flash automatically
when new bone structure is started. Armature layers are
indicated in Timeline with a running boy icon.
Note: Insert Pose menu option will only appear for armature animation layers.
Flash will insert a pose, or keyframe you may say, for our armature animation layer and it
will also create all the intermediate frames to save us time of creating animation frame by
frame.
While time indicator is still on frame 15, pick Selection Tool, click anywhere on arm
symbol and bring mouse pointer over second bone. You’ll notice mouse pointer changes
to a bone selection tool, by indicating a black arrow along with black bone.
Now click on second bone. You’ll notice black circle around elbow joint gets
highlighted, which indicates currently this bone is selected.
Bone Properties Panel
At this point let’s examine the bone properties panel. If not already open, select Window
> Properties to open properties panel. When a bone is selected on stage, properties panel
will show that particular bone’s properties.
Bone properties are grouped into four categories, Location, Joint: Rotation, Joint: X
Translation and Joint: Y Translation.
With these properties you can control the speed of a particular bone with respect to whole
bone structure, you can completely disable a joint’s rotation, or even set a restricted
rotation. For example in our case you can restrict elbow joint not to move backwards,
because in realty too, your hand cannot touch elbow of same arm.
Continue Animating Bone Structure
Ok let’s get back to animating our armature. On frame 15, with selection tool, click on
second bone if not already selected.
Click and drag second bone, and play around with it, you’ll notice first bone also moves
along with it, but in more natural way. That’s the magic of inverse kinematics using
bones tool.
With bone tool selected, click on the arm, where shoulder bone should start and drag it
till elbow, exactly where elbow joint should be, and release it there.