13.07.2015 Views

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Some Useful Examples and ScenariosAdding Wired Actions To a Flash Track●kTargetChildMovieMovieID. A child movie specified by the currently loaded movie’s movie ID. Thechild movie must contain movieID user data with the specified ID.Adding Wired Actions To a Flash TrackThis section explains the steps you need to follow in order to add wired actions to a Macromedia Flash track.The Flash media handler was introduced in QuickTime 4 to enable a SWF 3.0 file to be treated as a track withina QuickTime movie. See “Flash Media” (page 234) for more information about the Flash media handler.Sample code (AddFlashActions) is provided on the QuickTime SDK, as well as on the QuickTime developerwebsite, that lets you add wired actions to a Flash track.Note For more detailed information about working with Flash, you can download the MacromediaSWF <strong>File</strong> <strong>Format</strong> Specification at http://www.macromedia.com/software/flash/open/spec/,along with the SWF <strong>File</strong> Parser code also at the Macromedia website.Extending the SWF <strong>Format</strong>QuickTime 4 extends the SWF file format to allow the execution of any of its wired actions, in addition to themuch smaller set of Flash actions. For example, you may use a SWF file as a user interface element in a QuickTimemovie, controlling properties of the movie and other tracks. QuickTime also allows SWF files to be compressedusing the zlib data compressor. This can significantly lower the bandwidth required when downloading a SWFfile when it is in a QuickTime movie.By using wired actions within a Flash track, compressing your Flash tracks, and combining Flash tracks withother types of QuickTime media, you can create compact and sophisticated multimedia content.The SWF <strong>File</strong> <strong>Format</strong> Specification consists of a header followed by a series of tagged data blocks. The typesof tagged data blocks you need to use are the DefineButton2 and DoAction. The DefineButton2 blockallows Flash actions to be associated with a mouse state transition. DoAction allows actions to be executedwhen the tag is encountered. These are analogous to mouse-related QT event handlers and the frame loadedevent in wired movies.Flash actions are stored in an action record. Each Flash action has its own tag, such as ActionPlay andActionNextFrame. QuickTime defines one new tag: QuickTimeActions, which is 0xAA. The data for theQuickTime actions tag is simply a QT atom container with the QuickTime wired actions to execute in it.There are also fields you need to change in order to add wired actions to a SWF file. Additionally, there is onetag missing from the SWF file format that is described below.<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.347

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!