Concept
Like last year's Turismo project, this demo explores the combination of Flash and QuickTime video, which was until recently the only video format Flash would accept.
In both cases I've dropped into a Flash movie a short QuickTime animation generated with Bryce. In Flash I've constructed layers containing control buttons, animated text ("Turismo"), and animated graphics ("Sleeper"). The "Sleeper" movie also adds an interesting twist: the animations are separate movies loaded into Level 1, the level immediately above the main level. Each movie runs its own 30-second timeline while the main movie (both Flash and QuickTime) remain paused.
Flash and QuickTime
If you use QuickTime video within a Flash movie, you must export the object file not as Shockwave/Flash (.swf) but as QuickTime (.mov). The associated Web page must be written accordingly, using a type attribute of "video/quicktime" in the EMBED and OBJECT tags.
Architecture
The main object movie for "Sleeper" (sleeperDemo.fla) contains three layers.
The bottom layer holds the QuickTime movie, which I imported into the first frame. Once imported, each frame of the QuickTime movie corresponds to a frame in the Flash timeline. I added 84 more frames to accommodate the 85-frame QuickTime movie. For convenience I am using the same frame rate (12 fps) in both Flash and QuickTime. This lets me match up keyframes with minimal fuss.
We'll skip the middle layer for the moment, but will return to it shortly.
The third and topmost layer of the main movie holds a series of keyframes, each keyframe containing two buttons. Each buttons is scripted with a simple goto action: the lefthand buttons go to and stop on the previous keyframe; the righthand buttons go to and play the next frame after the present keyframe. These actions advance the movie (which is stopped by actions yet to be explained) or send it back to an earlier point.
If you look at the source file, you'll see that these goto statements refer to particular frames by number, rather than using the more efficient _root._currentFrame property. That property is not available in this case because the Flash movie is exported as QuickTime, and QuickTime doesn't support all of Flash's data structures. Presumably this problem is addressed by Flash MX.
Now for that neglected middle layer.
The middle layer is reserved for frame actions. The most crucial of these is a stop() action occurring on each of seven keyframes, corresponding to the points at which the camera movement stops and characters dissolve in. This effect offers one of the most powerful reasons for combining QuickTime and Flash: by controlling the Flash timeline, interactive devices such as buttons can also control the video playback. Note that these controls can also be used to jump across the sequence of the video, raising possibilities for non-linear presentation.
In addition to the stop() action, the scripted frames aligned with video keyframes also contain loadMovie() commands. These commands load one of seven movies, each containing a simple alpha dissolve that lays the image of a character over the current view. These movies are loaded into Level 1, immediately above the main movie. Because their backgrounds are blank, the lower layer shows through. Note that the timeline of the dissolve is independent of the main movie timeline, which is halted by the stop() statement. This is a very useful effect, nicely supported by both Flash and QuickTime.
The next frame after each stop/loadMovie frame is also scripted. It contains the simple command unloadMovie(1), which removes the movie loaded in Level 1. This frame is accessed only when the viewer clicks the righthand button to advance the video, so the character blinks out when the video tour resumes.
Applications?
So what is this technique good for? If you're not in the market for pseudo-surrealist interactive video, consider how you might integrate character animation with real video to do guided tours, product presentations, or process analyses.
Source files
The source files for the "Sleeper" project can be found in MMShare/sleeper/ on Crow; the source files for "Turismo" are in MMShare/workshop/turismo/. You'll find the QuickTime video sources as well as the Flash sources. The video content is built into the object (.mov) file, but must be stored separately during the editing process.
