read

Cause and effect

This example shows a series of events that causes a movie to start playing. 

First, when you click on the message read blading.mov or read, the message is sent to the object jit.qt.move, which then reports read <movie_name> 1 from the right outlet if successful. 

Autostart

The object loadbang sends a bang when a patcher is opened. This object is very useful if you want to automate the start of some objects or messages in your patch. In this example, the movie starts automatically by sending loadbang to read the movie file and the toggle when the patch is loaded. 

Display randomly chosen frames of a movie

When you open a movie file in jit.movie with a read message, the exact amount of time that that operation will take is unknowable, but jit.movie will send a read message out of its right outlet when the file-opening operation has been completed. When you read in a file, you should generally wait for that message to come out before proceeding. In that message, the word read is followed by the name of the file, followed by a success indicator, 1 or 0.