soundFile = f;
// prepare a dialog to display while playing
JOptionPane pane = new JOptionPane ("Playing " + f.getName(),
JOptionPane.PLAIN_MESSAGE);
playingDialog = pane.createDialog (null, "QTJ Sound");
playingDialog.pack();
// get and play sound
QTSession.open();
QTFile qtf = new QTFile (f);
OpenMovieFile omf = OpenMovieFile.asRead (qtf);
movie = Movie.fromFile (omf);
MyDemoCloser closer = new MyDemoCloser (movie);
TaskAllMovies.addMovieAndStart ();
movie.start();
playingDialog.setVisible(true);