Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |

New Wired QT Event

kQTEventMovieLoaded event has been added to QuickTime 4.1.

This event is sent when an embedded movie is loaded. Embedded movies may be loaded when a movie containing an embedded movie is first opened, when an embedded movie loads a new sample due to the movie's time changing, or when an embedded movie is sent a kActionMovieTrackLoadChildMovie action.

Action handlers for the kQTEventMovieLoaded event may reside in two places. They may be placed in a sample of a movie track's media or placed in the movie property atom of a movie that is loaded into a movie track.

If handlers exist in both places, the action list from the sample is appended to the one from the movie property atom. This means that the actions from the sample will be executed second, and if the same action resides in both places for the same target, the effect of the action from the sample will persist.

To add an event handler to a movie media sample, you add an atom of type kQTEventMovieLoaded to the sample, with child atoms defining the actions.

To add an event handler to a child movie that is to be loaded, you add an atom of type kQTEventMovieLoaded to the child movie's movie property atom using the new QuickTime Movie Toolbox routine SetMoviePropertyAtom. You may use the GetMoviePropertyAtom function to first retrieve the existing movie properties container, add or modify the kQTEventMovieLoaded atom, and then write it back using the SetMoviePropertyAtom function.


© 2000 Apple Computer, Inc.

Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |