CIS 421Flash> Import Video

Flash 8: Importing Video

Apple Quicktime 4 or higher and/or DirectX 7 or higher must be installed to import the following video file formats (Mac or PC)

  • Audio Video Interleaved (AVI)
  • Digital Video (DV)
  • Motion Picture Experts Group (MPG or MPEG)
  • QuickTime Movie (MOV)
  • Windows Media File (WMV)

Flash Video Encoders

  • On2 VP6 video encoder (codec) for Flash 8 player
  • Sorenson Spark codec for Flash 7 player

Compression

  • Try to use a high quality video file that is relatively uncompressed
  • Sorenson Spark and On2 VP6 video encoder do an excellent job of compressing
  • Quality degrades if you compress an already compressed video file -- better to do it once brutally than twice.

Embed. Link, or Stream Video

  • Embed a video in a movieclip or movie timeline makes the video part of the SWF file
  • Import video clips in Macromedia Flash Video (FLV) format directly into Flash
  • Use the FLVPlayback component (Flash Pro 8), to add a full-featured FLV or MP3 playback control to your Flash movie.
    • Use Flash Video Encoder (comes with Flash 8 Pro) to encode files in FLV format
    • Components have a number of available "skins" with different button combinations.
  • Link to an external Quicktime MOV file, which is not part of the SWF file
  • Stream Flash video, which requires the Flash Communications Server
  • Progressively download video from a web server. Use relatively large video clips, and keep the size of published SWF files down. Use the FLV Playback component or ActionScript to control video playback and provide intuitive controls for users to interact with the video.

Load FLV files in a SWF movie

Create 3 FLV files using this method.

  • Create a new Flash movie and save it in a folder. The skins and the FLV files are separate so you need to be sure you upload everything to the server. It is easier if it is all in the same folder.
  • This size is for a 320 x 240 px size movie -- if you use a 160x120px movie you need to either change the dimensions when you import it, or use a smaller size skin.
  • Change the movie dimensions to 350x320px
  • Change the frame rate to 30 fps (or 15 fps)
  • Change the background color if you like.
  • Click File>Import>Import Video to open the Import Video window
  • Select
  • Browse to an MOV, AVI or, WMV video file, & click Next
  • On the Deployment page, click the radio button next to Progressive download from a web server & click Next
  • On the Encoding page leave the medium quality selection.
  • If you want to use advanced settings click that button to change encoding codecs, quality, resize video, change data rate, or crop & trim video. Click Next when done
  • On the Skinning page, choose a skin to determine the appearance & position of the play controls for the video - if you want all the VCR controls, select one that has All as part of its name. External controls do not cover the movie. Click Next
  • On the Finish Video Important page click Finish

Create an FLA file on which to load FLV videos

  • Movie size should be larger: 550x400 px works
  • Change frame rate to 30 fps
  • Insert>new symbol to create a movieclip symbol called holder
  • Draw a small square or circle around the crosshairs.
  • change the layer to a guide layer so the holder becomes invisible.
  • Open movie editing screen & rename first layer Holder
  • Drag holder movieclip into first keyframe of holder layer
  • Give holder movieclilp an instance name mc_holder
  • Insert>New Symbol to create a button -- can be text or drawn button.
  • Switch to movie editing screen & insert a new layer, play1.
  • View>grid to display grid to line up buttons.
  • Drag button into keyframe 1 of play1 layer.
  • Name instance of button btn_play1 in property inspector
  • Open Actions palette and generate following script
    on (release) {
    loadMovie("movie1.swf", "mc_holder");
    }
  • Selecct the text tool in the toolbar, set text size to about 30, and type play 1 on the button.
  • save movie and click Control>test movie to see movie1.swf play.
  • Adjust location of holder movieclip so that movie plays on stage.
  • Repeat process for movie2.swf and movie3.swf, using same button with different instance names.

Link to movie