This tutorials covers the process of getting videos or audio from youtube into your Flash project. There are three parts; getting the file, checking the video format, and importing to Flash. Feel free to jump to the section you need.
Get the file
2. Go to vixy.net or any other online app that extract get video or audio out of youtube.
3. Paste the url into their form.
4. Select your format, and press start.
5. Vixy should begin to extract your video or audio and then download it to your desktop or downloads folder.
6. Open the file and confirm that everything worked ok.
Check the video format
In this case I’m using CS4, but older versions have a similar process. I’m going to import the file into the Flash timeline for use in an animated project but you may want to convert the video to FLV first to play back at runtime.
1. Check the codec or format that was used to compress the video. If you extracted using Vixy it is probably mp4. Video files may have a particular file type such as .mov or .wmv, but they can use a variety of codecs that are not always compatible with Flash or other software.
2. If you have an MPEG-4, like I do in the image below (on a Mac, command + i), you will first need to convert the video to a different format before importing into Flash.
3. You can convert video formats on a Mac very easily with Quicktime Pro (QTP) or Flash Media Encoder.
Convert video format in Quicktime Pro
a. Open the video in Quicktime Pro.
b. Choose File > Export.
c. Click Options to view the Movie Settings.
d. Make sure you are using a format that Flash can import like H.264 or Photo-JPEG.
e. Choose a destination for your exported video and click Save.
Convert video format in Flash Media Encoder
a. Open Flash Media Encoder.
b. Choose File > Add… to add your video. This will add the video to a queue
c. Choose the Format (FLV or H.264), Presets (FLV-Same as Source), and Output File (same name with FLV extension).
d. Click Start Queue.
Import the video into Flash
1. In Flash, choose File > Import Video
2. Browse for your video file on your computer.
If your format doesn’t work in Flash it will give you an error message. See “Check your video format” above in this post.
3. If you want Flash to add a play button and scrubber then select the radio button next to “Load external video with playback component.” Otherwise if you want Flash to put it on the timeline so you can control how your video is played then choose the radio button next to “Embed FLV in SWF and play in timeline.” Obviously you must have an FLV to choose this option.
4. Click Continue.
5. On the next screen choose Movie clip as the Symbol type, and select all of the other options. Then click Continue.
5. If all of the settings are correct you can click Finish and Flash will import your video into a Movieclip on your main timeline and store the video and Movieclip in the Library.
Once this is done you can double-click and view the video on the timeline of this Movieclip to scrub the playhead and verify everything is ok. From this point you can do anything with the video you could do with a regular Movieclip with an embedded timeline such as controlling which frame is played based on user input, or tweening it on the stage.
For more information see: Embed video within a Flash file