Important: The information in this document is obsolete and should not be used for new development.
QuickTime 6 includes several new and updated components related to Macromedia Flash support in QuickTime. The Flash media handler and the Flash movie importer have been updated, and a new Flash Properties panel has been added to the QuickTime Player info panels.
New Flash Media Handler
Flash Movie Importer
New Flash Properties Info Panel
Controlling Mouse Capturing Setting
The new Flash media handler supports Macromedia Flash files (also known as SWF files) that conform to Flash 5 versions and earlier of the SWF specification. (Previous releases of QuickTime supported files that conformed to Flash 4 and earlier.) You should refer to Macromedia’s documentation for a complete listing of the features added to Flash 5. The most significant additions include
greatly expanded ActionScript capabilities
HTML text rendering
XML data exchange
All these features work properly under the new Flash media handler––with a few limitations. (Refer to the QuickTime 6 Release Notes, which specify those limitations.)
SWF files opened by QuickTime-savvy applications are converted to QuickTime movie files by the Flash movie importer, discussed in the next section. These movie files consist of a single Flash track, whose media data is simply the data in the original SWF file. Virtually all of these movie files play back in QuickTime Player, in other QuickTime-savvy applications, or in the QuickTime browser plug-in exactly as if the original SWF file had been opened using the Flash Player application or the Flash browser plug-in.
The new Flash movie importer is “smarter” than the previous
importer in several ways. The principal change is that the new importer
scans some or all of the Flash file being imported to try to determine
whether the file is set to automatically start playing when it is
opened. (Previous importers assumed that all imported SWF files
should be autoplayed.) Several other settings are unchanged from
earlier versions of the Flash importer: the play-all-frames option
is set to TRUE and the
looping flag is set to FALSE.
Flash tracks can be combined with other kinds of tracks in a QuickTime movie file. This is especially useful when using controls in the Flash track (buttons, sliders, etc.) to control the playback and settings of other tracks (video tracks, sound tracks, VR tracks, etc.)
In this situation, the content author needs to be aware of a new consideration that did not arise in earlier versions of the Flash media handler: version 5 ActionScripts can read the position of the cursor and/or the state of the mouse button at any time. This means that some ActionScripts may respond to mouse button clicks even if those clicks do not occur on some interactive element in the Flash track. If the Flash media handler accepts and processes all clicks in the track rectangle, then those clicks cannot be passed to tracks layered behind the Flash track. This effectively prevents the user from interacting with sprite tracks and QuickTime VR tracks layered behind the Flash track.
The new Flash media handler allows a movie author to decide on a per-track basis whether all mouse button clicks are accepted and handled by that particular instance of the Flash track or whether clicks that are not on an interactive element in the track are passed to tracks layered behind it. The setting for a specific Flash track can be adjusted using the new “Flash Properties” info panel in QuickTime Player, shown in Figure 1-10.
This panel contains a single check box labeled “Mouse Capture Enabled”. If the box is checked, then all mouse clicks are directed to the Flash track (unless some track in front of the Flash track processes the click); if the box is unchecked, only mouse button clicks on interactive elements in the Flash track are processed.
Figure 1-10 The Flash Properties info panel in Mac OS X in QuickTime Player with Mouse Capture Enabled box checked

When a Flash file is imported as a movie with a single Flash track, mouse-capturing is enabled for that track. If you combine that track with other tracks, you may need to adjust the mouse capture setting to achieve the proper user experience.
The mouse capture setting of a Flash track is stored in the media properties atom of the track.
The Movies.h header
file contains the constant kFlashTrackPropertyAcceptAllClicks to
identify the atom type; the atom data is a Boolean value, where TRUE means
to accept all mouse button clicks and FALSE means
to accept only those mouse button clicks on an interactive element in
the Flash track.
The following snippet of code sets a Flash track to accept all clicks:
QTAtomContainer trackProperties = NULL; |
Boolean acceptAllClicks = true; |
GetMediaPropertyAtom(flashMedia, &trackProperties); |
if (trackProperties != NULL) { |
QTInsertChild(trackProperties, 0, |
kFlashTrackPropertyAcceptAllClicks, 1, 1, |
sizeof(acceptAllClicks), &acceptAllClicks, nil); |
SetMediaPropertyAtom(flashMedia, trackProperties); |
QTDisposeAtomContainer(trackProperties); |
} |
Last updated: 2002-07-01