Multimedia Guide and Reference


Connecting the parts

As you know, you add function to your application by making connections between the parts. To play a movie, you need to make a few connections to the digital video player:

  1. To open the digital video player, connect the aboutToOpenWidget event of the window to the open action of the player.
  2. To set what file to play, connect the clicked event of the hotspot to the fileToLoad attribute of the digital video player.

    Notice that you get a dotted line. A dotted line connection means that the connection is expecting a parameter that hasn't been set yet. To set the parameter, open up the connection's settings and click on the Set parameters push button. In the value entry field, type in tiger.avi. If the movie is not in the current VisualAge directory, be sure to include the path information.

  3. To actually play the video, connect the clicked event of the hotspot to the play action of the digital video player.
  4. The last thing that needs to be done is to close the player. To do this, connect the aboutToCloseWidget event of the window to the close action of the digital video player.

The free-form surface should now look as follows:
Free-form surface

Finally, save and test your work.

OS/2 icon
On a 750 system in OS/2, you might find that running the video suspends processing.


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