Flash 9 : Video

Note that some of the ideas have been covered in earlier chapters. If you have forgotten the steps look back for instructions.

Video basics
Note: As Flash (and Director) both use the term Movie to indicate an application I will use the term “Video” to represent a file such as a windows avi, wmv or QuickTime(mov).

Working with video
Video was not part of Flash in its early days. Flash 4 allowed QuickTime Video to be imported, and was able to create a QuickTime mov file that could be viewed with the QuickTime 4 (or higher) player. Flash MX introduced an embedded video format.

Before you can use video in Flash it must be created. The better the original and edited video is the better your Flash video will be.

Probably the simplest way to create original video is by using a video capable Digital Camera or web cam, as the video is created in a digital format. The quality of these videos varies considerably. Downloading video from the Internet, or capturing video from TV/Video or DVD has extensive copyright problems, and does not follow the general rule often applied to text of 10% for fair use. It is safer to create your own video. Capturing video on a Video camera will give better results. From about 2005, video cameras that capture direct to Hard Disk or DVD have become popular.

Tape base video cameras are still being used extensively as their quality is probably still the best, but conversion to digital requires specialized hardware and software. Basically the video is played in the camera and streamed to a PC, the PC software then converts the analog video to digital. If your hardware cannot keep up (for example another program occurs while video is being captured – such as a virus scan - or the hard drive needs to find another sector) frames can be dropped.

Once the digital video is created it needs to be edited before inserting into Flash. Flash 8 does allow for some basic editing such as chopping off the start or end of the video, so any “in-video” editing needs to be done separately from Flash.

Flash allows video to be imported or in the Professional version linked. You can link a QuickTime video if you have your publish settings to Flash 3,4 or 5). Use the online help for more information.

Video tips
Just a few tips to improve your video.


 * Use a tripod. This cannot be underestimated. When digital video is created, to allow it to be smaller it creates a keyframe, then records the changes to that keyframe rather than storing all of the frames following (this is known as temporal compression). So if the camera is steady this will significantly reduce the size of your digital video.


 * Be aware that when you are holding the camera you are very near the microphone. So if you do want to record yourself talking, keep your volume down!

Flash video (FLV) format.
When a video is embedded into a Flash Movie, it is saved in the library as an FLV (Flash video) file. So Flash needs to convert the video that you have captured into an flv format.

Compressing a video then decompressing for playback or editing is the job of a video codec (compressor-decompressor). Video formats such as Microsoft’s Audio Video Interleave (avi) or Apple’s QuickTime (mov) can use several different codecs. If the codec is not available on the computer the video it will not play!!. Compression can be temporal (interframe) or spatial (in-frame). Temporal, creates a keyframe then for successive frames stores the changes, whereas spatial means that a single frame is compressed by losing some information such as colours that are very similar.

Flash 8 has available two codecs for the flv file (Soreson Spark and the higher quality/ better compression On2 VP6). Sorenson Spark was introduced in Flash MX and On2 VP6 in Flash 8. Both give really good compression.

Flash 9 introduced the ability to display video in full screen mode.

Compressing video can take a significant amount of time, so a Video Encoder was available from Flash 8, and may be available in your system (comes with Flash 8 Suite, and Flash 9 Pro). This allows you to create a list of video files to compress and do them as a batch.

Source a video file

 * 1) Use a digital camera to take a short movie, or download one from the Internet and place in your Journal Folder.

Sample videos These videos have been saved with a txt extension to avoid being firewalled. Download them then rename the .txt to .mov
 * Windsurfer movie

Create a new Flash document

 * 1) Create new flash document, reset the layout to the default one. Save as jnlVideo.fla

Convert your movie to an flv file
Using Adobe Flash CS3 Video Encoder convert your mov file to an flv file. Save the resulting file into the same folder as jnlVideo.fla

Inserting video
There are two ways that we will look at including video into our movie (there are others)

1. Embedded into the flash movie. This is generally not recommended unless the movie is short as it will increase the size of your Flash movie. Embedding the movie into Flash was initially a big advantage over other formats as if you could play Flash, the movie would play (as the Flash codec came with Flash). Embedding allows you to add special effects such as clickable areas onto the running video.

To embed a video use
 * File > Import > Import Video >
 * then On your computer [Browse] to the flv file you created, then [Next]

In the Deployment window select Embed video in SWF and play in timeline. (Read the notes on the right hand side), then click [Next]

If you choose another format (e.g. .mov) you will get two additional windows


 * Embedding defaults and
 * Encoding defaults (you can do some basic video editing here)

Finally the Finish Video Import window is displayed. Click [Finish] and the video will be embedded into your swf file



2. Flash also gives you another way to include video in your Flash Movie, Progressive download from a web server

This has the advantage of keeping your video external to your Flash movie, keeping the swf file much smaller, and has improved playback. The wizard also allows you to choose from a range of templates to add video and volume controls to the stage.

If you choose this option you will find additional files are created on your working directory. These will need to be copied to the web server (along with the flv file) for the player controls to be included.



Task: Create jnlVideo1.fla and use this method to add an external video file.