Multimedia Guide and Reference


Adding parts for playing video

The application you make in this chapter uses several parts that play video or that allow you to regulate the playing of video.

Begin by creating a new application. Add to it a visual part named MyTahitiVideoView. In the Composition Editor that opens, change the title of the Window part to Tahiti video.

Select Digital video player icon, the digital video player, and place it on the free-form surface. This represents the device that plays digital video files.

To play and stop this video, add the motion buttons, Motion Buttons icon.

Since the video is to be displayed in the scene, add mtvpb, the video playback window to the scene. Open the video playback window's settings and set the recomputeSize property to false so the video scales to fit the window.

There are many different ways to specify what video file to play. One way would be to store it in a database along with the package name. Then, when a particular package for Tahiti is selected, you would know what video file to play. To simplify things, you are going to hardcode the video file using a label part. Select the label and add it to the nonvisual part of the free-form surface. Set its object property to tahiti.avi, including any path information if the video file is not in the current directory.

Your Composition Editor window should resemble:
Tahiti parts


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]