Errata

 

TextField Listener


Source

Old code:

hearMe = new Object();

hearMe.onChanged = function() {

output = "Changed event occured";

};

TextField.addListener(hearMe);

New code:

hearMe = new Object();

hearMe.onChanged = function() {

output = "Changed event occured";

};

 

input1_txt.addListener(hearMe);

Good News!

No Quiz Next Monday! Take best 2 of 3 from Quiz One, Quiz Two and Homework One

Flash Video Basics

 

Flash Video Before MX

Only worked for QuickTime export.

Example on Apple.com

Flash MX Video

GOTCHA: only available in Flash 6 player

Takes any video input supported by QuickTime or Windows Media Player:

QuickTime
MPEG
DV
AVI

Flash turns them into it's own codec, Sorenson Spark

What's A Codec?

CODEC: Compression/DECompression

Tweaky to the max !

To see how important codex are as intellectual property: http://news.zdnet.co.uk/story/0,,t269-s2109473,00.html

Two Compression Types:

Temporal Compression

Time compression, codec examines the difference between a "keyframe" of video and each succeeding frame.

Good candidate for temporal compression:

Most of the frame doesn't change

   

Poor candidate for temporal compression

Most of the frame changes

   

Spatial Compression

Looks for redundant information in areas of a single frame.

Area defined by coordinates, not individual pixels

 

NOTE: The Sorenson Spark codec that ships with Flash MX is optimized for simple videos that take good temporal compression.

Sorenson Media makes Sorenson Squeeze which does better compression, but costs $119.

As With All Things...

Garbage In, Garbage Out

The better quality you start with, the better end product you'll get.

 

Importing Video Into Flash

 

Two Ways:

1. Linked

Only works to export the .fla file to a QuickTime file.

GOTCHA: Must set "Publish Settings" to Flash 5 or earlier, and use Flash 4 scripting syntax.

GOTCHA: No instance names (not available in Flash 4 ActionScript)! Most new coding styles won't work.

HINT: It's useful to switch to Normal mode in the Actions window.

Be sure to Flatten the movie.

Example:

Source

2. Embedded

Large Video Movie Source (40MB) available on Moller:jkhazar: class17

Quality: Controls amount of compression applied to the video clip. 60 is generally the minimum acceptable.

Keyframe Interval: Frequency of keyframes, or frames from which temporal compression is calculated.

Synchronize: Forces video's frame rate to match Flash's frame rate. For example, 15fps video in a 12fps movie drops 3 frames every second from the source video. If not checked, video is forced one video frame to one Flash frame, which will take audio out of synch.

Number of video frame ratio: Matches ratio of video frames (after synchronizing) to number of Flash frames.

Demo

Example of Embedded Interactivity

Source

Just like Linked, but:

You don't have to export to QuickTime

You aren't limited to Flash 4 ActionScripting

Use your MX ActionScript chops!

Strategies for Embedded Video

Flash video doesn't stream, therefore: Break it up!

Use loadMovie(moviename) to load the next movie while the current movie is playing.

.swf files reside in system memory, and end users can run out.

RULE OF THUMB: 1 minute of video = 1MB of filesize

4MB is a fairly safe maximum size

 

Live Video In Flash

 

Live Video Object

Source

Not documented in the Help system.

Two basic commands:

Video(object) docs

Camera(object) docs

Lets see if we can make it work...

 

Links

 

Macromedia Using Embedded Video

Macromedia Tips for Deploying Video

Macromedia Video Strategies

Macromedia Example of Compression

Macromedia Flash 4 and QuickTime

Macromedia Flash TechNotes
About 1/2 way down, section titled "Imported images and Video"

Macromedia TechNote Flash/QuickTime Troubleshooting Tips

Macromedia Local Video Object Demo

Macromedia Local Video Object Docs