Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In this chapter we'll be working with video and talk about some advanced video principles. We'll start by talking about how to bring in video with an alpha channel into Flash. An alpha channel is a transparent part of the video. For example sometimes video is filmed with a green background and then that background is removed from the video digitally, so that the background is then transparent. Now we can work with that in Flash and that's what we'll talk about how to do in this movie. If you're following along, I'm working in 01_Transparency.fla in the Chapter 08 folder in the Exercise Files folder. This is actually just a blank document.
Let's choose File, Import, Import Video to import a video file. The video is going to be on the computer, so click the Choose button to select a file in the computer. And the file that we're going to choose is in the Exercise Files folder in Chapter 08, and it's called Paavo_unicycle.mov. Select that file then click Open. Now this file already has an alpha channel encoded. If you're following along and don't have access to the Exercise Files but have access to a video with an alpha channel encoded, then choose that video here.
If you don't have access to an alpha encoded video, follow along and take a look at the steps that you would take to add transparency to your video in Flash. So let's click the Continue button to go forward. For the video deployment type, I'm going to choose Embed video in SWF and play in timeline. Now when I choose that option notice that there's a big warning on the right side of the Import Video window. It says that Embedded deployment is likely to cause audio synchronization issues. So I'm choosing this option knowing that this video has no audio. And Flash tells us that this option is only recommended for short video clips with no audio track.
Another disadvantage to embedding video is that it substantially increases SWF file size as Flash is telling us here. But the advantage that we have to embedding video in the timeline is that we can sync our video with other elements on the stage. So embedding video is great if you need to sync parts of your video with graphics on the stage, and the video is very small in file size and has no audio track or at least the audio track does not need to be synced with the video. So let's click Continue. For the Symbol type I'm going to choose Movie clip to put the video inside of a movie clip.
I'm making sure the Place instance on stage option is checked, as well as the Expand timeline if needed option. I'm also choosing to Embed the entire video. I'm going to click the Continue button to continue and as I click and drag to preview a video, You can see that it's a little bit less than two seconds long, and notice the transparency behind the video. In other words, we can see the background of the Import Video window. In order to have transparency in the video in Flash, we need to click the Video button and check the Encode alpha channel option.
That's what adds transparency to our video. Now again this won't add transparency to a video if you just have a green screen in the background. You actually have to add an alpha channel to your video or a transparent area of your video in a video editing program. So this is something you cannot simply do in Flash. You actually need to have video that has an alpha channel already. So with that option checked I'm going to click the Crop and Resize button. Then I'm going to check the Resize video option at the bottom and in the center of Import Video window. And I'm going to leave that Maintain aspect ratio checked.
I'm going to change the width to 220 pixels. So I'm going to resize this video. With that option I'm going to click the Continue button. Flash then gives me a summary of what it's going to do for the video, and then I click the Finish button to encode the video. And if you don't see your video on the stage after the Encode Video window closes, you can click away or move your mouse and you'll see the video on the stage. And so there's the video on the stage. When I select it with a transparent background, you to see that it's inside of a movie clip with an Instance Name of Paavo_unicycle.mov, which is the same name of our file that we imported.
Let's test the movie to see what it looks like in Flash. Command+Return on the Mac, Ctrl+Enter on the PC. And you can see him on his unicycle. I'll close that window. And there's a look at taking video with an alpha channel into Flash and applying its transparency.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.