Embedding Video in a .fla/.swf file
Embedding a video in a movieclip or movie timeline makes the video part of the SWF file
Embedding is recommended only for small video clips that are less than 10 seconds in duration for several reasons:
- Longer clips can lose the sychronization between sound and audio tracks if they are embedded
- The SWF file will not start to play until the entire file downloads and the player may hang up if the file is too large,
- if the file is larger, choose to progressively download video, by using a component or actionscript to load an external FLV file, which downloads separately and starts to play once the initial segment has downloaded.
Configure the Flash movie before you embed the video
- Before you create the movieclip for the imported video you need to set the frame rate of the Flash movie to the same frame rate as the imported video.
- Click on the movie editing screen
- Type the frame rate (30 fps or whatever the frame rate is) in the Flash document Property inspector
- You can also enter a number that divides evenly into the frame rate of the movie you are embedding:
- for example your Flash movie could have a frame rate of 15, and your embedded video a frame rate of 30 fps.
- That way every second frame would be dropped from the flash movie and the result would be more predictable.
- Save the FLA version of your movie
Import the video directly into the library, the movie timeline or into a movieclip symbol
- Importing the movieclip into the library lets you later place it into a symbol or into a movieclip. It will expand the timeline of the movie or movieclip to the number of movie frames.
- importing the movieclip directly into the movie timeline makes the timeline very long and more difficult to manage. You can also drag a movieclip you imported into the library onto the movie timeline.
- Importing the video into a movieclip provides flexibility because you can use multiple instances of it in the movie itself, add controls, etc. You can also drag a movieclip you imported into the library onto the movie timeline.
- The tutorial defines importing into a movieclip, but you can use the same process for any of the destinations.
Importing the video into a movieclip
- File>Import> to start importing the video
- Select Import to Stage or Import Video on the popup menu
- Select the video file you want to import
- The Import Video Wizard opens
Deployment
- Progressive download from server will create external FLV file
- Streaming choices require special server
- Select: Embed Video in SWF file and play in timeline
- Linked Quicktime video provides link to Quicktime movie
- Click the Next button
Embedding
- Symbol Type provides 3 options:
- Embedded video puts it in movie timeline. If a movieclip symbol was open when you started import, it would be placed into the moviecip.
- movie clip embeds video into a movieclip symbol in the library
- Graphic embeds video into graphic symbol, which does not make much sense
- Audio Track is available if video has audio
- Integrated includes both in same symbol
- Separate results in two symbols, one for video and one for audio
- Place instance on stage puts it into movie or into symbol, depending on what is open. If you want it in library only, then uncheck this box.
- Select: Expand Timeline if needed expands timeline to number of frames in video
- Embed the entire video includes entire video OR
- Select to see what it offers: Edit the video first lets you edit it
Split Video

- This window lets you clip frames from the beginning or end of the video
- Drag the sliders to set new start and end points
- Click Preview Clip to see how it will look
- Click Update Clip to update it
- Click the plus (+) button in the left window to create the new clip.
- Click the Next button
Encoding
Flash Video Encoding Profile
- provides options for Flash 7 and Flash 8 players
- Provides Modem quality (40kbps) for Flash 7
- Provides Low (150kbps), Medium )400kbps), and High (700kbps) quality settings for both Flash 7 and Flash 8
Show Advanced Settings has 2 tabs
If you chose an Encoding profile, the items are configured by the Encoding profile
If you change them, you will see the Encoding profile change to custom
Encoding
Encode Video
- Video Codec:
- Sorenson Spark is for Flash 7 player
- On2 VP6 is for Flash 8 player
- Frame rate can be set to same as FLA, Same as source, or several other settings. Same as source is the default.
- Key Frame Rate determines how frequently the entire video frame is repainted. The default is every 2 seconds (60 frames). A key frame rate smaller than 60 adds to file size.
- Quality lets you change quality settings, low, medium, high, custom. Need to experiment to see resulting quality and file size.
- Resize video clip allows resetting width and height of clip. Check Maintain Aspect Ratio to ensure that result is not distorted.
Encode Audio
- Sets Audio Codec
- data rate, both mono and stereo. The higher the data rate, the bigger the file
Crop and Trim Tab
lets you crop edges of video
changes video size, which is visible in window
Click Next
Click Finish
Test the resulting SWF file for file size and quality
- Click Scene1 on the Timeline to open the movie editing screen
- Change the name of layer 1 to movieclip
- Click inside keyframe 1 of the movieclip layer
- Drag the movieclip symbol onto the movie editing screen
- Test to see how it looks
- File>Export Movie or File>Publish to create an SWF file
- Do File>Open to check its file size
- The FLA file is 4.8 MG
- The SWF file is 75 KB
- If it is too big go back and lower the quality of the movieclip
- Rightclick the movieclip in the Library window and click Edit Symbol
- Delete the video on the movieclip
- Import the video again and this time lower the quality slider
- Put the movieclip back on the Timeline of the Movie
- Test the clip
- Export it as an SWF file to check the size
- When you are satisfied with the results, go on to create the buttons to run it