navigate site menu

Start learning with our library of video tutorials taught by experts. Get started

Flash Professional CS5: Animation Projects

Flash Professional CS5: Animation Projects

with Paul Trani

 


In Flash Professional CS5: Animation Projects, Paul Trani shows how to create dynamic and visually rich animations in Flash Professional CS5. This course demonstrates how to create and import assets, and then take those assets and bring them to life with dynamic motion. It also shows how to create more unique and natural movement by adding special effects, 3D, masks, and even bones to animate characters. Exercise files accompany the course.
Topics include:
  • Creating graphics and reusable assets
  • Importing graphics
  • Making an object move
  • Animating a mask
  • Using and customizing motion presets
  • Morphing shapes
  • Animating in 3D
  • Adding bones to a character
  • Controlling the Timeline with ActionScript
  • Randomizing content

show more

author
Paul Trani
subject
3D + Animation, Animation, Projects
software
Flash Professional CS5, CS5.5, Illustrator CS5
level
Intermediate
duration
2h 31m
released
Sep 15, 2010

Share this course

Ready to join? get started


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:04Hello, I'm Paul Trani, and
00:05welcome to Flash Professional CS5 Animation Projects!
00:10I'm going to show you how to create exciting, professional animation that will
00:14bring any project to life.
00:16In this course, we'll show you how to use motion presets to add quick animation.
00:22We'll create custom motion tweens that can be reused and nested into other animations.
00:27I'll show you how to animate characters, animate in 3D, and create complex
00:34animations with ActionScript.
00:35So, whether you're making a Flash web site or Flash banners, I'm going to give
00:41you the basics so that you can be at your creative best.
00:44So, let's get animated with Flash Professional CS5.
Collapse this transcript
Using the exercise files
00:01If you have access to the exercise files for this course, you can put them on
00:05your desktop, as I have here, or anywhere else you want.
00:09It contains an Assets folder that has all of the various graphics that will
00:14be used, and then also some Chapter folders that contain the beginning and
00:20final files as well.
00:22If you don't have access to these files, you can follow along with your own
00:26files, as we proceed through this course.
Collapse this transcript
1. Getting Started
Getting familiar with the workspace
00:00Let's start out by creating our very first Flash file from the Start menu.
00:05So, here's the Start menu, and notice I can create a file from a template or
00:09even create a new file.
00:10And that's what I want to do.
00:12I want to create a new file that's an ActionScript 3.0 file.
00:15So, I'll just select ActionScript 3.0.
00:17Let's not worry about the fact that it says ActionScript 3.0 right now.
00:21This is basically a blank document.
00:24It's a Flash file, where all my graphics and animation will live.
00:28I could start drawing in here right away if I want to, but I want to adjust the workspace.
00:35I'm going to do that by going to Window, down to Workspace, and currently it's
00:40set on Essentials, but I want to change this to Classic.
00:44If I change it to Classic, it puts the Tools panel on the left side, just like
00:50other Adobe programs.
00:51Then it gives me my Properties panel on the right-hand side.
00:55Now, if I want to move any panels, I can always click on that tab and click and
01:01drag out that appropriate panel that you might want to isolate.
01:06I've dragged out this Library panel because I actually want to nest this
01:10Library panel right down here underneath the Properties panel, because I know
01:15I'm going to be using this panel a lot, as well as the Properties, and also the Timeline.
01:20All right, so that's set up pretty well.
01:22In fact, if I want to minimize any panel, I can just double-click in the gray
01:26bar there, and it'll minimize, because I want to focus on this Properties panel.
01:30From here, I'm actually able to resize the document.
01:34So, I'm going to click Edit, under Size, and I can go ahead and change the Dimensions.
01:41Now, this is going to be for a web page I have created.
01:44Currently, there is just a static graphic there, and I'm going to replace it with Flash.
01:48But on this web page, I need my dimensions to be about 1,000 pixels wide by
01:52about 400 pixels tall.
01:55So, those are my dimensions.
01:57I'm also going to change the background color.
02:00So I'm going to click this white square here, and I'll just pick a green color
02:04for the background. I'll click OK.
02:08That's more appropriate.
02:09Now, if I want to resize, or navigate around inside of this document, what I can
02:14do is hold down the Spacebar and move around, just like that.
02:18I can also resize this area by maybe selecting Fit in Window.
02:23Now I can see all of the content that will be drawn in here.
02:27So, everything looks good.
02:29This document is set up, so I'm just going to go ahead and save it.
02:34I'll just call this home, because this is for my homepage.
02:38Now, keep in mind, this is an FLA file, it's a Flash file.
02:42This is my source file for the animation I'm going to create.
02:45So I just want to hold on to this file.
02:47It's equivalent to say a PSD, if you're used to working in Photoshop. I'll click Save.
02:53So, now my file is set up, and I can start to draw, or import any graphics, and
02:59do some animation, but I also want to point out that you can go to File > New,
03:04and if you click on the Templates tab, notice that there are templates in here as well.
03:10So, if you are doing any sort of animation for a banner, well then it's just a
03:16matter of selecting that size that you need to use and then click OK.
03:22All that really does is set up your stage.
03:25Again, this is your document stage.
03:27It'll set up the stage size for that particular use.
03:32But again, I'm not making a banner, so I'll just go ahead and close that file,
03:35and come back to my home.fla.
03:37Now I'm ready to start to create some drawings in here.
Collapse this transcript
Creating graphics
00:00Flash has some very powerful drawing capabilities, and yet it's similar to other
00:04drawing programs, so it's easy to learn.
00:07I'm going to go ahead and use some of these simple drawing tools, as well as
00:10some more complex ones.
00:12But before I begin, I'm going to be mindful of what layer I'm on.
00:16So, in the Timeline, I have layer 1 selected, and I want to draw a rectangle.
00:21So I'm going to rename this to say Rectangle.
00:25Now I can get down to selecting my Rectangle tool.
00:30Then I'm going to go ahead and define the stroke color,
00:33we'll pick white, and then the fill color, which is going to be red.
00:37Then what I need to do is I need to just make sure this Object Drawing is turned on.
00:42So I'm just going to click on the Object Drawing. Notice how it looks sort of depressed.
00:47Now I can go ahead and draw with the Rectangle tool.
00:51There it is, and if I select my Selection tool and sort of click off of the
00:56graphic, you can see that it does have that white stroke.
01:00Again, I can select that graphic with the Selection tool and move it around.
01:05Quite frankly, this isn't really what I want.
01:07I need to, first of all, make sure it stretches across the screen.
01:11So, what I can do is I can use the Free Transform tool.
01:15That way I can stretch it sort of further across the screen and kind of scrunch
01:19it up just by modifying these control points.
01:23Another way to modify anything that you have selected is using the Properties panel.
01:28So, over here in the Properties panel, I'm going to change its X position to 0, just like that.
01:36I want to extend it, the width of this document, which happens to be 1000
01:40pixels, just like that.
01:44My height is going to be about 100 pixels, so I can type that in.
01:47So, if you want specific control, use your Properties panel.
01:51Notice also over in here, I can change the fill and stroke,
01:55change the Stroke color to nothing, so it doesn't have a stroke now, and
02:01I can change the Fill color to black.
02:03All right, that's more appropriate, and that's exactly what I want. With that set up,
02:09let's go ahead and take a look at some of the other drawing tools.
02:12Each time you create something in Flash, you should always put it on a new
02:15layer, because that's going to give you more control with that item.
02:18So, I'm going to click this New layer icon, and I'm going to go ahead and draw a
02:23button shape right now.
02:25I'm going to go beyond the Rectangle tool into the Rectangle Primitive tool.
02:30In my Properties panel down here, I'll select a fill color, and notice that you
02:35can actually sample any color as well.
02:38So I'll just sample this green background color.
02:41All right, my next step is to, before I even begin drawing, I can adjust the
02:47properties for this shape.
02:49I'm going to go ahead and look down here in Rectangle Options, because I have
02:54the opportunity to curve the corners.
02:56So, I can change that to 10.
02:58That will change the radius of the corners to 10.
03:00Let's hit Enter for all of the corners, and now I can go ahead and draw a button
03:06shape, kind of like that. It looks great!
03:10With it still selected, I can always come in here and modify that further.
03:15Say for instance, I could even unlock it, and maybe I don't want to curve one
03:19corner, and maybe another corner.
03:22I can change it to that shape.
03:24So, that's looking pretty good.
03:26Again, that's a unique item to Flash, a really great way to make buttons.
03:30But this button really needs a label, so I'm going to select the Text tool,
03:34select a color, white,
03:38then I'm going to go ahead and look at my Properties.
03:42Okay, so the first thing I want to do is change this from TLF Text to Classic Text.
03:49A TLF Text stands for Text Layout Framework.
03:52So, if you're dealing with a lot of text, you probably want to select that.
03:57Otherwise, if it's something simple, like a label, you can use Classic Text.
04:01I'm going to make sure that this is Static Text as well.
04:06I can go ahead and define the font.
04:09So, I'm going to use Arial.
04:12It's going to be bold, and let's give it a size of about 14 point.
04:16Again, let's make sure it's white.
04:19What I can do is just click, and then type in "Replay," just like that,
04:26use my Selection tool to kind of position that right in there, and I could
04:30always use my Arrow keys on the keyboard to adjust it as well.
04:33All right, so that's text.
04:35Now, I want to go beyond, again, this button, and create a new layer, and
04:40actually change the layer name to Text, because I'm going to have a larger
04:43statement, I want to appear right here.
04:46I'm going to select the Text tool.
04:49Notice how it defaults to my last settings.
04:52So that looks pretty good, but in fact I want to up this to about 28 points.
04:56Then I want to type in here, on my stage, "Sustainable Design."
05:05With it still selected, I can always change its various properties.
05:09So I'm going to change the font to Regular, and what I can do, is anytime you
05:14see something with an underline, you can actually do a click-and-drag to adjust its size.
05:20So, that's looking more appropriate.
05:22That's the size I want for this text.
05:24Yeah, I'd say it looks pretty good.
05:27So, I'm going to use the Selection tool and just kind of position it.
05:29Now, let's get into one of the more advanced tools in Flash Professional CS5.
05:36I'm going to do this by creating a new layer, and what I'm going to draw are some trees.
05:41So, I'm going to rename this layer to Trees.
05:45Next thing I'm going to do is I'm going to adjust the stage size to Fit in
05:50Window, just so I can see everything from edge to edge.
05:53All right, with this layer selected, I'm going to go down here. Halfway
05:57down, you'll notice this pencil with these dots, and this is the Deco tool,
06:02a procedural drawing tool, and I'll show you what this looks like if you select it.
06:07Go to the Properties panel and determine what you want to draw.
06:11So, under Drawing Effect, I get plenty of different options.
06:17So, I can draw with buildings, with fire, with flames, flowers, and I want to go
06:22ahead and select the Tree Brush.
06:25Now I get to customize it even further.
06:28If I open up this dropdown, you can see all the different trees I could even
06:31draw, quite a few in here, but I will just go ahead and keep this as the Aspen Tree.
06:39I can even further define the leaf color, and then the flower color as well, but
06:44I think that looks pretty good.
06:45Maybe I'll go a little brighter or something with the leaves if I want to,
06:48something kind of like that.
06:48But let me go ahead and draw.
06:51If I just do a click-and-drag, you can see how it generates that tree. Very nice!
06:58I was able to quickly draw a tree.
06:59Let's kind of do this corner as well.
07:01I'm going to go ahead and change this Drawing Effect to the Flower Brush.
07:08Under Advanced Options, I'm going to select Poinsettia.
07:11Again, I encourage you to play with all of these different drawing effects,
07:16whether it's the flower size or the leaf size or the color, but you can notice
07:20that you'll get some nice, little results as well.
07:23I'm going to go ahead and bring this flower size down, and then the leaf
07:26size down to some more.
07:27Then I can kind of sprinkle those kind of around my tree.
07:30So, that looks pretty good!
07:32Again, it's a procedural drawing tool, very cool, very easy to use, and it really
07:38can jazz up sort of any project that you're working on.
07:42Creating graphics in Flash is easy.
07:44It ranges from simple to more complex, but I just encourage you to play with the
07:49various drawing tools and capabilities that are available in Flash.
Collapse this transcript
Creating reusable assets
00:00At the foundation of Flash are symbols.
00:02They allow for animation, interactivity, and can even have special effects like
00:07glows and drop shadows.
00:09But most of all, they can easily lead to a smaller file size, which is important
00:14when it comes to web performance.
00:15Where I'm actually going to start is by testing this movie,
00:21my home.fla, my home Flash file, my source file, and I'm going to go to Control.
00:26I'm selecting Test Movie, making sure in Flash Professional is checked, and
00:31then I'll click Test.
00:34What that does is that actually creates this SWF file.
00:37This is my small web format file.
00:40This is my file that I really want to be as small as possible.
00:45But here is an easy way to check its file size.
00:48I can actually go to View > Bandwidth Profiler.
00:53That will open up this Bandwidth Profiler, which actually gives me the file
00:57size for this document.
00:59It says it's 296 KB.
01:02I want to simplify this design to get this file size down, and I'm going to do
01:06this by creating symbols.
01:08So, I'll close that SWF file, and just by looking at this design, I can tell
01:14that I really only need one tree
01:17I can then duplicate and put in both positions.
01:21So, what I'm going to do is I'm going to delete this first one, and I'm going to
01:26lock down those other layers.
01:30Now I can go ahead and just click and select all of those graphics and then hit Delete.
01:35All right, now what I want to do is hold down the Spacebar and kind of pan back
01:40over, because I want to take this tree right here with flowers, and I want to
01:45convert it to a movie clip, which is a type of symbol.
01:49Open up the Library panel, click and drag all of these graphics into the Library panel.
01:56Here I have the Convert to Symbol dialog box that opens, and now I can give it a name.
02:02I'll call this tree design, and then I can choose the type of symbol I want
02:08to convert this to.
02:10Notice there is Movie Clip, Button, and Graphic.
02:13The movie clip is actually the most robust and gives me the most flexibility.
02:19That's why I want to use it.
02:20So I'm going to select Movie Clip.
02:22Most of the graphics I create are actually a movie clip.
02:25Button is also another popular one that I will use in a second.
02:29But I will select Movie Clip, and I will click OK.
02:34Notice how it appears in my Library panel.
02:36I can see it right here. And if I sort of expand out the Properties panel and
02:41minimize the Library panel, you can see that this tree is now an instance of the
02:46tree design, which is in my library.
02:49So this is now an instance of that symbol in the library.
02:52All right, so I'm going to go ahead and hold down my Spacebar, and pan up here,
02:57and open up my Library panel, because what I want to do is I want to click and
03:00drag out that tree onto my stage.
03:06That creates a new instance of that tree design.
03:09Now I can manipulate it into that position I had it, just by using the Free
03:14Transform tool, kind of something like that, okay.
03:18So again, I have two instances of one symbol.
03:22Now all I'm going to do is I'm going to go to Control > Test Movie, and test this out.
03:27It was 266 KB earlier; now it's 143 KB.
03:31It almost cut it in half, it did a great job, and still the integrity of the
03:37design is maintained.
03:38All right, now I want to convert a couple of other items, the text and then this
03:43background bar, into movie clips, and then I'm going to make this a button.
03:47I'm going to lock my Trees layer, and I'm going to unlock the Text layer.
03:53It's the same process of selecting the graphic and then dragging it into the Library.
04:00Now I can go ahead and give this a name.
04:02I'm going to make it a movie clip, sustainable design.
04:06It's going to be a movie clip. I'll click OK.
04:09I can see it says it's an instance of sustainable design.
04:13I will lock that layer and unlock the rectangle right here.
04:18I'll just click and drag it to the library.
04:21I will convert this into rectangle.
04:26It's going to be a movie clip.
04:29Then lastly, I'm going to go ahead and select this text as well as that button shape.
04:35So these two items, I'm going to click and drag it into the Library panel as well.
04:42This is going to be my replay button, and it is going to be of the type Button.
04:49So I'm selecting that, and then I'll click OK.
04:52All right, so everything is converted to a symbol now, and let's go ahead
04:59and take a look at some of the additional properties you can add to any sort
05:03of symbol instance.
05:05Well, let's select this rectangle background, and I look in my Properties panel,
05:11you can see that it is more robust.
05:13I have this 3D position in view.
05:15I have Position and Size.
05:17I have this color effect, which is definitely pretty nice, and then I even can
05:21change the Blend mode.
05:22I'm going to change this to Overlay.
05:26That just tints it subtly and it will be more pronounced once I get more
05:30graphics back there.
05:32Let's take a look at filters.
05:34I'm going to select this button.
05:36Under the Filters tab right here, I can click Add filter, and here is where I
05:41can go ahead and add a drop shadow, a blur, pretty much anything I want.
05:46In this case, I want it to look more like a button, so I'm going to select Bevel.
05:50As you'll notice, it adds that bevel, and I can change it even further.
05:57I want to decrease the blur, so I'll just click and drag that down to give it
06:00more of a harder edge.
06:02Then I can start to modify the color or the strength.
06:06Let's go ahead and bring down the strength a little bit, kind of like that, just
06:10by clicking and dragging.
06:11But again, you can see I can easily modify any of the properties for any filter.
06:16Of course, to add them, all you have to do is click that Add filter icon
06:20right there to add it.
06:21So, that's looking pretty good!
06:23My graphics are all squared away.
06:25Even if I am not going to be using an item multiple times, I still want to make
06:30it a symbol, because it means that I can then animate these graphics or even
06:36control it with ActionScript.
06:39So you want to get in the habit of converting everything into a symbol.
Collapse this transcript
Importing graphics
00:00Although Flash's drawing capabilities are powerful, you probably want to import
00:04some graphics as well, and that's what I want to do with this image here.
00:08I have it opened in Photoshop, and it's called homeBkgd.jpg, and I just want
00:14to show you, if I go to Image > Image Size, that it's a 72 dpi image, and it is
00:21an RGB image as well, and it's actually set up to the height of my document in Flash.
00:28So I am going to cancel out of there, and I am also going to show you this
00:31homeForeground.png, because I want to import this file.
00:34This happens to be a PNG file, so it has varying levels of transparency.
00:38So that's going to come across nicely.
00:40It is my foreground image and then lastly, what I want to do is import an
00:45Illustrator file, which I will get to in a little bit.
00:46But let me go back into Flash, and the first thing I need to do is create a new
00:53layer, and on this new layer, I am going to put in the background.
00:58So I am going to rename that layer to background, and I am just going to click
01:02and drag it underneath all of the current layers.
01:05So with that layer selected, I am going to go to File > Import, and Import to Stage.
01:12Then I can locate the homeBkgd.jpg.
01:16But I do also want to point out all of the different file formats that you can import.
01:21There is quite a few in here. All of the popular file formats for images, video,
01:25and audio are able to be imported into Flash.
01:29I am importing a JPEG and a PNG file, as well an Illustrator file.
01:33But I am going to select this file and click Open, and there it is, on my stage.
01:39You can see that graphic.
01:41With it selected, if I go to the Properties panel, you can see that it's an
01:45instance of the homeBkgd.
01:47But what this is missing are all of the various properties that you are able to
01:52control if it's a movie clip.
01:55So what if I want to, say, blur the background or give it a drop shadow or
02:00change its layer mode?
02:02Well, I have to convert that into a movie clip, and that's what I want to do next.
02:06Let's open up my Library panel.
02:09There is the JPEG, but in general, I am going to click and drag that into the
02:15Library panel to convert this to a symbol.
02:17This symbol is going to be called background, and it's of the type: Movie Clip.
02:23Click OK, and now I can see in my Properties panel that I have sort of full
02:28control over this image now.
02:30All right, next step.
02:32I am going to create a new layer, and this new layer is for the foreground.
02:38With that layer selected, I am going to go to File > Import, and Import to
02:44Stage, and I will locate that PNG file.
02:48I will click Open, and then there it appears on the stage: the image of the lady
02:54and the guy with unusually long legs.
02:57That's actually not going to be noticeable when I start animating it.
03:00But in general, I am going to do the same thing that I did earlier, just to click
03:05and drag that graphic into the Library panel and call it foreground, and it is
03:11going to be a movie clip as well. Click OK.
03:15Now that's set up.
03:17The last thing I want to import is actually going to be a logo from Illustrator.
03:22So I want to show you that file.
03:25Here I am in Illustrator, and here is my graphic, and I'd like to point out, in
03:29the Layers panel, that there is only one layer, and it's called Logo.
03:34Now, I could have multiple layers with plenty of graphics, and what will happen
03:39is Flash will import all of those layers separately. Very powerful.
03:43In this case, it's just this Logo Illustrator file that I am going to import.
03:47So I am going to go back to Flash.
03:51In Flash, select any layer.
03:53It really doesn't matter.
03:54I am just going to make sure it's not locked.
03:56But when I import this Illustrator file, it's actually going to create the
04:00layers for me, so I don't need to create my layers right now.
04:04So I am going to go to File > Import > Import > Import to Stage, locate that
04:09Illustrator file, it happens to be in the home folder, which is in our assets
04:13folder, and I will click Open.
04:16Then I am given this import wizard.
04:18Now, I can actually control how this is imported.
04:22What I want to do is I will just close up that layer, but in general, I want to
04:28select that layer and select Create movie clip, because I want to automatically
04:33convert this layer into a movie clip, and then make sure it gets positioned on
04:38its own Flash layer. Click OK.
04:41There is my layer.
04:44You can see that it automatically adds that layer in my timeline called Logo.
04:50Now what I want to do is start positioning everything a little bit more
04:54appropriately, and when you start dealing with larger graphics, it's really hard
04:59to tell what the end user will see.
05:02Okay, so it's hard to tell where my stage ends.
05:05So what I can do is I can go to View, and uncheck Pasteboard.
05:10If I uncheck that Pasteboard, I don't see everything;
05:14I just see exactly what the user sees, and what they see is all within this area.
05:20But now I can start to position everything and scale down this logo, position it
05:26in the upper-right, use my Selection tool and start to move some of these
05:31graphics around as well.
05:33Again, I am just building this layout that's going to be animated shortly,
05:39use my Free Transform tool, sort of manipulate that graphic kind of like that
05:45and lastly, let's hold down the Shift key and then just move that text into
05:50place, kind of like right down there.
05:54I can even use my Arrow keys for repositioning my items.
05:58So I'd say everything looks pretty darn good.
06:01If you do happen to notice that you need to edit a graphic that's already
06:05imported, well Flash makes it easy, because what I can do is I can double-click
06:10on this movie clip here, which happens to be the foreground because I want to
06:14edit this image in general.
06:16So I can go ahead and double-click on it and what happens is now I am inside of
06:21the foreground movie clip, okay.
06:24When I am inside of this foreground movie clip, I can actually select this JPEG.
06:30It says it's an instance of the homeForeground.jpg.
06:33But if I right-click on that graphic, I can then edit this graphic
06:38with Photoshop CS5.
06:41It opens up that image.
06:43Now I can start to adjust it.
06:45So, in this case, all I want to do is use the Dodge tool on some of the midtones
06:52to just bring her face out more and some of this other detail.
06:56Again, it's going to be subtle, but you can always do the edits you need to
06:59do in Photoshop, and once you are done with them, save the file and then go back into Flash.
07:06Now, it might be subtle, but you will be able to see that her face is a little
07:09brighter, and now this is all set up.
07:13So I am going to click back on Scene 1, and now you can see that here are all my
07:18graphics, and now this is actually set up for me to do some animation.
Collapse this transcript
2. Creating Animation
Using the Timeline
00:00Before you begin animating, it helps to have a good understanding of how the
00:04Flash Timeline works, because currently, for this project, if I look in the
00:08Timeline panel, there is only one frame in the timeline. And what I want to do is
00:14I want to extend out the timeline for all of my content, each layer, to appear at
00:20a certain point in time.
00:22So, it's going to build this final image.
00:25So in order to do that, what I need to do is, say, for instance, for this
00:30background layer, I can go down to frame 90, and I can do a right-click, or
00:36Ctrl+click if you are on a Mac, and I can insert frame.
00:40Watch what happens when I do that.
00:42It extends out the contents of this layer clear to frame 90.
00:47So if I go back down to frame 1, I will just click right here, and I will hit
00:52the Enter key, and I can see the playhead moved through all of these frames.
00:57In fact, if I do a Control > Test Movie and I test this in Flash, you can see my
01:03playhead move through all of these various frames.
01:07It will hit frame 90, and then it restarts.
01:11Keep in mind that I actually have the Bandwidth Profiler turned on, so you
01:14can see this process.
01:16Again, this spike right here is all of the content.
01:19So I need to extend out the rest of the contents, so I will close this SWF file,
01:23and it's the same process of just right- clicking on the frame you want to extend
01:28the content to and then selecting Insert Frame.
01:31That looks pretty good, but what I can also do is just do a click and drag
01:36and select frame 90 for all of those layers, do a right-click or Ctrl+click and Insert Frame.
01:43Now everything is extended out to frame 90.
01:48Take a look at these little black dots, because there is a little black dot on each layer.
01:52This is actually known as a keyframe.
01:54For instance, if I don't want this Replay button to appear till later on, all I
02:00need to do is click and drag that keyframe to about frame 90 just right there.
02:07Now, that Replay button doesn't exist until frame 90.
02:14So I can start to stagger out this content.
02:17I will select this text layer, that keyframe, and just move that down to frame 50.
02:23I will do the same for this rectangle layer underneath it.
02:27I will drag that out to about frame 40, and then even the trees, what I can do is
02:34just click and drag that out to about frame 70.
02:38All right, notice now that all I have in the first frame is the ecostyle studio
02:46logo as well as the foreground and the background.
02:50So let's take a look at what this looks like if I do a test movie.
02:53Again, you can see it move through all the content and notice how the content builds.
03:01All right, now what I want to do is I want to go ahead and add some keyframes
03:08and really start to control each one of these images and graphics a little more.
03:12Say, for instance, this logo.
03:14I actually want the logo to be really big initially.
03:18So I will just kind of move it to the center, and with the Free Transform tool
03:23selected, I can just expand out the size of that logo, and I can make it
03:29about that size roughly.
03:32So, I want it to be that size until about frame 70, and at frame 70, I want it to be smaller.
03:43So, I can do a right-click and insert a keyframe for frame 70.
03:49What I am doing there as I am saying to Flash I am going to define new
03:53properties for this object at that point in time.
03:56So, now I can scale it back down and position it in the upper right-hand corner. All right.
04:03So now this first keyframe tells it to be pretty large for most of the time
04:08until it hits this second keyframe, and then it pops down into place.
04:12Well, what if I want this logo to appear large for about the first one second,
04:20and then I want it to go away entirely.
04:23Well, in order to do that, what you will need to do is do a right-click or
04:28Ctrl+click, if you are on a Mac like me, and what I can do is insert a blank
04:33keyframe, because that's all this white is.
04:37Sure enough, that takes away the logo entirely, and it actually doesn't exist
04:42from this moment forward.
04:46That's basically keyframes in Flash.
04:48You can start to adjust this even further.
04:50In fact, I am going to clean this up a little more.
04:53I am going to move this text layer down so the text layer and the rectangle are
04:57close to each other.
04:59But you will often run into a case where you are going to want to extend out
05:03your timeline even further.
05:05Initially, what I did is I inserted frames.
05:08If you want to insert frames within any part of the timeline, you can easily do that as well.
05:14So I could just do a click and drag, and I can select a chunk of frames.
05:19So let's select about 10 frames.
05:22With those 10 frames selected, what I can do is I can insert 10 more frames.
05:27So I am going to do a right-click, and I am going to select Insert Frame.
05:33Look what that does is that pushes everything down, and now I am about at frame
05:37100 or 101 for my content.
05:40But again, it extended out this section of my timeline to allow for more
05:45animation, because ultimately, that's what I want to do is have some more
05:48animation room in here.
05:49So remember, it just a click-and-drag and you can select as many frames as you want.
05:54I will do a right-click and Insert Frame.
05:58Conversely, what you can also do is remove frames if you need to remove frames
06:02as well, so your animation goes faster.
06:05But again, Insert Frame, and that stretches out your animation even more.
06:10Okay, I'll finish the cleanup because I can go ahead and grab this foreground
06:15keyframe and move that down to right about frame 24 because I want this logo to
06:20appear, and then it goes away the same time you see this foreground image.
06:27So that's an overview of the timeline in Flash.
06:29I want you to remember to always keep each graphic on its own layer, because it's
06:33going to be easier to work with, as well as some tips, as far as staggering out
06:38your graphics so they appear when you want them to appear.
Collapse this transcript
Making an object move
00:00Most of these graphics are now set up and ready to be animated.
00:04Let's take, for instance, this background.
00:07Well, I want to animate in this background using a certain type of tween, and then I'm
00:12also going to animate in this foreground as well, including some other graphics
00:17using a different type of tween.
00:20And you are probably wondering, what is a tween?
00:22Well, it's moving an object between one point and another.
00:26What you need to do, if you want to create a tween, is you need to define those two points.
00:33So currently I have this first keyframe right here, which defines the position,
00:38location, and various other properties for this background.
00:43So my next step is to insert another keyframe that defines this object at a different place.
00:50But before I even do that, I need to just make sure this is the only graphic on this layer.
00:57So again, the goal is to always have each graphic on its own layer, if you're
01:02going to animate it.
01:03That's rule number one.
01:06Rule number two is to make sure that it is an instance of a symbol.
01:11So, if I select this graphic, I can look in my Properties panel, and it says
01:15it's an instance of the background.
01:18So again, it's the only thing on the layer, and it is an instance of a
01:23movie clip in this case.
01:25So now I can go ahead and define the second keyframe.
01:31So what I am going to do is I'm going to select, say, about frame 24, and I'm
01:38going to insert a keyframe.
01:40It adds that keyframe right there.
01:45And what this keyframe does is it stores information and various properties for
01:49this object at that point in time.
01:52So what I can do is I can just go ahead and move this background,
01:56move it over kind of like that.
01:59Okay, so that's what's stored in this keyframe now.
02:02So the first keyframe, it's right here;
02:04the second keyframe, it's at this location.
02:08Now all I need to do is create a tween in between those two keyframes.
02:15So you can do a Ctrl+click on the Mac or right-click, and I can select
02:20Create Classic Tween.
02:22So this is what I'm going to create initially.
02:24It's just a classic tween. And what happens is Flash adds this tween in -
02:30it's actually this arrow - that basically says it's moving from point A to point B.
02:35So if I hit the Enter key, I can see it slide across the stage.
02:40That's exactly what I want, and it looks great.
02:43I can go down to the second keyframe and maybe move this background a little less,
02:48so it's not as drastic of a move. And I can go ahead and click on Frame 1 and
02:53hit Enter, and it moves slower.
02:56Okay, so it doesn't move as far.
02:58Another thing I can do is I can even select this keyframe and move it clear
03:03down here to the end.
03:05Okay, now it will constantly move, even as these other graphics appear as well.
03:12So you can manipulate where the keyframe is, as well as what is on this keyframe,
03:17such as the position.
03:19Pretty much anything in the Properties panel can be animated.
03:23In this case, all I am animating is the position.
03:27All right, but again, that enables me to animate the background.
03:31I can see that background get moving. And what I want to do next is I want to
03:37animate this foreground.
03:38So I'm going to go ahead and unlock the foreground, and I'll lock the background.
03:44In fact, I'll just take this first keyframe and drag it down here to the very first frame.
03:50And want I'm going to do is I'm going to use the new motion tween available
03:54in Flash CS4 and CS5.
03:56All I'm going to do is, again, remember, that that I do have this graphic on its
04:04own layer, and it is an instance of a movie clip,
04:07so those are my two rules I need to keep in mind, and then all I need to do
04:10is do a right-click.
04:11I'm going to select Create Motion Tween.
04:16It turns this layer blue, and it's basically saying, hey you know what? I'm now
04:21ready to be animated.
04:23So that's all I have to do is I just have to turn it on.
04:26I can go down, maybe scrub down to the end of this timeline here, and then all I
04:31need to do is move the graphic.
04:33I am going to go ahead and turn off these other layers because it's kind of hard
04:37to see what I'm animating.
04:39But I moved this graphic, and look what it does is it gives me this motion line.
04:43This is actually a motion path. But you can see how I can adjust the distance that it animates.
04:49It gives me this motion path, a nice visual showing me where it's moving.
04:53And not only that, it's editable as well.
04:58What I can do is I can actually grab that end motion and move that on down.
05:03Say, for instance, for the start position, I can grab that end of the motion
05:09path and stretch that out.
05:11So now it starts at a different location, actually further to the right.
05:15I don't have to keep bouncing between keyframes in order to manipulate the
05:21motion, because again, I have this nice motion path.
05:24So I'm going to go ahead and hit enter, and you can see that sort of slowly
05:29move across the screen.
05:32Let me just kind of move this over to the right a little bit more, and now it's
05:36going to move at a different rate than the background.
05:39But I'm going to go ahead and add a couple more tweens in here.
05:43Again, I'll use the motion tween because, let's face it,
05:46it is easier. And what I can do is I can maybe move this blank keyframe down to about frame 60.
05:54For this logo, it's the same process.
05:56I want to make sure it's a movie clip in this case, or at least an instance of
05:59a symbol, and it's on its own layer, and then I can just right-click and
06:04Create Motion Tween.
06:07From there, what I can do is determine where I want this logo to move.
06:11So I can just click and drag it over, just like that.
06:16Point A, point B, and then it disappears.
06:20So I might even want to push this clear off of the stage, and I'll just use my
06:25arrow keys to finish this out.
06:26I'll hold down the Shift key move to move it in increments of 10, but now I have
06:32that sort of sliding out.
06:33Now this is really starting to come together.
06:37That's just a quick example of how to create two different tweens:
06:41the Classic tween and the Motion tween, but really my next step is to start to
06:45fine-tune this animation.
Collapse this transcript
Fine-tuning animation for depth
00:00Once you have some basic animation in place, probably what you are going to
00:04want to do is refine that animation to potentially even simulate a real-world experience.
00:11In this particular case, if I just turn off some of the layers and just show the
00:17foreground and the background, if I hit Enter, you can see the background moves
00:22faster than the foreground, and in a real-world scenario, this wouldn't happen.
00:26I need the foreground to move faster.
00:30I am also going to add some additional depth.
00:32So the first thing I am going to do is lock down that foreground and
00:36for that background,
00:38it, again, moves awfully fast,
00:40so I want to come down here to this last frame, this keyframe right here, and
00:46since this is a classic tween, I need to actually navigate down to that keyframe,
00:51and then I am just going to go ahead and move this image back to the right so it
00:56doesn't move as much.
00:59It's just going to be the fine art of moving that image and then scrubbing the Timeline.
01:04So all I am doing is clicking up here where these numbers are, and I am really
01:08able to determine how much this moves.
01:11So I can either modify the first frame or the last frame, but now I am
01:16actually getting more of that depth. And that's looking pretty good, but there
01:19is more I can do as well.
01:22With any object, if it is in the Properties panel, then it can be animated.
01:30So what I want to do is I am going to add a blur to the background, because I
01:34want it to start out pretty sharp and then blur, and that's going to actually
01:40create some nice depth.
01:42For the second keyframe, I am going to go ahead and select that background
01:46instance. And under Filters, I am going to add a new filter, and this is going to be Blur.
01:53I am going to change the Quality from Low to Medium, and I am just going to
01:57click and drag to the right to increase the blur of that background.
02:01That looks pretty good. In fact, let's type in about 15 pixels.
02:06All right, and if I scrub back, notice how again it's clear. And if I hit Enter,
02:14since I have added that nice filter, the background blurs out.
02:20Since I am creating this depth, and I am playing with the focus of your eyes,
02:26this foreground image actually needs to be blurred out, since you are
02:32focusing on the background.
02:33So I am going to select that graphic, and it's going to be the same process of adding a blur.
02:38Let's make the Quality Medium, and let's make the blur about 15 pixels.
02:44Now you get that nice depth,
02:47focusing on the background, and I'll hit the Enter key, and now you can see the
02:52background blur out, and then the foreground should sharpen.
02:56I do need to actually select the second keyframe here, and there we go.
03:01Let's bring that into focus. There we are.
03:03So let's try this one more time. Hit Enter.
03:06Background blurs out, and then you can see that image get a lot sharper.
03:11All right, so that's looking pretty good, but my next step is to really have
03:15this slow down and rest into place,
03:18because right now it just all of a sudden stops, and I want to control the
03:22easing, as it's known.
03:23So I want it to ease out, or slow down slowly as it reaches this second keyframe here.
03:29I am going to select this tween, and if I look at the Properties panel, I can
03:35actually control the tween right in here.
03:38So I want to change the Ease to Ease Out, so that means clicking and dragging to the right.
03:45So ease out 100.
03:48Now it will really slow down into place.
03:51I am going to do the same thing for this classic tween because you can do with
03:54classic or a motion tween.
03:56Going to the Tweening properties and clicking and dragging and adjusting that
04:01ease, so now it eases out as well.
04:03All right, so I'd say that's looking pretty darn good, and the last thing I am
04:10going to animate is this logo, because again, if it's in the Properties panel,
04:17it can be animated.
04:18With that layer selected, I am going to hold down the Shift key and press the
04:23arrow to the right, to kind of bring that into place like that. There it is.
04:28I want this logo to fade out, so it's going to start out, just as you see here,
04:33and then it's going to fade out, and it should be totally gone by the time it
04:38reaches this second keyframe.
04:40If it's in the Properties panel, you can animate it,
04:42so I am going to select that graphic.
04:44I am going to go to Color Effect, and I am going to change the Color
04:49Effect to Alpha. And from there, I can adjust the alpha of this graphic, which
04:54is the transparency.
04:55I can take that down, and you can watch it disappear.
04:59Again, it's 100% right there, and now we can see it fade out.
05:03You get the focus on the two people, and the next step is to focus on the message as well.
05:11So I am going to go ahead and do some cleanup to these two layers, because all
05:16that happens here is this text just pops in and so does the rectangle.
05:22So I will just click and drag this keyframe over, and I am going to make sure
05:26this is in the right position,
05:28because I am not only going to shrink up using my Free Transform tool, I am
05:33going to decrease the height of this bar right here to kind of fit that text
05:38just like that, and let's turn on that.
05:42So that's looking a lot better.
05:44My graphics are in place, and I will create a motion tween.
05:48So it's going to start, potentially.
05:50I will just click and drag it so it will off the stage to the right, and in order
05:56to see the right side, what I can do is I can change the view to Fit in Window,
06:02and now I can sort of drag it off right-hand side like that. And then I can
06:08scrub in to about frame 80, then I can position this into place.
06:13Now remember, I don't have to add a keyframe. Flash does that for me automatically.
06:18It adds that keyframe right there, and now I can see that that slides into
06:22place just like that.
06:24I am going to do roughly the same thing for the text.
06:27I am going to create a motion tween, and it's going to be positioned to the left
06:34and about at frame 80.
06:37I want it to slide in, so really, it's just a matter of selecting it and sliding
06:40it in, kind of like that.
06:42All right, so that slides in just like that, and then my other graphics
06:48appear, and let's just make sure the trees will also appear as well as that Replay button.
06:54So I'd say everything looks good.
06:57The last edit I am going to do is just to make this text pop off a little more.
07:01I can add a drop shadow and again, I am just going to use Filters.
07:04Add a drop shadow, and now I can see that text better.
07:08In fact, let's blur it out a little more to kind of set it off some more.
07:12That's much better.
07:13Change the Quality to Medium.
07:16Those are the refinements I want to do this simple animation of graphics moving
07:20across the screen, but now we have created a lot more depth.
07:24In fact, if I do a test movie, you will see that depth that we have created and
07:28then that smooth motion as well.
Collapse this transcript
Creating and animating a mask
00:00A great way to reveal content is by creating a mask and then animating it, and
00:06that's what I want to do with these branches is I want to create a mask that
00:10animates and then reveals this branch as if it's growing. And I want to do it for
00:15both of them as well.
00:17But the first thing I need to do is I need to put each one of these branches on
00:22its own layer, and currently they're both on this Trees layer.
00:28An easy way to put items on their own layer is just by doing a Ctrl+Click or
00:35right-click, and you can distribute to layers.
00:40When I do that notice that it does put both of these branches on their own layer
00:45and actually names them what the movie clip is called.
00:47So these are the - sort of the tree design. That looks good.
00:50I don't need this layer, so I'll just select it and then click Delete, and now I
00:55can start building a mask for this branch up here.
01:00I'm going to first create a new layer, and I'm going to call this layer, mask.
01:06Then I'm going to go ahead and select the Oval tool, and I'm going to draw a
01:11circle, and I'm just going to pick any color I want.
01:13It really doesn't matter because you are never going to see this color.
01:17I usually select a green, and you can adjust the alpha.
01:21So I'll make that about 50%, and then I'll just draw a circle.
01:27So this is going to be my mask.
01:29Use my Selection tool, and I'm going to drag it into the Library so I can
01:34convert it to a movie clip symbol and again, this is just going to be my mask.
01:39So that's what I'm going to call it, mask. Select OK.
01:43So that is my mask movie clip on this layer that's above this branch layer, this tree design.
01:51And in order to mask out the content below this circle, all I need to do is
01:57right-click and select Mask.
02:01That will mask out everything outside of that circle or whatever is on this mask layer.
02:07And notice the icons change, and then it locks down those two layers.
02:11So in order to move the mask, you're going to have to unlock it.
02:16And now you can see why I made that circle semitransparent because you still
02:19want to see the content.
02:21So I want to go ahead and have my mask exist off the stage, and I'll choose my
02:27arrow keys to kind of position it off the stage, kind of down below.
02:30And what I want to do now is I want to animate this mask, and again, this is a movie clip.
02:36It's on its own layer, so it should animate.
02:39So all I need to do is do a right -click and Create Motion Tween.
02:44It activates this Motion tween, and I can scrub down, say for instance about frame
02:5059 roughly, and then I can move this circle.
02:57I'm not only going to move this circle, but I'm also going to use the Free
03:01Transform tool and then make it larger as well, because I basically want to
03:06cover this entire branch, just like that.
03:09All right, so it adds that keyframe.
03:11If I scrub up back, you can see it animate.
03:15That looks like it will be a pretty good mask.
03:17But again, if I want to see it mask, all I need to do is lock those two layers.
03:22Now if I scrub back and scrub forward, you can see that branch being revealed.
03:29I'll even hit the Enter key, and we can watch it closer to real-time.
03:33We can see that branch being revealed.
03:35All right, so far so good.
03:40And note, if you ever want to move a keyframe, what you need to do it is hold
03:44down the Command key, and then you're able to select that keyframe.
03:50So if I want to cut this in half so it was faster,
03:53I can click and drag that on down.
03:55So now this mask is going to happen a lot faster.
03:58I'm going to do the same thing for this tree branch down here.
04:02So it's going to be the same process of adding a new layer, calling it mask, and
04:08then, from here, what I can do is bring on that mask circle that I made earlier.
04:14Position it sort of off the screen.
04:17Create a motion tween for it and notice how my order is a little bit different
04:21because I can create a motion tween right now by moving this mask later down in the timeline.
04:30So I have already created this motion tween, but I haven't applied the mask.
04:35And I just point that out to show you that you can basically create a motion
04:39tween and then convert it into a mask.
04:43Okay, just like that.
04:47And now we have our two branches growing.
04:50Let's go ahead and watch this.
04:51I'll do a Control > Test Movie.
04:56It plays through, and you could see that branch grow.
04:59Okay, I'm going to go ahead and turn off the Bandwidth Profiler, and we can
05:05watch a replay again, and we will watch it to play through one more time.
05:09Now there could be as many layers as I want that are being masked.
05:13It really doesn't matter. It doesn't have to be one branch or one item.
05:17It could be a whole entire scene that's being masked.
05:20But this was a quick example showing you how easy it is to mask out content and
05:26then animate it as if it's being revealed.
Collapse this transcript
3. Using Prebuilt Animation
Using motion presets
00:00A great way to produce quick animation is by using the presets built into Flash already.
00:07And in this file, I currently have some graphics set up and notice that I
00:12have some of these layers locked, because what I want to animate are these
00:17words sitting right here.
00:19They are all on separate layers.
00:22So the first thing I need to do is extend out the Timeline for all of these
00:26layers, so then I can begin animating.
00:29So I'll just scrub down to about frame 110, and I'll just do a click-and-drag to
00:34select all those frames for all those layers.
00:38And I can do a Ctrl+Click or right-click if you are on PC, and I can Insert Frame.
00:45So that extends out the timeline for all these layers.
00:49Now I'm just going to grab each one of these keyframes for each word, and
00:53just start to space out some of these graphics because I want to focus on the shoes movie clip.
01:04Notices that it's on its own layer and if I select it you can see that it's an
01:07instance of Movie Clip.
01:09So I want to definitely make sure those two things are in place before I do
01:13any sort of animation.
01:14But now I'm going to go ahead and select that movie clip, and I'm going to go to
01:19Window and open up the Motion Presets panel.
01:23Here's my Motion Presets panel, and if you open up the Default presets folder,
01:29you'll see a very long list of animation that you can choose from.
01:35So there are bounces, some fly-in and blurs.
01:40There are some regular fly-ins, which are nice and then some other really
01:44unique ones as well.
01:46So multiple-bounce, pulse, even smoke.
01:49So I encourage you to check out all of these really cool motion presets available.
01:54But in my case, what I want to use is just this fly-in-blur bottom.
01:59So it's going to fly in from the bottom and kind of blur in and then sharpen.
02:04So I'm going to select that movie clip, go to my Motion Presets panel, select
02:09the preset and then click Apply.
02:12I'm going to move this Motion Presets panel off to the side, and you'll
02:16notice in my Timeline,
02:18it adds that motion preset, it's actually that motion tween, and if I scrub through
02:23you can see my text actually sort of sliding off of the screen. And of course,
02:28I don't want this, but I can easily select that path and then reposition that object.
02:34So I can just move that path on down, and now I can see that it comes in from
02:39the bottom and then rests into place.
02:42I actually want this graphic to actually appear here a little longer beyond the 15th frame.
02:47So I'm going to select frame 30 and do a Ctrl+Click, or right-click if you're on
02:53PC, and Insert Frame.
02:57What that does is that extends outs that object,
03:00makes sure it exists beyond frame 15, so the user has a chance to read it.
03:06Next up is jeans.
03:08So I'll click and drag that movie clip down, and with it selected, I can go to the
03:13Motion Presets panel, select fly-in- blur from the left and click Apply.
03:20And I'll scrub through in my Timeline and stop right here on this second one and
03:26regardless of where I am, I can always select that motion path and then move that
03:31object into place, just like that.
03:34Now we can see it blur in from the left side.
03:37And again, I want to extend out its Timeline by clicking on the 60th frame and
03:43inserting a frame, just like that. Looks good.
03:47Next one, shirt is going to appear after the jeans.
03:52I'll select that graphic,
03:54select the preset I want to use, which is going to blur from the right, and I can
04:00click Apply, and then it adds it.
04:02So you can see that it's pretty easy to add these motion presets and then adjust
04:07them just by moving the motion path.
04:10So it does slide in and rests into place.
04:17I'll extend out its Timeline as well.
04:20I'll just insert a frame for that layer, and now my object exists a little longer.
04:25Okay, the last one I'm going to do deal with is this style word, and I'm going
04:28to have it come in a little more unique.
04:30So I can pick maybe another one of these down here.
04:34Let's take, there's a spiral-3D, a swoosh, and what I want to use is a zoom-in-2D.
04:42So I'll select that preset, click Apply, and then it adds that preset.
04:50So you can see it comes into place, just like that.
04:55Notice that it actually added multiple keyframes in there.
04:58And you can extend or decrease the length of these motion tweens if you want to.
05:06And watch what happens if I do that.
05:07I can actually sort of scrunch it up, make it smaller, and it will
05:11proportionately compress all of those keyframes.
05:15Conversely, I could stretch it out, and you can see it stretches out those keyframes.
05:19So you really have the flexibility you need if you're adjusting any of
05:22these motion tweens.
05:24And I'm just going to make sure it ends right here at frame 110.
05:30Everything seems to be looking pretty good.
05:32So I'll just do a Control > Test Movie, and I'm going to test it in Flash, and
05:37we can see all of that text sliding in.
05:42I'd say pretty easy to do.
05:44Again, once these graphics are set up, it really takes mere minutes to add any
05:49motion preset that you want to really bring some life to your project.
Collapse this transcript
Creating and reusing custom presets
00:00Motion presets are very powerful, allowing for quick animation.
00:04But the thing I like about them most is the fact that I can make and save out my
00:10own motion presets for reuse later.
00:13That's what I want to do with this movie clip here.
00:15More than - this is the movie clip that I want to animate.
00:20I want to animate it sort of blurring into focus.
00:23So, that's the animation I want to build, and then I want to reuse it later.
00:26So, I'm going to select this movie clip, and in the Properties panel, down under
00:32Filters, I can click this Add Filter button.
00:35I'm going to add a blur, and I'm going to change the Quality from Low to Medium.
00:43Then the Blur amount is going to be about 30 pixels.
00:46So, I'll type in 30, and notice how that movie clip gets blurred out completely.
00:51So, that's its starting point.
00:54Now what I can do is I can go to my Timeline, and I will do a right-click or
00:58Ctrl+Click if you're on a Mac.
01:01From here, I'm going to select Create Motion Tween.
01:04That turns that layer blue.
01:07Again, I have my starting keyframe with it blurry.
01:10So I'm going to go into about frame 15, right when this word shows up.
01:16That's when I want this to become sharp.
01:19So, I will select that movie clip, go to my Properties panel, under Filters.
01:24I'll change the blur to zero.
01:27You can see it becomes sharp.
01:28So, scrub back, and if I hit the Enter key, you can see it blur in. Very nice!
01:36That's exactly what I want.
01:38In fact, I like that so much, I want to reuse it later on.
01:42If you want to reuse any motion tween, all you need to do is select that motion
01:47tween, do a right-click, and then Save as Motion Preset.
01:51I'll select that, and I'm going to save this as Blur In.
01:57Select OK. Now I'm going to go to Window, and open up my Motion Presets panel,
02:05because, just below the Default presets folder, if I close it, you'll see Custom Presets.
02:11So here's where all your custom presets will be listed.
02:14So, Blur In is what I want to use, actually for another graphic that I'm going to bring in.
02:20So, I'm going to close the Motion Presets panel.
02:23I'm going to create a new layer, and this is just going to be called
02:27environmentally friendly, because on this layer, I'm going to drop in another graphic.
02:37This other graphic is in my Library panel, in the Assets folder. Here's my
02:42graphic I want to use, and I'll drop it right on the stage, right about here.
02:49I actually want it to appear later.
02:52So, I'm going to click and drag this keyframe all the way down, because I want
02:56it to appear right down here when you see this word "style" come in.
03:02So, that's where I want it to appear.
03:05At that point, I don't want to see that "more than" word either.
03:10So what I can do is always grab that end and scoot it in to right about frame 90.
03:17So now that goes away, and then there's my word: environmentally friendly.
03:22So, to apply that motion preset that I made earlier, all I need to do is select
03:28that movie clip, go the Window, down to Motion Presets,
03:33open up the Motion Presets panel,
03:35select that Custom presets, and click Apply.
03:39I'll close that panel.
03:43Notice how it will extend out that layer quite a distance, and that's because
03:49that's how long the motion preset was that I made earlier.
03:52But I can always easily grab that end and bring it on in and adjust it accordingly.
03:57So I can have it end at about frame 110.
04:02If I want to adjust it further, I can always hold down the Command key to select
04:08that keyframe, and then adjust that keyframe as well.
04:12So I can have it blur over sort of a longer period of time.
04:16But again, you can see that it applies that motion preset.
04:19That text comes in, that movie clip, and then it displays exactly right.
04:26I didn't have to animate this again.
04:28I just saved out a motion preset, and then applied it to it.
04:32Really take advantage of making your own custom motion presets,
04:37because you'll save a lot of time, and you're still able to fully modify them
04:41if you want to, as well.
Collapse this transcript
4. Simulating Real-World Movement
Creating animation inside animation
00:00The great thing about symbols is that they contain their own timeline.
00:04That means you can animate the contents of the symbol while animating the symbol itself.
00:10And that's what I am doing with this fish.
00:12I can have the fins flap while it animates across the screen.
00:18So I have this Background layer locked, and what I am going to do is I am going
00:22to select all the parts of this fish and drag it into the library.
00:27And I'm going to convert the convert this to a movie clip, and it can be called fish.
00:33So there's my movie clip. So if I double- click on this fish, notice that I have
00:39a new timeline right in here.
00:41And notice that I'm inside of the fish movie clip.
00:45So let me just zoom in on the contents here.
00:49So, notice it contains different movie clips and my first goal is to put all of
00:55these movie clips on their own layer because they're all on layer 1.
00:59Well, what I can do is with my Selection tool, I am going to select all these graphics.
01:04I will do a right-click, and I'll distribute to layers.
01:11That takes all the content and distributes it to layers.
01:14So I have the fin, the body, and then the tail.
01:17In fact, I don't even need this layer 1, so I'll click that trashcan and delete it.
01:23So I do want to animate couple of different body parts, so I am going to go
01:27ahead and extend out the timeline for these three layers to about frame 15, just
01:33by doing a right-click, and Insert Frame.
01:36Currently, nothing is happening.
01:38I am hitting the Enter key and nothing is going on, but I do want to animate,
01:44starting with the fin.
01:46So I want the fin to actually pivot from the right side.
01:50So in order to do that, I need to move this registration point right here.
01:55So I am going to go ahead and select my Free Transform tool. I'm able to
02:00move that registration point just to the right side, just like that.
02:05And now, when I scale it, or whatever, you can see that it's going to pivot
02:09it from that point. I have it set up.
02:14Now all I need to do is do a right- click, and create a motion tween, so it
02:22turns that layer blue.
02:24Now, in about 7 frames, well that's when I can adjust this.
02:30So maybe I'll sort of scrunch it in, and maybe I'll even skew it so if I
02:34roll over that line right there, I can sort of skew it down if I want to.
02:40Something like that, so it animates at an angle,
02:42so starting position, ending position.
02:46And then I need to scroll out to frame 15 and then bring that back into place,
02:53kind of like that.
02:59Ending position. Starting position.
03:02We can see that fin flap.
03:03Looks pretty darn good.
03:04Now, let's go ahead and take the tail, and we're going to do the same thing.
03:08Again, using Free Transform tool, I can move that registration point, just like that.
03:14I'll do a right-click and create a motion tween.
03:19And it's the same process of going in about 7 frames and then sort of
03:24scrunching up the tail.
03:26Let's make it a little more dramatic, maybe kind of like that.
03:30And I can skew it if I want to put it at an angle and then frame 15, I can bring
03:36it back like that and then stretch it back out.
03:39And notice how the ending frame and the first frame are the same.
03:43You can also use your Transform panel.
03:47So if go to Window, down to Transform, I can open up that Transform panel.
03:52And as you'll notice, the width isn't quite 100%, so I can type into 100% right there.
03:59Notice this skew. It says 1.8.
04:01Well, I want that to be 0.
04:05I can enter in 0, right there.
04:06So if you want exact control you can use your Transform panel.
04:10But what I have going on now, if I just hit the Enter key, you can see that the
04:15fin and the tail are kind of flapping appropriately.
04:18So let's go back to scene 1.
04:19I am going to click on scene 1.
04:22And my timeline in scene 1 is just 1 frame.
04:28So if I do a test movie, we should see that fish animate. And I'm pointing that
04:36out to you because it shows that the timeline for a movie clip is independent
04:42of the main timeline.
04:44I can have this be a pretty robust animation, and yet it will play through,
04:49regardless of what's going on on the main timeline.
04:54So my next step is to move this fish across the screen.
05:00But what I am going to do is I'm actually going to take this fish right here,
05:06and I'm going to drag him into the library.
05:09And I'm going to make this new movie clip symbol, and I am going to call it fish animation.
05:17This is going to be a symbol that's going to contain my fish animation. Select OK.
05:23Now, I am going to just change my view so I can see everything.
05:27So I'm going to do a Show All.
05:29Now I can see the entire screen, all the content.
05:33And what I want to do now is just kind of position this sort of off to the side over here.
05:40But remember, this is my fish animation movie clip, and I haven't
05:44animated anything in here.
05:45So I am going to double-click on that fish, and this is the fish animation movie clip.
05:51And what I can do in this movie clip is I can animate this fish.
05:56So I am going to animate him across the screen, let's say in about to 30 frames.
06:01So I'll extend the timeline by selecting Insert Frame.
06:06And starting position is going to kind of off the screen over here.
06:12And I can go ahead and do a right-click, and create a motion tween, because I
06:18want him to move from over here, clear over to about frame 30.
06:23So now I can drag him right over here to this side of the screen.
06:30And if I scrub the timeline, you can see the fish go.
06:33In fact, if I hit Enter, you can see he goes pretty fast.
06:36So I am going to go ahead and extend out this timeline just by clicking and
06:40dragging on the right side.
06:42So there's my fish moving across the screen.
06:44Again, we're inside of fish animation.
06:49And you know what's inside of this fish is, of course, my animation of the fins,
06:55so we're three levels deep.
06:58But again, I have an animation that's inside of another animation.
07:05My main timeline is still only one frame long.
07:10So let's do a test movie.
07:14See my fish swim across the screen.
07:16All right, that looks pretty good.
07:18But you might be wondering, why did I put this fish animation in its own movie clip?
07:25Well, I did that so I can add multiple fish.
07:29So, I'm going to go ahead and extend my main timeline out to about 40 frames,
07:36and I am going to add a new layer.
07:38And on this new layer, I am going to drop on another fish, and I am going to use
07:43that fish animation.
07:44So I can drop on another fish, right here on this new layer,
07:48that I will evenly name to fish.
07:52And with this new fish, I can have that new fish coming at about frame 10.
08:00Another thing I can do, since this is another instance of the movie clip, is I can scale it up,
08:07and that manipulate this all I want.
08:09This might be even larger than that.
08:11There is my larger fish that's going to enter at about frame 10.
08:15I can do that a couple more times if I want to.
08:18I'll just do it one more time.
08:20Again, drop on a fish, and this one's going to be smaller so I'll shrink it
08:24down, and then position it, say, right there.
08:29And lastly, I will move that movie clip in.
08:35These three animations are going to play, but I still need to extend out this
08:40main timeline a little more,
08:42just so each one of these animations have time to play, because my main
08:48timeline loops through.
08:50So I am just going to go ahead and scrub down here to about frame 100 and insert a frame.
09:01So that's how long my timeline is, so these three fish will play.
09:06So let's go ahead and try this out.
09:08I'll do a test movie.
09:09There is my three fish, and they actually go pretty fast.
09:14And this one actually disappears sooner, but take a look at what happens.
09:20These movie clips actually loop.
09:23So if you have animation inside of a movie clip, it's going to loop over and over again.
09:28So this is just a quick example of how you can animate the contents of the movie clip,
09:33and then turn around and animate the movie clip itself, and use it as many
09:39times as you want.
Collapse this transcript
Animating along a path
00:00One of the things that I like most about using the motion tween is the motion
00:05path that you're given.
00:07The great thing about this motion path is that it can be edited.
00:10And that's what I want to do with this fish here.
00:13This is the fish animation movie clip, so I'm going to double-click on it, and
00:18inside there, you'll see this motion path. And currently this fish just
00:21travels at a straight line.
00:24Not very appealing and not very natural either, so what I want to do is just add
00:29a curve to this line.
00:31First thing I'm going to do, just to make the line easier to see, is I can
00:35double-click on the color here, which represents the color of that motion path,
00:39and in Layer Properties, I can just change this to something easier to see, such as a blue.
00:48Select OK and now we can see that dark blue line.
00:51So again, I'm just going to select my Selection tool. I'm going to make sure that
00:56line isn't currently selected, because all I need to do is just roll over it, and
01:01then I'm given this icon that's this curve the line.
01:04And that allows me to take and curve out that line, so I can curve this motion
01:09path any way I want. In fact, let's have the fish kind of dip down like that.
01:16Pretty dramatic dip. But in general, I can hit the Enter key, and we can watch
01:21that fish follow that path.
01:24Pretty nice and pretty easy to do. In fact, what I can do is I can use the
01:28Subselection tool and select either end point. And as I select an end point,
01:35I'm given these Bezier points.
01:36So I can manipulate those Bezier points if I want that sort of control.
01:42And this might be more of what I'm after, which is this fish kind of traveling at
01:48this sort of angle like a wave.
01:50So again, I'll just hit the Enter key, and we can watch it follow that path.
01:56You might want to actually just start from scratch and draw your own motion path.
02:01Well, you can do that.
02:02And that's what I'm going to do now. I'm going to create a new layer. And using the
02:07Pen tool, I'm going to go ahead and draw a line.
02:10So the Pen tool is selected. I'm just going to draw a black line, kind of like
02:17that, pretty unique, these sort of low, and then this really high points, but
02:25roughly I've just drawn out this wave with my Pen tool.
02:29And even from there, I can still use my Subselection tool to manipulate it, but
02:35the point is is I can draw any sort of path I want, that I want to use for
02:41this animated fish.
02:43So let's go ahead and create a line, something kind of like that. I'd say
02:48that looks pretty good.
02:49What I'm going to do now is with my Selection tool, I'm going to select that
02:55line, and I'm going to go to Edit, and I want to cut it.
02:59And since I don't need this layer anymore, I'm going to delete that layer, because
03:04I want to go to this layer, where that motion tween exists, and then all I need
03:10to do is do an Edit > Paste in Place.
03:16When I do that, it overrides that previous motion path, and it gives me that
03:22line that I created my Pen tool.
03:25So now you can see that fish follow that path.
03:28And still it's editable, so I can still use my Subselection tool, and it
03:33manipulate any one of those points just as easily.
03:37So that was just a quick example of how you can manipulate any sort of motion
03:41path to simulate sort of more organic natural motion.
03:47Now, let's keep in mind that I was inside of this fish animation movie clip, so
03:52if I go to scene 1, you'll notice that there are actually other fish here.
03:56So I'm going to go do a test movie, just to see our results.
04:02And sure enough, we can see all of our fish sort of following that wave motion
04:08that I've created. But again, a quick example of editing motion paths to really
04:13stimulate a nice, organic, sort of natural feel, that can be fully customized.
Collapse this transcript
Morphing shapes
00:00Sometimes you might find the need to animate a shape morphing, and what I mean
00:06by that is potentially like a tomato sort of splatting, or some liquid effect, even such a
00:13thing as a jellyfish, which is what I want to animate in this scene right here.
00:18So what I'm going to do is I'm going to go ahead and create a new layer, and I'm
00:22going to call it jellyfish.
00:24So I want to animate a jellyfish organically moving through the water.
00:30So with that layer selected, I'm going to open up this fish parts folder, and
00:36this Jellyfish Animation movie clip is the one I want to use.
00:39So I'm just going to click and drag it onto the stage.
00:44So there is my jellyfish, and I'll go ahead and zoom in on this jellyfish, and
00:50I'll double-click it to enter the jellyfish animation timeline. You can see
00:56it does animate up. That's fine.
00:59I actually want to double-click on it again.
01:01So now I'm actually editing the jellyfish.
01:05This jellyfish contains the body of the jellyfish and then the legs.
01:11Now, all of these legs are an instance of the jellyfish leg.
01:15So the nice thing there is the fact that I only have to animate one.
01:20So I'll double-click it.
01:22Now, again I'm four levels deep down into the jellyfish leg, and I want this to morph.
01:29I want it to basically change shapes.
01:32So how I'm going to do that is I'm going to actually go down to about frame 40,
01:39and I'm going to go ahead and select Insert Frame, because that's how long I
01:46want my animation to be.
01:48Now, what I can do is I could insert a keyframe down here in frame 40.
01:55Insert Keyframe, and then also what I want to do is I want to click in between
02:02those two keyframes, and instead of choosing Motion Tween or Classic Tween,
02:08what's available to me is the Shape Tween.
02:12So unlike if you're going to be doing a motion tween or classic tween, a shape
02:16tween has to happen on - you guessed it - a shape.
02:20So if I select this and I look at my Properties panel, it is a Drawing object,
02:25and this could just as easily be a shape as well.
02:28But in general, this is not a movie clip. It's not a button.
02:32It's not a graphic symbol.
02:33It's not an instance of anything.
02:35It is just a line that was drawn.
02:39So I need to make sure it's just a drawing object, or just a shape.
02:44If I could just go ahead and go to Modify, I can break this apart.
02:50I've selected Break Apart, and now you can see that it's actually a raw shape.
02:55That's what I would now want to morph.
02:59I've defined the beginning point and the end point.
03:02I do need to modify the line, but again, the first thing I'm going to do is I'm
03:08going to go ahead and create a shape tween.
03:10I selected the shape tween, and it gives me this green arrow.
03:15So again, nothing is happening.
03:17My start point and end point are exactly the same, because right here in the
03:21center, this is where I want to adjust the line.
03:25So I'm going to right-click, and I'm going to insert a keyframe.
03:30Now, I can go ahead and modify this line.
03:32I could do it a number of ways, but what I'm going to use is the Subselection
03:36tool, because if I select that line, you can see I'm given all these different
03:40control points I can then modify.
03:44This might give you the control you need, but again, I'm just going to kind of
03:47scrunch this up into a half circle almost.
04:02Notice how it's looking pretty rough.
04:04So I'm going to use my Selection tool.
04:07If I double-click on this line, what I can do in order to smooth it out, since it
04:12is just a shape, is I can go down here to the Tools panel. Right down here, second
04:18from the last option is Smooth.
04:19So if I click that Smooth, you can see it starts to smooth out that line.
04:25So it definitely smoothed it out.
04:27I have less points to deal with.
04:29So if I go back in here with my Subselection tool, you can see that I have less points.
04:34So again, that's another little tip that's really helpful if you're dealing
04:37with actual, raw shapes.
04:39So this is looking better.
04:42I'm just modifying this line.
04:44I am going to give this a nice curve, and again, let's just smooth it out a little more.
04:50Click that a couple times, and that's what I want.
04:53Remember, this is the center point, right here at about frame 20.
04:56So it starts here, and if I hit Enter, you can see it morph into this nice curve
05:03and then back out to the way it was.
05:06So that's just a quick morph, and this could be a line.
05:08It could be any other type of shape.
05:12Just keep in mind it has to be a shape, and it shouldn't be an instance of a symbol.
05:16So that's what it makes shape tweens unique.
05:20Again, this is the jellyfish leg, so if I go back to jellyfish, note that these
05:24are all instances of that animation.
05:28So I can click on this back one back here.
05:30If I double-click on it, notice that it's still an instance of that
05:33jellyfish leg, and it will move appropriately.
05:36Also, note that I flipped it, and that's why it actually bows out the other direction.
05:42So if I click on jellyfish, this has actually been flipped using the Transform panel.
05:50It's actually been adjusted that way.
05:51So, each one is going to be a little bit different if I start to look at
05:54this Transform panel.
05:57That's all I really needed to do is just modify this line, so the legs kind of bow out.
06:01Now, I'll go back to Jellyfish Animation and note that the jellyfish actually
06:07will animate from that point on up.
06:11So if I click back on scene 1, notice that I probably need to move this
06:15jellyfish down off the bottom of the stage.
06:20So I'm going to go ahead and change the view to Show All.
06:25That allows me to select that jellyfish and then move it on down.
06:31I don't want that jellyfish to start animating when all the fish start coming in.
06:37I want it to come in later.
06:38So I'll just move this keyframe on down to about frame 30.
06:43With that in place, let's go ahead and take a look at this animation. Then there it is.
06:51So you can see how the legs morph, and that jellyfish animates upward.
07:00The reason he disappears is because it's actually playing through the timeline.
07:04So it actually goes to the end of this timeline and then restarts everything
07:08regardless of where it's at.
07:11I'm going to fix that later, but do you know that the morph is happening.
07:14And if I test this one more time, you'll see the jellyfish animate across.
07:20From there, since this is the jellyfish animation, I can actually add as many
07:25movie clips as I want, create quite a few jellyfish, if I want to as well.
07:30But again, that's just a simple example of how you can take just what is simply a
07:34line and morph it into pretty much anything you want.
Collapse this transcript
Animating objects in 3D
00:00One of the most exciting features that Flash has is the ability to manipulate
00:05graphics within 3D space, and that's what I want to do in this underwater scene.
00:10I want to manipulate some graphics, and those graphics are just going to be some text.
00:16So I am going to create a new layer, and this is going to be eco as the name of
00:22this layer because I am going to use the Text tool, and just type in "eco."
00:29So this is the graphic I want to manipulate in 3D space.
00:32So the first thing I need to do is I need to convert it to a movie clip.
00:36So I am going to drag it to the library and call it eco and my registration
00:41point is going to be in the center. I will click OK.
00:45So there's the text I want to manipulate, and I will just zoom in on this text
00:49really fast, and what I need to do next is go down to that fourth tool here,
00:57the 3D Rotation tool.
01:00So as I select that tool, I'm given these circular lines.
01:06So I can adjust the X position.
01:07If I rotate that vertical line, I can see it spin. There's the Y position as
01:15well, or I can even use this outer line -
01:19this orange line - and manipulate it in 3D space.
01:24So definitely pretty nice.
01:25I can go ahead and angle that in something like that.
01:28I am going to go ahead and create a new layer, and this time, I am going to type
01:35in friendly, and I'll drag that to the library, and call it "friendly."
01:45It's a movie clip, registration point in the center, click OK, and I can do the
01:49same thing, by selecting that fourth tool down with this text.
01:54So I can kind of angle it in.
01:57The idea is I want this text to float up as if it's floating up in water,
02:03and this is lighter than the water.
02:05So that's the effect I want to do, and luckily, what I can do is I can actually
02:11animate these objects in 3D space, and this is really a pseudo 3D.
02:16It's not true 3D as in I am able to import a 3D model. But again, it will take
02:23any object and put it on a flat plane.
02:25So I am going to start with this eco layer and this eco object, and I am
02:29going to animate it up
02:31so it follows the same principles of making sure it's a movie clip, on its own
02:36layer, then I can Create Motion Tween.
02:39So I am going to go ahead and Show All to show everything on my stage right
02:46here, and then I am going to select the Selection tool and move this down.
02:51In fact, let's go to frame 1 and sort of move it down off the stage.
02:57Now, let's go to frame 30.
02:59I can then bring it into place.
03:02So it might start at an angle down here.
03:06In fact, let's kind of rotate it a little more, flip it like that, and you can
03:15see it animate, and then at this point, I want to go ahead and flatten it out a little more.
03:23So again, it might take a little getting used to.
03:25Well, I just rotate it around, just like that, and you can always manipulate any
03:31one of these lines accordingly to get that angle that you're looking for. There we go.
03:39That's what I want.
03:40Again, it starts down here and then floats up into position right there, and I
03:47can add a couple more keyframes.
03:49Frame 70, I can go ahead and have it move a little bit, and even have it move
03:56up a little as well.
03:58So from 30 to 60, it continues to float, and then clear down here at the very
04:04end, that's when I am going to go ahead and move that object off of the stage,
04:10and use that 3D Rotation tool to manipulate it.
04:15This is a case, since I am animating something off the stage - it starts off the
04:21stage and ends off the stage -
04:22I probably want to change my view.
04:25I want to change my view, so I can see everything on the pasteboard.
04:30So that will show all of the content that's beyond the viewable area.
04:35This allows me to use the Selection tool and move this object completely off
04:42the stage like that.
04:44That's what it does from frame 70 on to 120.
04:49You can see it float off.
04:50So that's looking pretty good.
04:51I like the motion it has.
04:54I am going to do the same thing with this friendly movie clip, and I am going to
04:58rename that layer to "friendly."
04:59Now I am going to go ahead and right-click, and Create Motion tween.
05:05I will scroll down and again, this one is going to start off the stage like that.
05:11In fact, I will manipulate it some more, and maybe make it backwards, kind of
05:20like that, rotate it this way. There we go!
05:27It's going to start there, and it's going to land in place
05:32the same time the word "eco" does as well.
05:35I can move that back up, use the Rotation tool again to rotate it into place.
05:42Now, I can understand that these lines can get kind of tricky -
05:47maybe you're not used to dealing with them, maybe you just don't want to - and
05:50that's perfectly fine because you can go beyond using these lines, and actually
05:58use the Transform panel.
06:01So I am going to go to Window and open up Transform, because in the
06:05Transform panel, you have the ability to manipulate the 3D rotation based
06:10on these coordinates.
06:12So if I did want to flatten this out, I might want to change all of these to 0,
06:18even the Rotate to 0.
06:20So now I have something perfectly flat, and I can always manipulate it
06:25accordingly if I want to.
06:27But feel free, if you need to reset something back to 0,
06:30you can do that using the Transform panel, and let's just position this kind of like that,
06:38go down to frame 70, and again it continues to sort of float up in the water.
06:44So I'll move it up and manipulate it a little more, and then I'll scroll down to
06:53frame 120, move it off the stage and then rotate it even further, kind of like that.
07:03All right! So let's check that.
07:04Move down, and now it rotates into place, it looks good, in a 3D fashion, pauses
07:15there, and then floats up.
07:18Another thing you can do is I am going to create a new layer, and I'm just going
07:23to call this Recycle.
07:24But you can actually use pre-built 3D settings as well.
07:31So I am going to go ahead and select this recycle movie clip, and drop it onto
07:38the stage, and I am going to make sure this icon exists at about frame 30 when
07:43you can see that word.
07:45I will just reposition it.
07:47In fact, just to give it even a cooler look, I will select this movie clip, and
07:52I'll change the display to Overlay.
07:55So we get that nice blue look, and really this is just an accent graphic for these words.
08:01So again, I can even put it on top, and what I want to do is I am going to go to
08:06Window, and go to Motion Presets because in my Motion Presets panel, under the
08:12default presets, notice there is a couple 3D motion tweens that you can use.
08:18I want to use this spiral-3D.
08:20So I am going to select that movie clip, select that motion preset, and click Apply.
08:28Now, I will close that Motion Preset panel, and again once, those words come together,
08:33that's when you see that eco friendly symbol, and you can see it twirl around.
08:39I can start to adjust this further.
08:40I can actually decrease the length of it.
08:43So at about frame 70, I can even move it up with that text, but in general, it's
08:50going to actually just spin really fast and then disappear.
08:55So again, that was just using a quick motion preset to add a nice 3D accent to these graphics.
09:02So let's go ahead and watch it in action.
09:04Remember, there's actually quite a bit going on.
09:06So if I hit Enter, you'll see that animate, just like that.
09:10That looks pretty good.
09:13If I do a test movie, everything is going to play, including the fish, as well as
09:19the jellyfish and the text.
09:23So you can see that come in, and then you can see that jellyfish kind of bust
09:29through it at that point, and that works pretty good.
09:33I encourage you to use the 3D Rotation tool.
09:36It will add another dimension to any graphics that you are creating, as well as
09:41any animation you plan on implementing.
Collapse this transcript
5. Creating Character Animation
Adding bones to a character
00:00Flash is very powerful when creating animation, especially when it comes to
00:04character animation, and that's what I want to do with this file in particular. This movie clip,
00:11if I double-click on it,
00:13this is the character that I ultimately want to animate, but I first need to
00:17give it some structure.
00:19But what it's made up of currently are a bunch of different movie clips.
00:25So I've taken the silhouette, and I have broken out the different body parts
00:29into separate movie clips that I now want to join together, so you can't
00:34move them independently.
00:37So that's what I want to do, and the first thing I am going to do is zoom in on
00:41all these graphics. And I am going to link each one of these movie clips
00:46together using the Bone tool.
00:49So I'll select the Bone tool, and I am going to start down here at the base, and
00:54all I need to do is just do a click and drag from this space, and what I'm about
01:00to create is this armature.
01:02I'll just do a click and drag from the upper body to the stomach, and now I've
01:09connected those two.
01:11Now, let's connect the stomach with the waist right here, just do a click and
01:15drag to the waist, go from the waist to the upper leg right here.
01:21Then I am going to go from this upper leg to this lower leg, but I actually
01:28want to connect right to this knee right here, because I want this to be the rotation point.
01:34So I'll just click and drag to that knee.
01:37Let's go from the knee to the foot.
01:40Again, I want to kind of determine where the joint is going to be, the rotation
01:43point, and then release.
01:46Then let's go from the foot to this toe, and I'll show you why I added that
01:50toe in a little bit.
01:53But in general, what I've done is I've added the structure to this character,
01:58and I can just go ahead and use my Selection tool. And now all of a sudden our
02:04character is swimming, or doing whatever we want this character to do.
02:09But it's not without its issues because notice how the base moves.
02:13So that's one thing I want to take care of right now, and then I'll take care of
02:16some of the other rotation issues.
02:18But this base moving around is because of this armature is moving around as well.
02:25So I need to lock down this armature.
02:28So I am going to select that armature, and I am going to go to the
02:31Properties panel, and in the Properties panel, it gives me all the properties for
02:36this bone or this armature.
02:39But in general, I'm going to disable the Rotation.
02:43So I am going to uncheck that.
02:46Now, I can go ahead and move the lower body without the upper body moving.
02:55So far so good, but still we have some issues because, of course, the knee
02:59wouldn't quite bend that way.
03:02I need to lock that down now.
03:04So I am going to go ahead and stretch out her leg like that and let me just zoom
03:10in on this armature right here.
03:14Again, I don't want it to rotate 360 degrees. I want to constrain it.
03:20So with that armature selected, I am going to go to the
03:23Joint Rotation and check Constrain.
03:26When I do that, I am given this sort of rotation area.
03:31So there's the minimum, and then there's the maximum that it can rotate, and
03:35this is its current position.
03:37So if I just scale down the Max to where it aligns up, again with that
03:44line because I don't want it to extend any more to the right, then it will be constrained.
03:50So let's just try that.
03:51Sure enough, it doesn't go beyond that point.
03:55The next coordinate I want to change which is going to be - if I select that
04:04armature there - is going to be the Minimum.
04:06So I am going to take the Minimum down because I want to be able to rotate the
04:12knee around more as well.
04:15Again, I'm able to constrain any rotation just by selecting that armature and
04:21then adjusting the minimum and the maximum.
04:24This is much more appropriate.
04:25I do have the same problem with the foot, and that's why I've actually connected
04:30this armature from the foot to the toe.
04:32I don't have any plans to animate the toe, but what that does give me the
04:36ability to do is rotate this foot.
04:40I do want to rotate the foot some, just not that much.
04:43So again it's a matter of selecting the armature, checking Constrain, and then
04:48controlling the minimum and maximum that you want this foot to rotate.
04:53Again, it's not going to be that much, but I do want to have a little bit of
04:57sort of natural movement with this foot as well.
05:00So let's just do a couple of more edits, kind of like that.
05:03We will increase the maximum, and then there we have it.
05:07So the foot rotates just fine. So far, so good.
05:12I'm going to hold down the Spacebar and pan over here.
05:16You might run into a case also where your movie clip might be off a little bit,
05:20as you start to rotate your character.
05:23So what I need to do in this case is I need to move this leg over a touch.
05:27I am going to do that really fast by just holding down the Option key or Alt
05:33key if you are on the Mac, and you can move that movie clip independent of the other movie clips.
05:40That allows me to kind of move out that movie clip appropriately, and then I can
05:45even use the Free Transform tool to position it as well.
05:49So you still have a lot of control, even once you add the structure for your character.
05:56So let me go ahead and zoom out to about 200%, maybe about 100%, just to see this
06:04person's body and again, I can go ahead and straighten them out.
06:09That's what I want something more like say a perfect handstand, and I can do a
06:14couple more tweaks if I want to, using the Free Transform tool, because I want a
06:18perfect handstand for this character.
06:21Because if I go back to scene 1, I can now position this character to become the
06:27L for the word "Style."
06:32It's set up, so I can actually just link movie clips, and manipulate them
06:37together as if they're one complete unit.
06:40But this is set up for me to go ahead and add some animation to it as well.
Collapse this transcript
Animating character poses
00:00Once you've added a bone structure to your character, you can then move on to
00:04animating that character.
00:06So let's take a look at my character, because right here, as I zoom in on this
00:12movie clip, this is actually my armstand movie clip.
00:16If I double-click on it, notice that it already has a structure in place.
00:21Again, I've just used the Bone tool to connect these different movie clips, and
00:25now I can actually move this character.
00:27But what I want to do next, as opposed to just moving them, is I want to build an
00:32animation, so this person actually animates.
00:34So I am going to do this by adding separate poses. And so if you'll notice, in my
00:40timeline, there is Armature_14.
00:43So that is all of these graphics connected together.
00:48But I don't need these other layers.
00:50So I'll select layer 2 and delete it, and I'll select this armstand layer
00:55as well and delete it, because right in here, this is where I want to create my poses.
01:01But notice, there is actually a keyframe there already, and that defines this pose.
01:08So what I want to do is I want to insert another pose at about frame 15.
01:13So I am going to just do a right-click to insert a pose.
01:18I've inserted a pose at frame 15.
01:21Now, what I can do is I can go ahead and manipulate this body to something like that.
01:28I will deselect it, and let's watch it move, frame 1 clear to frame 15, we
01:35see that nice motion.
01:37Very nice, how everything is linked together, everything moves very smooth, and
01:42I can continue to add more poses.
01:44So let's go to frame 30 and again, I'll do a right-click, and I'll insert a
01:49pose, and again, I'll move this person's body maybe out to that direction, and
01:55I'll just kind of bend the knee.
01:57But really, I have a lot of control for manipulating this character.
02:02Again, the animation just gets built out.
02:05So that looks good like that, like that. Looks great!
02:09What I want to do next is I want this character to end up at the first pose this
02:15character started with.
02:16So I am going to extend out the timeline.
02:19Let's go to frame 45, and I am just going to insert a frame.
02:24That extends out that timeline.
02:26Right down here, that's where I want to insert that pose.
02:29So let me go to my pose right here, and if I do a Command+Click or Ctrl+Click if
02:35you are on a PC, then I can select just that one pose.
02:40So with it selected, I'll just do a right-click, and I want to copy this pose.
02:46So, let's copy this pose.
02:47Let's go down here, and I am going to select that last frame, right-click, and
02:55then go down to Paste Pose.
02:59Then there's that pose.
03:00So again, back to its original position.
03:02If I go to frame 1 and hit the Enter key, I can see that person do that sort of movement.
03:09Very nice!
03:11Lastly, I'm just going to insert some additional frames, just so the person stays
03:15at this angle for a little while.
03:18Frame 60, Insert Frame again, just so there is a little bit of a pause at this angle.
03:24Let's click back on scene 1.
03:27Let's do a Control > Test Movie, just to watch this in action.
03:32There we go, just a really simple example of animating poses.
03:37Again, you've got to make sure your structure is in place, using your Bone tool,
03:41and then animating, as you just noticed, is really a breeze.
Collapse this transcript
Creating organic movement
00:00Usually when you think of the Bone tool, you might think of animating something
00:04that of course has bones.
00:06But you can do more with it than just that, because I'm going to use the Bone
00:10tool to animate this flower.
00:12I'm going to go ahead and double-click on this flower movie clip, and I'm going
00:17to zoom in on the contents in here, and if I select this flower, you'll notice
00:22that it's just a shape.
00:23So there are no movie clips involved here. It's just short of a raw shape.
00:28Again, I want to add structure to it, and I'm going to do that using the Bone tool.
00:33So I'm going to select the Bone tool, and with the shape, I'm going to start giving it some structure.
00:38I'm going to click and drag an armature out to connect those two parts, and I'll
00:45connect sort of this stem out here, to this part of the base of that leaf, out
00:50here, and again, you can see how I'm adding structure right here.
00:54I'll even click and drag and connect to this leaf here.
00:59I'm adding structure to this sort of organic shape right here.
01:03I'll click and drag clear up hear to this flower right there.
01:08Then I'll just do a simple click and drag over here to this branch for this flower.
01:14So I've given it some structure, and let's take a look at what happens if I use
01:19my Selection tool and manipulate these armatures.
01:23Well, look at that.
01:24You get this nice, sort of bendy, organic movement.
01:29And again, I didn't have to do any morphing or anything.
01:32It's just a matter of using the Bone tool, and then you can manipulate
01:37objects more organically.
01:39You can kind of see how that works.
01:40So this is going to work out really well for me.
01:43But that's my next step is to animate these different armatures.
01:46I'm going to bring these armatures down some.
01:50I'll just grab each one of these.
01:53Bring this leaf down. Bring this flower over here.
02:03So that's going to be its starting position.
02:06It's going to be kind of like that.
02:09And notice that I've been working on this layer. This is armatures 16.
02:13I don't need this flower layer,
02:15so I'll select it and just click Delete. And now I can begin to animate, because
02:21in this layer, this is my first pose.
02:24So if I want to add another pose, I can come down here to about frame 30, do a
02:31right-click, and I can Insert Pose. So that's pose 2.
02:36I can go ahead and select that armature and move the flower sort of onto the
02:42screen a little more.
02:43Move these leaves into place, bring up this branch of these leaves as well.
02:49So that's like it's just coming into view.
02:51It's going to be nice just to manipulate each one of these armatures you can
02:54see sort of more of this flower.
02:56So let's start out.
02:58Frame 1, I'll just hit the Enter key, and you can see it come in to place just like that.
03:03That's very nice how that kind of comes together.
03:07I'm going to go ahead and do a right- click, and I'm just going to insert a frame
03:12at about frame 45, and what I want to do is I actually want my flower to be at
03:20this position for a little bit.
03:22So I'm going to actually copy this pose.
03:25So I'm going to hold down the Command key if you are on a Mac or Control key
03:28if you're on a PC, and then I can copy this pose, so I just do a right-click on that as well.
03:35Copy that pose, hold down the Command key or Control key if you're on a PC, and
03:41then I can Paste Pose.
03:44So now, this flower is going to be in that same position for a little while, and
03:52then I want to do the same process because I ultimately want to get this flower
03:56back into its original position.
03:58So it animates up into that position, and then it's going to come back down.
04:03So I'm going to go ahead and copy this pose.
04:11Command key, right-click > Copy Pose or Control key if you're on a PC, and then
04:19come down here, and it's a matter of inserting frames, and then I can paste this pose.
04:28Looks good.
04:30I'll hit the Enter key and you can watch it play through.
04:34Keep in mind I can still manipulate this flower at any point in time.
04:39I can come to say frame 30, and I can select it and if I decide to sort of bring
04:44it up even higher like that I can do that.
04:47Now it kind of comes in a position like that.
04:49It still kind of moves around, and I like that additional motion that we have here.
04:53So again, I'm just manipulating these various armatures, and you can see
05:00that flower still move.
05:02Again, we're just bringing life to this graphic.
05:07I'll hit the Enter key, and then it animates, and then back down.
05:13Again, this works just like any other motion tween,
05:16in that I can grab the end and I could say make it happen faster, so I can move
05:24it to the left so it comes up faster and then back out faster, or I can extend
05:29it out further to about frame 100.
05:33Now it's going to happen a lot slower.
05:36So let's see our final result in action.
05:38I'll go to Control > Test Movie.
05:40Let's test this out.
05:42Keep in mind that our L in our word "Style" will animate as well.
05:47But again, you can see that flower moving into place.
05:51It's really nice how that's kind of flowing and pretty easy to do, all using the
05:56Bone tool and then just inserting poses.
Collapse this transcript
Adding springiness
00:00There are actually some additional settings you can add when using the Bone tool
00:05that really can mimic real-world movement without very much work.
00:11And that's what I want to do with this earring here.
00:13So I am going to double-click on it and zoom in on the contents, because notice
00:19that it's made up of various movie clips.
00:23So the first thing I need to do is link these different movie clips together.
00:27So I am going to select the Bone tool, and I am just going to click and drag to
00:34start linking these movie clips together.
00:37So I am creating my structure right now, kind of like that, so I have my added Bone
00:44structure, and it did create this armature 18.
00:47So, I'll just select that layer and delete it, and it adds this pose right here.
00:54So I have added the structure, I have a pose here now, and I'll go into about
01:00frame 15, and I am going to insert another pose.
01:05So the start pose is actually going to be a little different. So I am going to use
01:09the Selection tool, and I am just going to click and drag this earring up, kind of like that.
01:17And I'll just hold down the Spacebar to make sure I can see all this.
01:22But my earring is basically going to start kind of from this location,
01:26something kind of like that.
01:29That looks pretty good, and if I hit the Enter key, you could see it swing into place.
01:38I am also going to extend out my frames as well to about frame 80.
01:42I am going to select frame 80, and I am just going to insert a frame.
01:47But even though there are all these extra frames, there is really no motion that
01:53happens beyond frame 15, currently.
01:57But I can add motion, and actually I want to add sort of a swinging motion for this earring.
02:03And I am going to do that using springiness.
02:06And if I select these armatures, I am just holding them with Shift key, and I am
02:11going to be able to select all these armatures.
02:13And in my Properties panel, right down at the bottom it says Spring.
02:18So, this is where I can add some nice springiness.
02:21There is Strength and then there is Dampening.
02:24So, if I add strength, it's going to mean I am adding weight to this object.
02:29The lower the number, from one on up, it will actually have sort of less strength
02:36for lower the number is.
02:38The dampening is the falloff.
02:40So, how much is it really going to swing?
02:42So is it going to swing a lot, or less?
02:45So I am going to keep my Strength, let's put it about at 50.
02:49My Dampening is going to be about at 20.
02:51So, I'll just do that for all of these armatures, and let's go ahead and take a look at this.
02:57As I hit the Enter key, you can see that it swings into place.
03:01So look at all that extra animation, and I didn't have to do.
03:05In fact, even when you reach frame 80, it's still trying to move.
03:09So I am going to consider actually inserting some more frames,
03:12clear down to 150. I'll right -click and insert Frame.
03:16And now, that's all that dampening that's going on.
03:20That's going to continue to make it move.
03:24And I actually kind of like that, but I can add more control to it.
03:28In fact, what I can do is I can add springiness and different levels of
03:34strength and dampening per armature.
03:37So I can select this top armature up here.
03:39And I don't want this one to move a whole lot,
03:42so I am going to increase its Strength to about 100, and it's Dampening about 80.
03:48Next one, Strength is going to be about 80,
03:51Dampening is going to be about 60.
03:56And then I am going to do some more drastic moves down here.
03:59So this Strength is going to be 20, Dampening is going to be 80.
04:03Last one, Strength is - let's make that Strength 1, Dampening is going to be 90.
04:11So, I have adjusted all of these.
04:13The strength is higher on these ones, as well as the dampening. And then it
04:17changes as it moves down. The strength is actually the lowest there.
04:21So if I Enter, you could see how much it swings around.
04:26And you can really start to control this and determine sort of the weight of your objects.
04:32Say for instance, this earring is actually kind of heavy.
04:35So, maybe I don't have the strength so low.
04:38But again, I have full control over that.
04:40I can bring this back up to 60, and bring the dampening down to about 30.
04:46But again, I can control each of the movements of each one of these.
04:52So this still has some sway, but not as much as it did before.
04:56So just a nice, natural movement, that again, then I didn't have to animate.
05:01I didn't have to insert all of these various poses.
05:03It looks really good.
05:05And if I do a test movie, we can see it in action with the other animations.
05:11So again we just kind of have that rest in a place, and that looks pretty good.
05:17Some nice movement, and again, I am just keeping in mind the weight of these
05:22objects, and then I am able to determine, what the strength and the dampening in
05:27the springiness, in general, is for this object.
05:31Now this could use one little addition that I am going to do really fast, which
05:35is I want to add just a nice drop shadow for this earring.
05:39So I'll close that SWF,
05:41select my earring and in the Properties panel, I am going to add a filter.
05:48This is going to be a drop shadow.
05:50I'll add a drop shadow.
05:52I'll first adjust the angle.
05:55So, again, I want my drop shadow to go down and to the left, and I am going to
06:01increase the Quality and the Blur, as well as the Distance.
06:09So again, this is just kind of a fine art, being able to kind of add a nice drop shadow,
06:14again just decreasing the strength of that drop shadow. I want it to be pretty
06:19subtle, but I still want to make sure that it's realistic.
06:22There is my drop shadow.
06:23I'd say it looks pretty good.
06:24Let me go ahead and do a test movie, and see it in action.
06:28Hey, that's looks pretty good.
06:32Again, that was just the final touch I want to add to this, but otherwise, I
06:35would say this is a really realistic animation.
Collapse this transcript
6. Creating Animation with ActionScript
Controlling the Timeline with ActionScript
00:00So you can do a lot with the timeline, adding different motion tweens, using the Bone tool.
00:06You can do quite a bit.
00:08But eventually, what are going you want to do is control the timeline with ActionScript.
00:13If I take this file, for instance, if I do a test movie, you'll notice that this
00:19animation will play through, and then it loops back to the beginning.
00:25So I need to stop this timeline with ActionScript.
00:29I want to stop the timeline clear down here at the end.
00:33So again, when this playhead hits about frame 110, that's when I want it to stop
00:39to show this message.
00:41So all I need to do is navigate to the frame I want the timeline to stop on, and
00:47I am going to use a code snippet to stop the timeline.
00:50So I am going to go to Window and open up the Code Snippets panel.
00:54Here is my Code Snippets panel and as you can see, it's full of code.
01:02This is ActionScript code that I can take advantage of.
01:06So there is actions, timeline navigation, animation, quite a bit in here.
01:10So I really encourage you to check out all the different code
01:13snippets available.
01:15But I want to control the timeline.
01:17So I will open up Timeline Navigation, and sure enough, here we are.
01:22Stop at this frame.
01:23Well, that's the one I want to use. I am in frame 110.
01:26I will just double-click on that.
01:28Stop at this frame.
01:31Then it opens up my Actions panel.
01:34I am going go ahead and click this left arrow right there, just so I can see
01:41the actions available, because it added this ActionScript is what this is, as
01:48well as some notes - this is called a comment - referring to what this ActionScript does.
01:55Notice that right down here the bottom it tells me where I put it, in the
01:59Actions layer frame 110.
02:01Well, let's take a look at that.
02:03If I move that down, sure enough, it adds this Actions layer, and right here,
02:09that's actually in A right there, that refers to my ActionScript.
02:13So with that frame selected, that's actually referring to this code right here.
02:19So that should stop the timeline.
02:20Let's do a test movie.
02:22It plays through the animation and then stops on that last frame. Gorgeous!
02:30That's exactly what I want. Very nice!
02:33So I am going to go to my swimwear file, because it has this same issue.
02:41Just nest this Code Snippets panel over here to get it out of the way.
02:46But overall, it has a timeline that plays through, and at about frame 120 is
02:53where I want it to stop.
02:54I am going to go ahead and select frame 120, go my Code Snippets panel, and just
03:01double-click on Stop at this Frame again.
03:03So it adds that same code, very easily, very nice.
03:07I will close that Actions panel, and you can see that code was added right there.
03:14But this file is a little more unique, because it has more going on.
03:18There are actually some movie clips in here.
03:20The movie clips have animation in them.
03:25So if I just double-click on this fish, notice that it has its own separate
03:30timeline that's independent of the main timeline.
03:33So I will click back on the scene 1, and what that means, in general, is that
03:38these animations are going to play over and over again, even though the main
03:42timeline stops right here.
03:44So we will only see this eco-friendly animation once, and then when we stop
03:51action right here, the fish are going continue to swim, as well as some other
03:56items, such as the jellyfish.
03:58So let's do a test movie.
04:00We can see our text, we've got our jellyfish, and again, the jellyfish and the
04:09fish continue to animate, even though the main timeline has stopped, and that's
04:14exactly what I want.
04:16So just be aware of that.
04:17If you have animation inside of a movie clip, it will continue to play
04:22through, unless you put a stop action in there, which brings me to my next file.
04:27I have this fashion file right here, and what's in here are movie clips that
04:34again, contain all a lot of animation.
04:36And most of these, if I double- click on this armstand movie clip, it's
04:41actually a looping movie clip, and looks really good, because the start and end
04:45frame are the same.
04:47So I don't need to add a stop action in there, but if I go to scene 1 and I
04:51just double-click on this earring, well, this is a different scenario, because
04:58it rests into place.
04:59And I don't want it to all of the sudden snap back up here again.
05:03I want it to stop down here.
05:05So again, I'm inside of a movie clip.
05:08It's the same process of going to the Code Snippets panel, under timeline
05:12navigation, just adding a stop at this frame.
05:15If I double-click on it, it adds it.
05:17But I just need to be mindful of where my playhead is.
05:22But it doesn't really matter if I am in a movie clip or not.
05:26It's always going to add that stop action.
05:29So if I test this one, you can see that the animations play through, and this
05:36one should just ultimately sort of rest into place.
05:39And that's, again, exactly what I want while these two loop, because they don't
05:43have a stop action inside of them. So far, so good.
05:47Let's take a look at one more.
05:49Here's my home.fla, and again, this one has a beautiful animation that plays
05:55through, and I am going to add a stop action right down here at the very end,
05:59at about frame 118.
06:00I will double-click stop at this frame.
06:03That stops the main timeline at that point in time.
06:07But what I have here is this Replay button.
06:11So let's just go ahead and do a quick test of this movie.
06:14So again, it plays through.
06:17You can see this text will slide in, it stops on this last frame, and now I want
06:25to actually activate this button.
06:27So I want to control the timeline with this button.
06:30And when you click on this replay button, I want the playhead to go to frame 1
06:36and then play this animation again.
06:38So with this button selected, the first thing I am going to do is give it a specific name.
06:45So, in the Properties panel, I'm going to give it an instance name, and I am going
06:49to call it replay_btn.
06:52Now it has a specific instance name that's going to be referenced in my ActionScript.
06:59So I am going to go to my Code Snippets panel, and that second code snippet
07:04is what I want to add.
07:06Actually, the third one, I want to click to go to a frame and play.
07:09So that sounds like what I want it to do.
07:11So with that button selected, I will just double-click on my code snippet,
07:16and it adds that ActionScript, as well as, again, some more comments, and even some instructions.
07:23So it says, hey, you know what?
07:24Replace the number 5 in the code below with the frame number you would like to
07:29move the playhead to when that instance is being clicked.
07:34Well, that makes sense to me.
07:35I will come down here, gotoAndplay 5.
07:37Well, I actually want to gotoAndplay 1.
07:39So I will just change that 1, and I will do a test movie.
07:46This, again, will play through.
07:51See my text should stop on the last frame.
07:54We have our replay button.
07:55If I click that, it replays the animation.
07:59So that is controlling the timeline with a button.
08:02So I encourage you to also explore the other code snippets that are available,
08:08because you can do quite a bit.
08:10It's all under timeline navigation, the most common being stop at this frame.
08:15But again, if you want to control the timeline, just look to your Code Snippets
08:20panel and add the code snippet that you would like to use.
Collapse this transcript
Creating movement with ActionScript
00:00Now you can do a lot of really cool animations on the timeline in Flash.
00:05It is definitely very powerful.
00:07But sometimes what you're going to want to do is use ActionScript to animate objects.
00:12This is really helpful if you need to animate a lot of different objects and
00:17it would just take forever to do it in the Timeline, or if you want to create random movements.
00:22Well, you can use ActionScript to do that as well.
00:26Or even potentially user-initiated movement - maybe you want some animation
00:32to follow the cursor.
00:34All this would have to be done using ActionScript, or at least that's the
00:37most effective way.
00:39I am going to just start with a simple example of animating with ActionScript,
00:44and I'm going to use this raindrop.
00:47It's actually called rain right in here.
00:49But if I drag this onto the stage, notice that it's just one raindrop.
00:54So let's just zoom in on it.
00:56This is my one raindrop that I want to animate, coming down from the top, at an angle.
01:03The first thing I need to do is I need to give this object an instance name.
01:08So in my Properties panel, I am going to call it raindrop.
01:14So there is my raindrop. It has an instance name of raindrop, and I'm going to animate it actually
01:19using code snippets.
01:21So if I go to Window, down to Code Snippets, notice that there is plenty of
01:27different code snippets in here, but I want to focus on this Animation folder,
01:32because if I open that up, so I just minimize that panel, you can see that there is
01:37quite a few things I can do in here.
01:39I can move movie clips with the keyboard arrows, I can just move objects
01:44horizontally and vertically, I can rotate them, fading them in and out is an
01:49option as well, but again, what I want to do is I want to animate vertically.
01:54So that's what I am going to start with.
01:56So with that object selected, I'm going to double-click Animate Vertically,
02:01and that's adds the code to this frame right here in this Actions layer that it creates.
02:09So in my code, you notice that it gives me some comments, not only what it does,
02:15but how to modify it.
02:17So the default direction of the animation is up.
02:20So it's referring to this code right down here, and it says raindrop.
02:27So I'm pretty much at the Enter_Frame of the movie.
02:30So if this movie is going 24 frames per second, that's how often this function
02:37is going to execute, 24 times per second.
02:41In this case, this raindrop is going to move its Y position.
02:45So it's going to move vertically, like it's saying here, and it's going to go up.
02:50That's what this says. It's says -10.
02:52So it's going to move it upwards.
02:54It's going to -10, because 0 and positive numbers are down. Negative numbers go up.
03:01So, the first thing I need to do is modify this, just like it says here, to modify
03:06this, change the minus to a plus, if you want to change the direction of the animation.
03:13Again, that's what I'll do.
03:14I'll just change that to a Plus sign.
03:16Now, it's going to move down.
03:18So let's do a test movie.
03:23And we can see it moved down.
03:24That happened pretty fast.
03:26So let's go back into our code, and we'll change this to 5.
03:30Now, this should go at least half as fast, but now we can see it moves straight down.
03:37It's not bad, but as you'll notice, this raindrop is at an angle.
03:43So I might consider moving the raindrop at an angle as well.
03:48So I'm going to type in "raindrop." Its X position,
03:52so, horizontally, I want it to move += 1.
03:55So this is going to move it to the right one pixel pretty much every second.
04:04So let's see if it goes at a nice angle now, and it does.
04:09That looks pretty good.
04:10It's going at an angle, and it works really well.
04:13But what's happening is it still animating that raindrop, even though you can no longer see it.
04:20So it's off of my stage.
04:22It's way down there, but it's still animating.
04:24So what I want to do next is I want it to reappear up here at the top, once
04:29it leaves the stage.
04:31So I'm going to go back into this code here, and I'm going to add a comment.
04:38So just like you have comments up here, I can add my own comments down here.
04:43If I just do it two forward slashes, I can go ahead and type in a comment,
04:49because I want to basically say, if it's off the stage, have it reappear at the top.
05:01Off the stage on the bottom, is what I mean.
05:03Let's expand this out, because I am going to write a couple of lines of ActionScript.
05:11So let's just put in some hard Returns, just so I have some room, and right
05:17underneath that comment, I'm going to add an if statement.
05:19So if the raindrop, its Y position is greater than stage.stageHeight -
05:32so you notice how I start typing in stage.stageHeight, which happens to be a
05:37property of the stage -
05:39I get this code hinting here.
05:41So anytime I see what I want in here, and I can just hit Enter, and it adds it.
05:47So anytime it's greater than the height of the stage, which means it's off the
05:51bottom, then do whatever is in between these two curly braces.
05:56And in this case, what I want to do is I want to reposition the raindrop, its Y
06:02position, and I'm just going to make it = 0.
06:05So that's puts it right back up to the top.
06:10That's all the code I'm going to write.
06:12If you are curious about the position of things, what you can do is open up your
06:17Info panel, because this gives me to X and Y coordinates of my mouse.
06:23So notice as I scroll up, the Y numbers decrease, and of course they
06:29increase as I scroll down.
06:30So if that helps determining the position of things for you, then consider using
06:35that Info panel. But with that code in place, I'm going to do a test movie.
06:41We should see animate off, and it should come back on up at the top. There it is!
06:49I'm not modifying the X position at all, but I could do that as well.
06:55That's really just one raindrop, and this might be the start of a storm, which is
07:00fine, but what if I want to create more rain?
07:03That would really be my next step with this, which is sort of creating more
07:07raindrops and having them all come down randomly.
Collapse this transcript
Dynamically creating graphics
00:00ActionScript is very powerful.
00:02It allows you to control graphics really well, and also allows you to create many
00:08graphics that can then be animated, as well.
00:12In this case I have this raindrop, and it's just one raindrop, but what if you
00:17need to create a whole landscape of raindrops, say about hundred of them?
00:22Well, animating all of those in a different way would take quite a while, and
00:26that's where ActionScript comes in handy.
00:29So first off, let's just go ahead and take a look at our raindrop that's
00:34currently being animated down.
00:36Again, I am going to fill the sky with raindrops.
00:41The first thing I am going to do is just delete this raindrop layer, because
00:47I'm going to dynamically pull this raindrop from the library and place it on the stage.
00:53In fact, I am going to pull a hundred of them on.
00:55So let me go to my Actions layer and open up the Actions panel.
00:59Here is my current code and all this does is animate my raindrop.
01:05I don't even need these comments right here - so I'll just delete them and do a
01:09couple of Returns - because I'm going to add my own comments in here.
01:12So I'll just do two forward slashes, which allows me to add my own comment, and
01:18I want to dynamically pull raindrops from the library, and I am going to do
01:29that, but the first thing I need to do, before I can start writing any code, is
01:35make it available to ActionScript.
01:38So I am going to right-click on that rain movie clip, go to Properties, and I
01:45might need to twirl down the Advanced tab right here, and under Linkage, you'll
01:51see that it says Export for ActionScript.
01:53So I want to make sure that's checked.
01:55Then I am going to give it a specific name. I am going to call it Rain, with
01:58a capital R. Class files usually have a capital letter.
02:03Either way, you just want to be really mindful of whether it's capitalized or
02:07not, and to stick with one or the other.
02:10But in general, do an initial cap.
02:12This is called Rain. I'll click OK.
02:14It says that it's going to create a class path.
02:17I am like, that's fine, just click OK from there, and notice how under Linkage, it says Rain.
02:22So now it's available to ActionScript.
02:25So back in my Actions panel, I can go ahead and create a new variable called
02:30raindrop, and it is a movie clip. I'll type that in.
02:36I've selected movie clip.
02:37It adds that import statement.
02:40I am going to type in new Rain, because that's the class that I just made.
02:45So I need to make sure this word matches up with this linkage word right here.
02:50Okay, so this new variable was created.
02:53Now I need to do an add child raindrop.
02:58That's what I'm adding.
02:59I am adding this raindrop to the stage.
03:02So I am going to go ahead and run this. Do a test movie.
03:07We should see it animate on down from the upper left-hand corner.
03:10So there's my one raindrop.
03:12Let's close that, go back into my code, because I need to generate 100 raindrops.
03:21So I want to dynamically pull 100 raindrops from the library.
03:25I am going to do this by creating an array.
03:29So the first thing I am going do, right up here, is create an array called
03:34rainArray, and it is of type Array, and I'm instantiating it. It is a new Array.
03:45It's my big rain cloud, full of rain.
03:47Currently, there is nothing in it.
03:50But I did just create this Array, which I am going to use in a second.
03:53All right, with this new Array created, what I want to do next is I want to
03:57create a For loop, and I'll talk you through what this does.
04:01But I first need to create a variable, that's a number, that starts at 0, and
04:10as long as my number is less than 100, then Loop through this For Loop, just like that.
04:20That's what I want.
04:21I'll do an open curly brace.
04:23If I hit Return, it adds the closing curly brace.
04:26This says it's going to start at 0.
04:28So here's my variable name. This could be anything, but as long as i is less
04:33then 100, then it'll loop through this code.
04:36This just adds one each time it goes through.
04:40Right in here, this is where I need to add my raindrop, where I have instantiated
04:46it from the library.
04:48I am going to go ahead and tab that in, but now I've created that new raindrop.
04:55But I haven't put it in this array that I've made.
04:57So I need to put it in my rainArray.
05:02So rainArray push raindrop.
05:05Push it into that big rain-cloud.
05:07rainArray.push(raindrop);.
05:09So that's what I have done.
05:10I've dynamically pulled 100 raindrops from the library, and I've put them on the stage.
05:17In fact, let's just autoformat my code.
05:21So I'll click that button, and that will make sure all my code looks nice and neat.
05:27That just adds in any tabs and any line breaks
05:30that might make it easier to read.
05:32I'll check my syntax,
05:33it's another thing I might consider.
05:36Then I'll just do a test movie, and again, there is my 100 raindrops.
05:41There is only one that animates, so I want to animate them all.
05:45So again, it's going to be a matter of creating this For Loop again.
05:50Just to make this a little simpler on me, I am going to actually copy this For
05:56right here, because down in here, instead of just animating one raindrop, I want
06:03to create that For Loop right in here that's going to animate them all.
06:07So I've just pasted in the same For Loop.
06:09So as long as i is going to be less than whatever is in the array.
06:14So there might only be a couple in there initially.
06:17So I would probably want to change this to rainArray.length.
06:23So whatever is in the array, just loop through it, and you're going to loop
06:28through all of this content.
06:32I've just added a closing curly brace down here, because anything within these
06:37two curly braces is going to execute in this For Loop.
06:41That's why this Auto Format button comes in handy.
06:45So if I click on it, it actually nests that all nice and neat, and there is my For Loop.
06:51So we're looking pretty good so far.
06:53It will loop through all of this, but it's still only moving that one raindrop.
06:57So I actually need to change that.
06:59I need to say rainArray.
07:02Whatever is in my rainArray - I am not sure what's in there -
07:05I could actually define within these two braces.
07:09I could maybe point to the second raindrop, or the third, or the fourth.
07:15But I want to change this to i, because it's going to Loop through here.
07:19The first time through it might be sort of equal to 0.
07:22Then it will refer to the first one, then it will refer to the second one.
07:27But if I keep that at i, it's always going to reference every single one.
07:32So I'll copy that, and change that raindrop to rainArray. Pretty much wherever
07:39it says raindrop, I am going to change that to rainArray, because again, that's
07:44going to change each time it Loops through this For Loop.
07:49Lastly, I'll just copy this line and paste it below because I want to change my
07:57X position to 0 as well.
08:00So you're just going to see pretty much all of my raindrops animate from the
08:03upper left-hand corner and then just down at an angle.
08:07So that's all this does.
08:09In fact, if I hit Return, I can add a comment in here.
08:13So loop through the array, and animate all raindrops.
08:20That's what that does.
08:22I'd say that looks pretty good.
08:24We're dynamically pulling the 100 raindrops into my scene.
08:28So let's do a test movie.
08:31Again, there's my one big raindrop, 100 of them stacked on top of another, and they animate.
08:39So really, my next task is to go ahead and randomly position all of these
08:46raindrops sort of across this whole scene and have them rain down.
08:51So that would really be the next step for this.
Collapse this transcript
Randomizing content
00:00One of the powerful features of ActionScript is its ability to just randomize
00:06content, and that's where I'm at with this project is I want to be able to just
00:10randomize the position of these movie clips, because what's currently going on
00:16is there's about 100 raindrops coming down in the same position.
00:20So this is, again, a perfect case for ActionScript where I want to randomize some
00:25of those properties for those movie clips.
00:29So I'm going to select this first layer,
00:30I'll open up the Actions panel, and again here's where I place all of the movie clips.
00:38They actually get added to the stage.
00:41They're all called raindrop, and then down here, I referenced each one in this
00:47rainArray, which I have kind of been referring to as a big cloud, because it
00:51contains lots of raindrops.
00:53So this is the motion up here.
00:55This is where they get created.
00:57So after they are created - and quite frankly I want to change the position of
01:06each one as they get added to the stage -
01:10so right in here, this is where I want to change the properties of each raindrop.
01:17So all I need to do is say raindrop, and for this raindrop, maybe I will
01:25change the X position.
01:29So to left or right, change its X position.
01:33In this case, I want to go ahead and find a random number.
01:38I'll show you an easy way to do that, because if I open up my Code Snippets
01:42panel - just minimize that a little bit - under the Actions folder,
01:48there is Generate a Random Number.
01:51So let me just go ahead and double- click on Generate a Random Number.
01:55There's instructions for it,
01:57but overall, what I want to do is I want to go ahead and get a random number, and
02:01that's right in here.
02:02This gets the random number.
02:05So that's what I want to use.
02:06There is also Math floor as well.
02:10Math floor, that sort of rounds the number down.
02:14Anytime you use Math random, it actually gets a number between 0 and 1, and it
02:19might be 0.25, whatever the case may be.
02:23This rounds it down to a whole number.
02:27So I'm going to just steal this code right here.
02:30So I'm going to copy it, and I'll just delete that.
02:33But I encourage you to use the Code Snippets panel as a way to sort of
02:38start writing your code.
02:40Okay, raindrop X, and I will just go ahead and paste in that Math floor, Math random.
02:50I do want to get a random number, but I want to get a random number between 0
02:56and the stage width.
02:58So Math random, times, let's do stage, stageWidth. It highlights.
03:06I can Hit enter, and it will add it, just like that.
03:11So whatever that random number is, go ahead and multiply it by the stage width.
03:17So that's going to give me a number between 0 and the width of the stage, which
03:21happens to be 1,000 pixels.
03:24But in case my stage ever changes, that's why I'm typing this in.
03:30I'll just keep this as Math.floor.
03:32So that's going to randomize the X position.
03:35Well, if I run this code now - I'll just do a quick test movie - you can see it
03:43animates all of them down, and again, that was pretty drastic.
03:48So in fact, if I run that again, you'll also notice that it just animates
03:53them all down, and then when they reach the bottom, they all are back where they were.
03:58So that's why I have to take this line of code, copy it, and down below, right
04:07in here, instead of putting it at zero, I need to go ahead and paste in that line of code.
04:15So again, it's not raindrop X. I'm referring to, actually, the rainArray, and whatever
04:23raindrop that is being animated.
04:27Again, I've changed this from 0 to that random number.
04:31Now, if I do a test movie, it will not only be random here, but when they come
04:36down again, they will also be in a random position.
04:40Again, I haven't seen rain like this, so I probably want to change it, but
04:43it's the same process.
04:45I'll just copy this line again, paste it, and I'll change it from X to Y, and
04:53let's make this equal to the stage height.
04:55It's going to go ahead and randomize the position for each one that way, as well
05:01Let's do a test movie.
05:04Now, it looks pretty good.
05:05At least everything is random, but overall, I think it needs more depth, because
05:13all my raindrops are the same size.
05:15So I want to adjust the opacity, and even the size of each raindrop.
05:21So back in here, next line.
05:25I'm going to change the alpha, and the alpha is usually a number between 0 and 1,
05:33which happens to be what Math random returns.
05:37So I'll just copy that and paste it below.
05:40So now it's going to get a random number for my alpha.
05:44Next up, raindrop.scale X is going to be equal to again Math random, because
05:54scale X is a number between 0 and 1.
05:570.5 would be 50%, so it's 50% opaque, or transparent - whichever way you want to look at it.
06:05Next up, I have raindrop scale Y. Now, I don't want to do a random number for
06:14the scale Y because I always want it to be the same scale as the scale X. So
06:19I'll actually copy this and paste it right here.
06:23Now, it's always going to scale it down proportionately.
06:28Lastly, what I'm going to do is I'm going to click the Auto format button and
06:32the Check Syntax button, just to make sure it cleans up my code.
06:36In fact, I'll just go ahead and remove all those spaces as well, and add some
06:42final comments, since my code seems to be down right now.
06:46Move the raindrops.
06:49Again, this is so in case I come into this code later on or want to reuse it,
06:53I'll remember what everything does.
06:56But I'd say that looks pretty good.
06:57I'd say it looks set up.
06:59But this final test movie will prove if it does and sure enough, it does work out just great.
07:06You can see those different-sized raindrops.
07:10I'd say my only complaint now, which might be my last edit, is to increase the
07:15speed of these raindrops.
07:16So let's up this to about 16, and let's make this, say, 4.
07:22The raindrops are going to go a lot faster. That's better!
07:28I like that, and again, I can start to play with those various properties.
07:32But you can see that it is pretty straightforward to manipulate movie clips.
07:38Again, these are all being pulled from the library, and I'm manipulating them
07:42randomly, and you can see the results I get are quite impressive, considering
07:48animating these separately would take me a long time.
Collapse this transcript
Conclusion
Goodbye
00:00Thank you for watching.
00:01I hope you learned a lot from this title,
00:04but more importantly, I hope you are inspired to create unique, exciting
00:07animations that will really allow you and your projects to shine.
00:13I look forward to seeing them on the web or anywhere else they may appear.
00:17Thanks for watching and good luck!
Collapse this transcript


Suggested courses to watch next:

Flash Professional CS5.5 New Features (45m 47s)
Todd Perkins



Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 104,069 instructional videos.

get started learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 2,025 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.

preview image of new course page

Try our new course pages

Explore our redesigned course pages, and tell us about your experience.

If you want to switch back to the old view, change your site preferences from the my account menu.

Try the new pages No, thanks

site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked