Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |

Targeting Elements of Embedded Movies with All Existing Wired Actions

All existing wired actions may now be performed on elements of embedded movies, and wired action handlers inside of embedded movies may perform actions on elements of their parent movie.

To understand this new targeting hierarchy, we can look at the current runtime state of a movie as a tree, as shown in the example in Figure 4. The root of this tree is the root movie itself. The children of the root movie node are tracks. Some types of tracks, such as the sprite track, can contain child nodes that are sprites. In QuickTime 4 and earlier, this was as deep as the tree ever got, but now with the introduction of the movie track, the tree can be indefinitely deep. The movie track node has child track nodes based on its currently loaded movie; one or more of these tracks may be yet another movie track.

Take, for example, a movie containing a Flash track and a movie track. The movie track's currently loaded movie contains a video track, an audio track, and a sprite track with two sprites. This comprises the target hierarchy tree shown in Figure 4.

Figure 4 An example of the new targeting hierarchy tree

Conceptually, you may think of the movie track and its currently loaded movie as a single entity -- i.e., a movie track. A movie track such as Child Movie in this example may be the target of both track and movie actions. When specifying a target for an action, we first specify the movie (or movie track) that is the target or that contains the target. Then, we can further specify a track and track object if needed.

Before QuickTime 4.1, you could specify external movies by name or ID. New procedures for specifying a movie within a hierarchical movie have been added, including:

These targets are relative to the current movie that contains the action handler. A few examples may help clarify how to target various elements.

Example 1: Sprite 1 has an action handler on a mouse click that tells Root Movie to play.

Since Sprite 1 is contained in Child Movie, the movie target is specified relative to Child Movie. This may be accomplished using Parent Movie or Root Movie.

Example 2: Sprite 2 has an action handler that tells the Flash Track to pan left.

Again, the target is relative to Child Movie, so you can use either Parent Movie or Root Movie to specify the root movie. Additionally, you specify the Flash track.

Example 3: A button in Flash Track contains a mouse click handler that sets the volume of the audio track in Child Movie. In this example, Flash Track is contained in Root Movie, so the movie target is specified relative to Root Movie. You can use any of the Child Movie target types to specify Child Movie. You can specify that the target is the audio track.


© 2000 Apple Computer, Inc.

Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |