• home
  • forum
  • my
  • kt
  • download
  • Home / 2D Graphics / Flash / Video /

    Video In Flash

    Author: 2007-06-15 16:25:28 From:

    Learn how to use videos in Flash!
     
    Video in Flash 8 has a whole new feel. You can import, compress, export and view movie files in Flash. We're going to walk through, from start to finish, the entire process of using video in Flash.


    Supported File Formats


    Let's take a short look at the formats available within Flash.

    If you have Quicktime installed, the following video file formats are supported for importing embedded video:


    File Type
      Extension
     Audio Video Interleaved
     .avi
     Digital Video
     .dv
     Motion Picture Experts Group
     .mpg, .mpeg
     Quicktime Video
     .mov


    If you have DirectX 9 or later installed (PC only), then these formats are supported:


     File Type
     Extension
      Audio Video Interleaved  .avi
     Motion Picture Experts Group .mpg, .mpeg
     Windows Media File
     .wmv, .asf



    Codec



    The default codec used in Flash 8 is called "On2 VP6". The codec controls how the video is compressed during the encoding process. It also controls the decompression when the video is played.

    Now we know about the basics terms, lets look at adding our own video to Flash. Remember, you need to use one of the supported video formats listed above. If you don't have a video, you can download one from Google Video, or Yahoo Video. In this example I found a Spiderman trailer from Yahoo Video.


    Importing

    Importing the video into Flash is simple. All you have to do is select "File > Import > Import Video...". You will then see an Import Video window appear. If you are using a video that is already hosted on a server, you can select the second circle, then provide the URL. In this example, we have the file on our computer, so we need the first circle checked, named "On your computer". Press the browse button, then locate your movie. Then press next.





    Deployment

    You will then move on to the deployment stage. This is where you select the method of deplying your video. There
     are 5 choices. You can read about each of the choices on the right hand side, if you select them. The default setting "Progressive download from a web server" is the setting we need, so ensure it is selected.





    Then press the Next button


    Encoding

    The encoding section is important in determining the quality of your final video. Flash has several presets in a drop down menu at the top left. You will also see your movie on the right hand side. If you drag the handles beneath it, you can select a portion to be encoded, rather than the entire video. Click the "Show advanced settings" button. We can now fine tune the encoding process.

    Here you can set the video quality on the right hand side. The default quality is Medium. The better the quality, the higher the file size will be. The frame rate option allows you to choose the frame rate for the video. If you don't know what frame rate your video is, just leave it on the default "Same as source" setting, which will match the FPS of your video (the source).

    Once you are happy with your settings, or if you have selected one of the presets, click the Next button.


    Skinning


    The skinning section is where you can choose from a huge list of skins, or appearances, for your media player. Choose a skin from the drop down list on the left. Once you have selected one, an interactive example will be shown so you can see how it looks. A good skin to choose is SteelExternalAll.swf, as the buttons can be seen clearly, and it does not cover the video.





    If you don't want play controls on your video, you can select "None" from the drop down list, at the top. When you have chosen your skin, press the Next button again.


    You will then be shown a screen detailing the next steps in the process. The text explains that you need to save your .fla document before the other files can be saved. When you have read the text, press the Finish button. It will automatically open the save box. Select a location to save your .fla file.

    When you have saved the file, the encoding stage will begin. Depending on the size of your video and encoding settings you specified earlier, this takes a varied length of time.





    The encoding stage shows a progress bar and estimated time of completion, as well as displaying the output of the file, and the source file. In addition to these, it shows the audio and video settings you selected in the "Encoding" section. Once it has completed, you will be taken to your stage. You should see the movie on your stage, accompanied by the player. To view the movie with the controls, test your movie by pressing Control + Enter.


    Uploading

    If you want other people to see the video with the controls, you need to upload the files to your server. Go to the location where you saved your video. You should see five Flash files. Three of these files need to be uploaded to your server in order to be viewed. These are detailed below.


    Upload

    • The FLV file - The Flash video file.
    • The Media Player SWF - Named "SteelExternalAll" in this example.
    • The regular SWF - The normal SWF file, named the same as your FLA.

    The two remaining files should be:

    • Your movie - The original movie you started with
    • The FLA - The development file which allows you to edit the video

    Upload the three files to your server if you have one. To show other people your video, you need to give them the link to the regular SWF. Remember to upload the three files to the same folder on your website, or they will not work.

    discuss this topic to forum

    relation tutorial

    No relevant information

    Category

      3D (20)
      Math Physics (14)
      3rd Party (5)
      Navigation (60)
      Actionscripting (26)
      Optimization (16)
      Animation (32)
      Projector (9)
      Audio (46)
      Special Effects (112)
      Backend (25)
      Text Effects (65)
      Drawing (18)
      Tips and Techniques (41)
      Dynamic Content (25)
      Tricks (6)
      Games (66)
      Utilities (19)
      Getting Started (71)
      Video (10)
      Interactivity (21)
      Web Design (22)

    New

    Hot