19
Chapter 16 Chapter 16 Video Video

Chapter 16 Video. Importing Video Into Flash Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Embed Size (px)

Citation preview

Page 1: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Chapter 16Chapter 16

VideoVideo

Page 2: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Importing Video Into FlashImporting Video Into Flash

Once you import video into Flash, you can Once you import video into Flash, you can control it using behaviors and very basic control it using behaviors and very basic ActionScript, target different points in the ActionScript, target different points in the video to allow users to jump from point to video to allow users to jump from point to point, transform video clips on the Stage, point, transform video clips on the Stage, apply effects such as tinting and skewing, apply effects such as tinting and skewing, or publish a QuickTime file. You can also or publish a QuickTime file. You can also cut apart a video and organize the clips, cut apart a video and organize the clips, apply color correction, and modify how the apply color correction, and modify how the video is imported into your Flash project.video is imported into your Flash project.

Page 3: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Acceptable Video Import FormatsAcceptable Video Import FormatsFile TypeFile Type ExtensionExtension WindowsWindows MacMac SoftwareSoftware

Audio Video Audio Video InterleavedInterleaved

.avi.avi YesYes YesYes QuickTime4 QuickTime4 or DirectX 7 *or DirectX 7 *

Digital VideoDigital Video .dv.dv YesYes YesYes QuickTime4QuickTime4

Motion Picture Experts Motion Picture Experts GroupGroup

.mpg, .mp.mpg, .mpegeg

YesYes YesYes QuickTime4 QuickTime4 or DirectX 7 *or DirectX 7 *

QuickTime MovieQuickTime Movie .mov.mov YesYes YesYes QuickTime4QuickTime4

Windows Media FileWindows Media File .wmv,.wmv,

.asf.asf

YesYes NoNo DirectX7 *DirectX7 *

Flash Video FileFlash Video File .flv.flv YesYes YesYes NeitherNeither

* Windows only

Page 4: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

On2 VP6 and Sorenson Spark On2 VP6 and Sorenson Spark Video CompressionVideo Compression

Exported video is compressed in Flash Exported video is compressed in Flash using the new On2 VP6 video codec for using the new On2 VP6 video codec for use with Flash Player 8 and the Sorenson use with Flash Player 8 and the Sorenson Spark codec for use with Flash Player 7. Spark codec for use with Flash Player 7.

A codec is an algorithm that controls the A codec is an algorithm that controls the way video files are compressed and way video files are compressed and decompressed during import and export. decompressed during import and export.

Page 5: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Codecs Supported by Flash Codecs Supported by Flash VersionsVersions

CodecCodec Published Published Version Version (swf file)(swf file)

Flash Player Flash Player required for required for playbackplayback

Sorenson SparkSorenson Spark 66 6, 7, 86, 7, 8

77 7, 87, 8

On2 VP6On2 VP6 66 88

77 88

88 88

Page 6: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Flash 8 Video FeaturesFlash 8 Video Features

Media components – quick integration through Media components – quick integration through click and dragclick and drag

Improved video workflow – video import wizard Improved video workflow – video import wizard helps to deploy video content for embedded, helps to deploy video content for embedded, progressively downloadable and streaming progressively downloadable and streaming video deliveryvideo delivery

Stand-alone video encoder – separate Stand-alone video encoder – separate application that improves workflow by providing application that improves workflow by providing an easy way to convert video files into a Flash an easy way to convert video files into a Flash Video (FLV) formatVideo (FLV) format

8-bit alpha support – allows you to overlay video 8-bit alpha support – allows you to overlay video composited with a transparent or semi-composited with a transparent or semi-transparent alpha channel over other Flash transparent alpha channel over other Flash contentcontent

Page 7: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Macromedia Flash Video (FLV)Macromedia Flash Video (FLV)

Lets you import or export a static video Lets you import or export a static video stream with encoded audio.stream with encoded audio.

When exported, the video is compressed When exported, the video is compressed with the Sorenson codec and the audio is with the Sorenson codec and the audio is compressed using the streaming audio compressed using the streaming audio settings in the Publish settings dialog box.settings in the Publish settings dialog box.

Page 8: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Exercise 1 -- Importing VideoExercise 1 -- Importing Video

FileFile

ImportImport

Import to Stage (will also appear in Library)Import to Stage (will also appear in Library)

Select the video to import. Select the video to import.

Video Import Wizard appears. Video Import Wizard appears.

Deployment Deployment

Embed video in SWF and play in TimelineEmbed video in SWF and play in Timeline. .

Embedding (set the properties)Embedding (set the properties)

Encoding (set the properties)Encoding (set the properties)

Finish Video Import Finish Video Import

Page 9: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Compression SettingsCompression Settings

Video codec – specifies the encoding Video codec – specifies the encoding Frame Rate – sets the number of frames that Frame Rate – sets the number of frames that

display every second on playbackdisplay every second on playback Key Frame Placement – specifies a custom Key Frame Placement – specifies a custom

keyframe intervalkeyframe interval Key Frame Interval – specifies the number of Key Frame Interval – specifies the number of

keyframes per frame of your actual moviekeyframes per frame of your actual movie Quality – specifies the quality of all of the framesQuality – specifies the quality of all of the frames

Page 10: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Note:Note:

Video keyframes are different than the Video keyframes are different than the Timeline keyframes that you have Timeline keyframes that you have previously learned aboutpreviously learned about

Page 11: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Controlling Video with Stop and Controlling Video with Stop and Go ActionsGo Actions

1. Select the video clip.1. Select the video clip.

2. In Properties Inspector, give the instance a 2. In Properties Inspector, give the instance a name.name.

3. Drag a Play button to the Stage and Select.3. Drag a Play button to the Stage and Select.

4. In Actions, enter the script4. In Actions, enter the script

on(release) on(release)

{ instancename.play();}{ instancename.play();}

This tells Flash to play the movie when the Play This tells Flash to play the movie when the Play button is released.button is released.

Page 12: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Controlling Video with Stop and Controlling Video with Stop and Go Actions cont.Go Actions cont.

5.5. Drag a Stop button to the Stage and Select it.Drag a Stop button to the Stage and Select it.

6.6. In Actions, enter the scriptIn Actions, enter the script

on(release)on(release)

{ instancename.stop();}{ instancename.stop();}

7.7. Make sure that you add an actions layer and Make sure that you add an actions layer and include instance.stop(); in frame 1 so that the include instance.stop(); in frame 1 so that the video clip doesn’t play automatically when the video clip doesn’t play automatically when the movie starts.movie starts.

Page 13: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Controlling Video by Targeting Controlling Video by Targeting Frame LabelsFrame Labels

You can also target specific points in the video You can also target specific points in the video using behaviors. using behaviors.

To accomplish this,To accomplish this,1.1. Insert a label layer and add labels to the points in Insert a label layer and add labels to the points in

the video that you would like to go to.the video that you would like to go to.

2.2. Insert the movieclip behavior “Goto and Play at Insert the movieclip behavior “Goto and Play at frame or label” and select the appropriate label.frame or label” and select the appropriate label.

Page 14: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Named AnchorsNamed Anchors

A named anchor is a special frame label that A named anchor is a special frame label that resides on the Main Timeline. Once the named resides on the Main Timeline. Once the named anchor is played in a browser window, it is anchor is played in a browser window, it is registered in a browser’s history so when a user registered in a browser’s history so when a user clicks on the Back button in the browser, the clicks on the Back button in the browser, the browser will play the previous named anchor browser will play the previous named anchor position on the timeline. This allows you to position on the timeline. This allows you to create movies that work with the Forward and create movies that work with the Forward and Back buttons in a browser.Back buttons in a browser.

Page 15: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Making a Named Anchor LabelMaking a Named Anchor Label

Create a labels layer.Create a labels layer. Click in the specified frame. Click in the specified frame. In Properties Inspector, enter a label name In Properties Inspector, enter a label name

in the in the Frame label fieldFrame label field.. Under the Frame label field is a Under the Frame label field is a Label Label

Type Type drop-down menu. Select drop-down menu. Select AnchorAnchor..

Page 16: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Publish SettingsPublish Settings

Choose File > Publish Settings to open the Choose File > Publish Settings to open the Publish Settings window.Publish Settings window.

Click the HTML tab at the top.Click the HTML tab at the top. In the Template drop-down list, choose Flash In the Template drop-down list, choose Flash

with Named Anchors. This will add JavaScript with Named Anchors. This will add JavaScript into the HTML document that will catch the into the HTML document that will catch the named anchors as they play in the browser. F12 named anchors as they play in the browser. F12 will allow you to publish your Flash movie and will allow you to publish your Flash movie and preview it in your browser so that you can test preview it in your browser so that you can test the named anchors.the named anchors.

Page 17: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Editing VideoEditing Video

The new Video Import Wizard allows you The new Video Import Wizard allows you to select a video clip and choose which to select a video clip and choose which portions of the video that you actually want portions of the video that you actually want to import into your movie. This keeps you to import into your movie. This keeps you from having to purchase a video editing from having to purchase a video editing program such as Adobe Premier.program such as Adobe Premier.

Page 18: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Editing VideoEditing Video

After importing the video, select After importing the video, select Embed video Embed video in Macromedia Flash documentin Macromedia Flash document

In the Editing pane of the Video Import Wizard, In the Editing pane of the Video Import Wizard, selectselect Edit the video first. Edit the video first. This opens the This opens the Customize Editing panel. You can trim the Customize Editing panel. You can trim the length of your video clips, create multiple clips, length of your video clips, create multiple clips, and reorder video clips. and reorder video clips.

Use Use Set in PointSet in Point to specify the beginning of the to specify the beginning of the clip and clip and Set Out PointSet Out Point to specify the end of the to specify the end of the clip. Click clip. Click Create Clip Create Clip and name the clip.and name the clip.

Page 19: Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target

Using Flash Video EncoderUsing Flash Video Encoder

Flash 8 Video Import WizardFlash 8 Video Import Wizard Only one video can be encoded at a timeOnly one video can be encoded at a time Thus, time intensiveThus, time intensive

Flash 8 includes a standalone video encoderFlash 8 includes a standalone video encoder Flash 8 Video EncoderFlash 8 Video Encoder

Can be used to do batch process video clipsCan be used to do batch process video clips Thus, speeding up your workflowThus, speeding up your workflow

Cue points are established points or markers in a Cue points are established points or markers in a video clip that can be used to trigger other actions.video clip that can be used to trigger other actions.