Flash CS4 Professional New Features

Flash CS4 Professional New Features

with Todd Perkins

 


Recent updates to Flash have focused on its use as a platform for rich internet applications and video, while the tried-and-true animation tools have received relatively little attention. But as Todd Perkins shows in Flash CS4 Professional New Features, animators have reason to be excited about this latest update. He demonstrates the new motion tween model, how to create and animate with bones, and the capabilities of the new integrated 3D tools. Todd shares details about many other changes in Flash CS4, including a new interface and updates to the Project panel and the Library. He also covers working with H.264 video in the Flash player. Example files accompany the course.
Topics include:
  • Exploring the new interface and toolbar Working with the motion editor and presets Using the vector data type and other Flash player enhancements

show more

author
Todd Perkins
subject
Web
software
Flash Professional CS4
level
Intermediate
duration
33m 50s
released
Sep 23, 2008

Share this course

Ready to join? subscribe


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:00Hi and welcome to Adobe Flash CS4 New Features. I'm Todd Perkins and I'll be
00:05walking you through the new features in Flash CS4. I'm an Adobe Certified Flash
00:10instructor and I have written many books and recorded many video training
00:13titles in Flash. I absolutely love teaching Flash.
00:17Flash CS4 has loads of new features. In this title, we'll take a look at some
00:21of the key features that you'll be using when you use Flash CS4.
00:25We'll be talking about the new interface, some of the new tools and updated panels.
00:30We'll talk about the new motion tween model. How to work with bones,
00:34how to animate them, how to work with 3D elements. We'll talk about some
00:37enhancements of the Flash Player.
00:39So I hope you are excited.
Collapse this transcript
Setting up the example files
00:00If you're a premium subscriber to lynda.com or have purchased this title on a disc,
00:04 you have access to the exercise files for the title.
00:07Exercise files in this title are organized by chapters. Each chapter contains
00:12the files used throughout that chapter. Throughout the title I'll reference of
00:16the file that we'll be working in. Files where we make changes to any artwork
00:20are saved in their final states, and end with _Final.
00:25If you don't have access to the exercise files, don't worry. You could still
00:28follow along, just set up your files in the same way that my files were set up
00:31and everything will still work.
Collapse this transcript
Prerequisites
00:00Throughout this title, I'm going to assume that you have a basic knowledge of Flash.
00:03You should know what is taught in Flash CS3 Fundamentals or Flash CS3
00:08Essential Training. If you haven't watched those titles you may have a hard
00:11time following along with this title.
00:13There is also going to be a point in the title where I talk about ActionScript.
00:17For that you should be familiar with ActionScript 3.0 in Flash CS3 Essential Training.
00:21But if you're not quite at that level, you'll still be able to follow along.
00:24So let's get started.
Collapse this transcript
1. Exploring the New Panels and Tools
Exploring the new interface
00:00The first time you open Adobe Flash CS4 you'll notice a drastically different interface.
00:05Adobe has changed the Flash interface to be more in harmony with the
00:09other animation and video editing products like Premiere Pro and After Effects.
00:13So you'll notice that the Timeline is no longer at the top of the screen;
00:17it's now at the bottom.
00:18The Property inspector was also moved to the right side of the screen instead
00:22of the bottom of the screen. So we now have a vertical layout for the Property
00:25inspector. The toolbar is also on the right side of the screen. You'll notice
00:29a few tools as well.
00:30We'll be talking about these tools later on in this title. The panels in
00:33Flash CS4 are expandable, and in the case of the toolbar, place the tools in
00:39multiple rows.
00:40You may find yourself loving the new Flash interface if you are familiar with
00:43Adobe's other animation software. If you want to make any modifications to the interface,
00:47you can always do that.
Collapse this transcript
Using the new tools in the toolbar
00:00In Flash CS4, there are several new tools in the toolbar. In this movie we'll
00:04talk about a few of them. Some of them are complex like the 3D tools and the
00:09Bones tools. For those tools we have whole chapters dedicated to them in this title.
00:14So we'll look at them in more detail later on.
00:16For now, we'll take a look first at the Spray Brush tool. The Spray Brush tool
00:20is hidden in the flyout menu below the Brush tool in the toolbar.
00:24The Spray Brush tool's default setting is to provide spray paint.
00:28You check the default shape box, choose a color, choose a scale. Choose whether or
00:37not to have random scale, and choose a brush size you can spray paint on the stage.
00:46There we go.
00:48I'm going to undo my spray paint by pressing Command+Z on the Mac or Ctrl+Z on the PC.
00:53You can also spray using symbols to create patterns. Going to adjust the scale
00:59of my symbol. Going to add Random Scaling, adjust the width and the height of
01:09the brush. Then I can create a pattern on the stage. So if I wanted to draw a
01:15border around the stage, I can do that using this tool. Going to undo my
01:21changes by pressing Command+Z on the Mac or Ctrl+Z on the PC.
01:24The Spray Brush tool is a great tool for painting patterns. Another tool for
01:29painting patterns is the Deco tool. The Deco tool paints fills. Many of the
01:33fills that the Deco tool paints consume the whole stage. For example, the Vine
01:38Fill, which is the default setting or default drawing effect for the Deco tool,
01:43paints a leaf and a flower along with a vine.
01:46If you check the Default Shape checkboxes and then click on the Stage,
01:52a vine gets painted with flowers and leaves; if you click again the drawing stops.
01:57You'll notice that the drawing animates as it moves. If you wanted to create an
02:01animation out of that, you can very easily.
02:04I'm going to press Command+Z to back up and then I'm going to check the Animate
02:08Pattern checkbox. This creates a frame- by-frame animation of drawing a pattern.
02:13You'll notice that the Frame Step is set to 1. That is how many frames you go
02:17between keyframes in the animation. I'm going to delete the default setting.
02:20If I click on the Stage and then click again, you'll see that you'll see that
02:25Flash has created an animation for me. I'm going to select that range of
02:30keyframes and delete them using the keyboard shortcut Shift+F5.
02:39In the Deco tool you can also use symbols as your pattern. I'm going to uncheck
02:43Animate Pattern and going to set a symbol for the leaf. The symbol is going to
02:47be a LeafStroke, and for the flower I'll set a symbol called FlowerStroke.
02:52I click again, the Deco tool paints using my custom flower and leaf shapes.
02:57Command+Z to Undo.
03:00Now I'll change the Drawing Effect to Grid Fill. If you click on the Stage, the
03:06Deco tool fills the stage with a grid of whatever symbol you have selected or
03:10you can simply use the default shape by clicking the Default Shape checkbox.
03:14Command+Z to Undo, and of course using the Deco tool you can control horizontal
03:21and vertical spacing along with the scale of your pattern.
03:25The Symmetry Brush enables you to draw shapes symmetrically. In the Advanced
03:30Options section of the Symmetry Brush, I'm going to start with Reflect Across Line.
03:35When I click-and-drag, you can see the two shapes are being created.
03:40When I release my mouse button, two shapes are created, symmetrically reflected across this line.
03:47You can also draw with symbols. So I'll select my Flower symbol and
03:53click-and-drag to draw flower shapes. Notice that they are symmetrically
03:58reflected. Going to press Command+Z a few times to undo. Then I'm going to
04:02change the Advanced Options to Reflect Across Point.
04:09I can draw to reflect across a certain point. Undo, Rotate Around. I can draw
04:17multiple shapes around a certain point. Undo again, and you can also do a Grid Translation.
04:28So I'm drawing multiple shapes on this grid. And that's a look at some of the new
04:33tools in Flash CS4. I encourage you to be creative and try the different
04:37settings in each of the tools so that you can get more experienced using them.
Collapse this transcript
Exploring the updated Project panel
00:00The Project panel has always been a powerful tool for managing large amounts of
00:05FLA files, SWF files and ActionScript classes. With Flash CS4, the Project
00:11panel is better than ever. You can find the Project panel by choosing Window >
00:15Other Panels > Project. To create new project, click the Projects dropdown and
00:21select New Project. Give the project a name, choose a root folder where your
00:29project files are stored, choose an ActionScript version and then click Create Project.
00:35Because of the root folder I choose, all the FLA files in that folder
00:39automatically show up in the Project panel. If I want to add more files, I can
00:43do that easily by clicking the New File button. You can choose a variety of
00:49different file types. I'll give my file a name, My New File, and I'll choose
00:57FLA for the file type. I'll choose to open the file after creation.
01:01Then I'll click Create File, and here is my New File.fla.
01:06You can also quickly create ActionScript classes. Click the Create Class button
01:10to do that. I want to call this class, MyClass. You can choose whether or not
01:15to bind the class to a library symbol. I'm going to leave that box unchecked
01:19and leave the Open File After Creation box checked and I'll click Create
01:23Class. When I click Create Class, a class file is created inside of an empty
01:29package that has all the class decorations I need, and the constructor method.
01:35So you can see that the Project panel is very useful. You can also manage
01:39settings for individual projects. Do this by clicking the dropdown in the
01:43options area by choosing Project Properties. In the Project Properties window,
01:49you can redefine your ActionScript version, tell Flash where to save classes,
01:56create a class template and create a different class template for a symbol class.
02:01You can also specify additional folders to use outside of the route
02:05folder for your folder locations and you can specify connections to SWC files.
02:10I'm going to click OK to close the dialog. So you can use the Project panel to
02:15quickly create new files and to organize projects of any size.
Collapse this transcript
Using the Library
00:00The Library in Flash CS4 has been greatly enhanced for organization.
00:04The Library in previous versions enabled you to organize elements by name. In Flash
00:09CS4 you can organize elements by name in ascending or descending order. You can
00:15now organize elements by linkage, by use count, by the date modified, and even
00:26by the type of symbol.
00:29You can also search for symbols in the Library. For example, let's say I wanted
00:34to look with the symbol containing the word flower or leaf. The items are found
00:40as I'm typing.
00:42So if I want to look for the leaf symbol, simply start typing leaf, and every
00:46element that doesn't contain a string that you type in gets removed, so you can
00:50find what you need quickly.
00:51So the Library is now a powerful organizational tool in Flash.
Collapse this transcript
2. Creating Motion Tweens
Understanding the new tween model
00:00One of the biggest changes in Flash CS4 is the motion tween model. Motion
00:05tweens are drastically different from previous versions of Flash. In previous
00:09versions of Flash, you would create a keyframe at one point, another keyframe
00:12in another point, and then tween the frames in between to create an animation.
00:16In Flash CS4, you create one keyframe and Flash does the rest of the keyframing
00:22for you. Let's take a look at how it works. If you are following along, I'm
00:25working in New_Tween.fla in the Chapter2 folder. Here I have a pretty simple
00:30file with the surfboard that I'm going to animate and some ActionScript that
00:34tells the ruby to stop when it gets to Frame 40.
00:39To create the tween, I'm going to select the board_only layer, right-click and
00:44choose Create Motion Tween. You'll notice that it says Create Classic Tween as well.
00:49The classic tween is the previous version of a motion tween. So if you
00:53happen to want to stick to the old tween model, you can always create a classic tween.
00:57I'm going to choose Create Motion Tween here. You'll notice that the frames
01:01turn blue and then what I'm going to do is go to the first keyframe, select
01:07the board on the Stage, and adjust the Alpha by dragging the Alpha slider down
01:12to 0 in the Color Effects section of the Property inspector. You'll have to
01:15make sure that the Style dropdown has Alpha selected in order to do that.
01:20Now what I'll do is move to the last frame of the animation, select the board
01:25on the Stage, which is now invisible and instead of creating a keyframe,
01:30I'm just going to drag the Alpha slider up to 100. Now if I scrub the playhead,
01:36I can see that the motion tween has been created. You'll notice that instead of a
01:40black circle at frame 40, there is a small black diamond. That's an auto
01:45keyframe created by Flash.
01:47So, if you test the movie, I'm using Command+Return on the Mac or Ctrl+Enter on the PC,
01:51you can see the animation happening. Now, if you wanted to adjust tween
01:56properties, there are different ways to do that as well. We'll talk about that
01:59more in a later video. On a simple level, you can adjust easing by clicking
02:03between and selecting it, notice by the way the tween icon for the layer.
02:10And then you can go to the Ease section of the Property inspector.
02:13Notice that I have a motion tween selected, I can drag the Ease slider.
02:17When you drag the slider one way, Flash tells you whether you are easing in or out.
02:22So, I'm easing out here. Test the animation and see the animation ease out. So,
02:28the new tween model takes the step of creating extra keyframes out of creating
02:33animations. That way you can create simple motion tween faster than ever.
Collapse this transcript
Working with motion paths
00:00With different motion tweens in Flash CS4, there are also different motion paths.
00:04In this movie, we'll talk about how to work with motion paths using the
00:08new model. If you are following along, you can open up Motion_Paths.fla in the
00:13Chapter2 folder. This file is pretty much the same file from the last exercise,
00:18except I added a mask layer for the board.
00:20We are going to go to the first keyframe of the board layer, I'm going to move
00:24to board to the bottom right of the screen and I'm going to go to the last
00:29frame and then move the board to where it was before. You'll notice here that
00:35there is a red line with dots on it. This line is the motion path for this
00:41animation. So, we didn't even have to create a motion guide.
00:44Flash automatically created one for us.
00:47The way that the motion path works is that shows the frames over time. The dots
00:52on the line represent frames so as they are spread apart, that means the
00:56object will be moving faster and as the dots are closer together, the object
01:00will be moving slower. So, we can tell here that there is easing applied to
01:04this animation. It's the same easing that we applied in another movie.
01:07So, we can scrub the playhead and preview the animation. Now, this works in
01:14the similar way to the classic motion tween. However, the motion path created
01:20works just like a stroke and it is editable just like a stroke as well. So,
01:24I can hover my mouse over the middle of it and click and drag to create a curved
01:28animation. If I scrub the playhead, we can preview that.
01:35I can click and drag over the start and end points of the animations to move
01:39them. Further, using the Subselection tool, you can select the start or end
01:44point of the animation and adjust that point's Bezier curves. We'll test the
01:52movie to see this in action. So motion paths in Flash CS4 are created for you
01:58and they are editable just like any line.
Collapse this transcript
Using the motion editor
00:00Using the Motion Editor, you can control your animations down to the individual
00:05animation properties. In this movie, we'll take a look at how to do that.
00:09If you are following along, you can open up Motion_Editor.fla in the Chapter2
00:13folder. Here is what we have now. The board animation comes in quickly and then
00:18the check it out animation slides in.
00:21We'll make some changes to this animation using the Motion Editor. First, we'll
00:25make the board slide in a little more slowly. To edit an animation in the
00:29Motion Editor, select the tween in the timeline. You know that a tween is
00:33selected when you see Motion Tween in the Property inspector. And then click the
00:37Motion Editor tab. If you don't see it, you can always choose Window > Motion Editor to show it.
00:43The Motion Editor breaks down your animation frame by frame and property by
00:48property. If you scroll up and down through the Motion Editor, you'll see all
00:53other properties that you can animate, X, Y, Skew, Scale, etcetera. For the
01:01properties that animate, you'll see the keyframes identified as green squares.
01:07Blue dotted lines indicate easing for a property.
01:11Here in the Motion Editor, we can move the keyframes so if we slow down the
01:15board animation, I could simply grab this keyframe for Alpha from say, Frame 20
01:22to Frame 30. I can scroll up, find the X and Y properties, drag the keyframes
01:32there from Frame 20 to 30 as well. If we go back to the timeline, I can see
01:37that the keyframe that was Frame 20 is now at Frame 30. If I test the movie,
01:42the board animation takes a little bit more time and that's just how I want it.
01:47Using the Motion Editor, you can also edit the property values for
01:50animations. Also like the check it out animation and then go to the Motion Editor.
01:56In the check it out tween, I'm going to find the X property, move all the
02:01way over to the frame where the animation starts and then I'm going to click
02:05and drag the pixel value slider in the X property area.
02:11This will drag the check it out movie clip further to the right or further to
02:15the left if I drag to the left. If I scrub up the playhead, I can see that
02:19the animation is working. Now, let's say I wanted to add an additional property
02:24to my animation that's not currently animating. For example, if I wanted to
02:28animate a Blur Filter. I could scroll down, find the Filt's area within the
02:35Motion Editor and then click the Plus button and select the filter I want to animate.
02:40I'll select Blur, and then the basic blur is applied. If I scroll on the Stage,
02:48I can see that the movie clip is blurred. Going to go to the Blur Y property
02:53and reduce it to 0. Now, I'll go to the Blur X property, to as far as it will go,
02:59which is the value of 255. Then I'll go to the end of the animation and then
03:04click the Add Keyframe button. It's an empty diamond in between the two arrows in
03:10the keyframe section of the Motion Editor. Once you have entered a keyframe,
03:14then you can adjust the property value.
03:16For example, here I'm adjusting Blur X to 0 and then the animation is created.
03:21If I scrub the playhead now, you'll see that I have created a blur
03:25animation. Now I'll test the movie and see the animation in action.
03:31So using the Motion Editor, you have powerful, independent property value control over
03:36your animations.
Collapse this transcript
Using motion presets
00:00Flash CS4 allows you to save and reuse animations using the Motion Presets panel.
00:06 If you are following along, I'm working in Motion_Presets.fla in the
00:10Chapter2 folder. Here I want to animate the navigation. If you look at the top
00:16left of the Stage, the board's part of the navigation animates in, using a blur
00:21and a slide. Going to save this animation and apply it to clothing and
00:25accessories. To do that, first select the motion tween in the timeline and then
00:30right-click and choose Save As Motion Preset.
00:32You're then asked to give the preset a name. I'll call this Blur Slide and then
00:39click OK. To apply the preset, you'll need the Motion Presets panel. You can
00:43find the Motion Presets panel under Window > Motion Presets. In the Motion Presets
00:48panel, there are two folders. One called Default Presets and one called Custom
00:52Presets. Default Presets have preset animations that you can apply to any symbol.
01:00Custom Presets are the presets that you create and save yourself.
01:03Like the Blur Slide preset we just created. To apply motion preset, select the
01:09symbol on the Stage you want to apply the preset to and then select the preset
01:13in the Motion Presets panel and then click the Apply button.
01:16I'm not going to click the Apply button yet because what happens when we click
01:20the Apply button is the position where the object is, is the starting position
01:24for the animation. So if I were to click it, clothing would slide from where it
01:28is to the right. What I wanted to do is end up where it is right now. So if I
01:33hold Shift and then click Apply, the position of the symbol is going to be the
01:37ending position for the animation. If I scrub up the playhead, I'll see that's
01:42what happened. Now I'll apply the same animation to accessories. Select the symbol,
01:47click Blur Slide, Shift-click Apply, and my animation is applied to all three.
01:56Now I'll test the movie by pressing Command+Return on the Mac or Ctrl+Enter on the PC.
02:00So using the Motion Presets panel, applying similar animations is
02:04easier than ever. You can save animations and apply them to any symbol you want.
Collapse this transcript
3. Working with Bones
Creating bones
00:00In Flash CS4 you can easily create bone systems. Bone systems can be used to
00:06move elements depending on the position of other elements. Using bone systems,
00:10you can connect elements together and move and rotate elements based on the
00:15movement and rotation of other elements.
00:17For example, in this movie we are going to make the hula girl wave. We are
00:21going to connect the hula girl's arms and wrist movie clips to make it so when
00:27we click and drag the hula girl's hand, the arm moves and rotates as well.
00:32If you are following along, go ahead and open up Creating_Bones.fla in the
00:36Chapter3 folder.
00:37To create a bone system just use the Bone tool. The Bone tool is in the
00:41toolbar in the same flyout menu as the Bind tool. So I select the Bone tool,
00:45then I'll start dragging from the hinging point in the elbow that I want to
00:49rotate around.
00:50So it is going to be at the very bottom of the elbow. Then I'm going to click
00:53and drag and release my mouse button at the bottom of the hula girl's wrist.
00:57This will act as the hinging point for the wrist. Now I'll go to the Selection
01:01tool and watch the wrist rotate and the arm follow. Note also that Flash
01:08created an Armature layer for me.
01:10Flash created that layer by taking the artwork from the hand and arm layers. So
01:14whenever you create a bone system, all of the bone system elements go to the
01:18same layer automatically. And that's how easy it is to create a bone system in Flash.
Collapse this transcript
Animating with bones
00:00Animating bones is just as easy as creating them. In this movie we'll take a
00:04look at animating a bone system. If you are following along, go ahead and open
00:07up Animating_Bones.fla in the Chapter3 folder. The first thing we'll do is
00:11extend the timeline to Frame 40. I'm going to click and drag on Armature and
00:16hula girl layers, and then press F5 to extend the frames to that point.
00:21To animate on the Armature layer, all you have to do is go the frame that you
00:25want to change and move the elements of the bone system and Flash will create
00:29the tween for you. For example, if we wanted the hula girl to wave, I could go
00:33to say Frame 20 and then click and drag the hula girl's hand in a waving motion
00:41and then go to Frame 40 and put the hand back into it's original position,
00:48and then I'll have the animation.
00:53Now, I'll test the movie to see it in action. And there is the waving hula girl.
01:01This is obviously just a simple example of animating a bone system.
01:05But you can use the same ideas to create more complex and more powerful bone
01:09systems yourself, and it's just that easy with Flash CS4.
Collapse this transcript
4. Working with 3D Elements
Using 3D tools
00:00The new 3D tools in Flash CS4 allow you to mimic 3D effects from movie clips.
00:05The effects allow you to move and rotate movie clips in 3D space. If you are following along,
00:11you can open up 3D_tools.fla in the Chapter4 folder. The first
00:15thing that you need to use the 3D tools is a movie clip. So on the Stage here I
00:20have a movie clip selected. Then in the toolbar, I'm going to select the 3D
00:23Translation tool. It's hidden under the flyout menu with the 3D Rotation tool.
00:28The 3D Translation tool enables you to move an element in 3D space, so you can
00:33move the movie clip along the X, Y or Z axis. There are three different arrows
00:37to control that: red, green and blue. This corresponds to the different axes you
00:42can move the object on. To remember which colors control which axis, remember
00:47RGB/XYZ. So red controls the X-axis, green controls the Y-axis and blue
00:54controls the Z-axis.
00:56Not only can you move the element in 3D space, you can also move the vanishing
01:00point using the Property inspector. So if I wanted to make the vanishing point
01:04for the bottom right of the screen, I can do that using the Vanishing Point
01:08number sliders. Now, we can drag the movie clip's Z value, it moves based on its
01:14new vanishing point.
01:17You can also adjust the camera perspective by dragging the Camera Perspective slider in the Property inspector.
01:25So that way you can control where the camera is.
01:27So you can use 3D coordinates to move elements using the 3D Translation tool.
01:33Now we'll look at the 3D Rotation tool. The 3D Rotation tool enables you
01:37to rotate an object in 3D space. The colors that correspond to the axes in the
01:433D Rotation tool are the same as the 3D Translation tool. So RGB/XYZ, so using
01:50the red line I can click and drag to rotate the object around X-axis.
01:57The green line enables me to rotate around the Y-axis, and the blue circle
02:02enables me to rotate around Z-axis. Using the outer orange circle, you can
02:07click and drag to rotate around all axes at once. So using the new 3D tools in
02:15Flash CS4, you can mimic the effects of 3D and add powerful effects to your
02:20Flash applications.
Collapse this transcript
Creating 3D animations
00:00Using the 3D tools in Flash CS4, you can also create 3D animations. Here I have
00:05an unfinished animation. I'll test the movie to show what we have.
00:09Command+Return on the Mac, Ctrl+Enter on the PC. You can see the board rotating
00:13around the Y-axis. When it goes to finished rotation, it snaps to a still image
00:19of the board. In this movie we'll finish that board animation. If you are
00:23following along I'm working in 3D_Animation.fla.
00:26I'm going to go to the end of the timeline and find the grey frames where there's no
00:32Motion Tween applied. Now I'll start by applying the motion tween by right-
00:35clicking or Control-clicking the frames, and choosing Create Motion Tween.
00:40Now I'll go to the end of the animation and place the object in 3D space where
00:44I want it to be at the end. So I'll choose the 3D Rotation tool, make sure the
00:49object on the Stage is selected and then I'm going to rotate along the Y-axis.
00:54Bringing the left part of the board back and the right part of the board
00:58forward just a little bit.
01:01Now what I'll do is continue where the previous animation left off. So I'll
01:07rotate the board in a 3D space along the Y-axis, until it's flat or as close as
01:17I can get to flat and then I'll preview the animation. I'll scrub up the playhead
01:21right before the animation comes in and then scrub up through it to make sure
01:26it looks OK. Now I'll test the movie and preview the full animation.
01:34So creating animations like this is extremely easy using the new 3D tools.
Collapse this transcript
5. Flash Player Enchancements
Using H.264 video
00:00In Flash Player 10, you can now use video encoded with H.264 codec so you can
00:06play files like MP4 files and F4V files in the Flash Player.
00:10If you are following along, I'm working in Video.fla. Here I have a simple component on
00:15the Stage. It's an instance of the FLV Playback component and I don't have the
00:19skin applied, and all we are going to do play MP4 or FLV files is change the
00:24source of the FLV Playback component. In the Property inspector with the
00:28component selected, I'll click the Component Inspector panel button. In the
00:32Component Inspector panel, I'll set the source video to be an MP4 file.
00:39I'll click OK, the metadata gets gathered and then I can test the video in the
00:45Flash Player using Test Movie. Command+ Return on the Mac, Ctrl+Enter on the PC.
00:49(Waves crashing.)
00:54So we can play MP4 files in the Flash Player, we can also play F4V files.
00:59F4V files are FLV files encoded using H.264 codec. I'll change the source to my F4V file,
01:10gather the metadata, and then test the movie to see the F4V file playing
01:15in the Flash Player.
01:20So with the enhancements of Flash Player 10, you could
01:22take advantage of video that uses the H.264 codec.
Collapse this transcript
Using the vector data type
00:00Flash Player 10 supports a new class similar to the Array class called Vector.
00:05Because of the strict requirements of the Vector class, you are able to more
00:08quickly iterate through it than through an array. Let's take a look at this
00:12syntax for the Vector class. Select the first keyframe of the Actions layer and
00:16open the Actions panel using Option+F9 on the Mac, or F9 on the PC. Here I have
00:21a vector created called numbers. Now this syntax may look pretty foreign, but
00:25it's actually quite simple. I have the variable name, the data type is
00:30Vector.<uint> in brackets.
00:34The brackets are greater than and less than brackets. So we have the name of
00:38the class and then a dot. Then we have the data type if the vector will hold in
00:43the brackets. So the only type of data we can put inside this vector are
00:47positive integers. Then we create a new instance of the Vector class. We are
00:52being sure to add a dot and then our data type and then there are two
00:56parameters that we pass in. First an integer. This integer represents how many
01:03indices can be inside of the vector. Here my vector may hold three indices.
01:09Whether or not you can continuously add in the vector depends on the next value.
01:13The next value is called Fixed.
01:16This defines whether or not you can add more indices to your vector than you
01:21already specified in the initial parameter. One of the advantages to this type
01:26of control over numbers is that there is no empty slot inside of a vector.
01:30For example, you can have an empty slot in an array or many
01:34empty slots. You can have a value at index zero and a value of index nine and
01:40nothing in between. In a vector you cannot do that. Each index must have a value.
01:46Each index gets a value and there are no holes so to speak. Here I'm
01:52setting the values of the vector just like an array. I give the index zero a
01:58value of one, index one value of two and the index two value of three.
02:02Now when I trace numbers and test the movie, Command+Return on the Mac,
02:06Ctrl+Enter on the PC, I get one, two, three in the Output window. Just
02:10like I would if I tested in the movie with an array. Now let's say, I broke the
02:14rules and I wanted to have a negative one inside of my vector. When I test the movie,
02:22I get a weird error.
02:26That doesn't come through as an official error, but
02:28notice this number. What is that number? That's actually the highest value for
02:33a positive integer. So the vector essentially can't disobey the rules to hold
02:39data that is not of the appropriate data type.
02:42So instead of converting the value just to negative one, it treats the value as
02:47a positive integer, as if I were to wrap negative one in the parenthesis for
02:52uint, like I have on my screen here. With vectors you get the same properties
03:02and methods as you do it with an array. You can see this if you put a dot after
03:06numbers in the trace statement. So you'll see foreach, indexof, length, pop,
03:13push, etcetera. So you can work with a vector just like an array. Except for
03:18it's an optimized version of an array.
03:20Because vector is more optimized than the array class, it's recommended that
03:24you use vector instead of array in every case you possibly can. The only cases
03:29where you should use array is where you need different types of data inside of
03:33an array. Like the array class, the vector class has a lot of intricacies.
03:38You can learn about all of these through Flash Help.
Collapse this transcript
Conclusion
Goodbye
00:00So, that's a look at some of the new feature in Adobe Flash CS4. Hope you can
00:04find creative ways to use these features in your applications. See you next time.
Collapse this transcript


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 98,718 instructional videos.

start free trial 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 1,899 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.


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