What's New in QuickTime 4.1
| Previous | Chapter Contents | Chapter Top | Next |
The movie class is the central class in the QuickTime Player Suite. Most of the QuickTime Player suite events target a movie, including play, stop, save, export, and find. Tracks, files, internet locations, windows, and annotations are all parts of a movie.
This class provides access to many useful properties of a movie, such as name, current time, duration, volume, selection, and dimensions. Many of these properties can be set, such as current time, selection, volume, and dimension.
Class movie: A QuickTime movie.
track by numeric index, by name
file by numeric index, by name
internet location by numeric index
window by numeric index, by name
annotation by numeric index, by name
-- the current time (can be set by name as well as
-- the start of the movie selection
-- the end of the movie selection
-- the rate at which the movie is currently playing
-- will the movie automatically start playing?
-- the sound volume of the movie. [0..384], where 256 is 100 percent. Note that a range of 0 to 150 percent is supported.
-- the current dimensions of the movie, not including the
natural dimensions point [r/o]
-- the dimensions the movie has when it is not scaled
-- keep playing the movie in a loop?
-- whether to play the selection only?
-- play every frame? (no audio will play)
scale half/normal/double/screen/current
-- the current scale of the movie
-- the time of the poster frame for the movie
-- the time scale of the movie
-- close the movie when it is done playing
-- quit the application when this movie is done playing?
-- has the document been modified since the last save?
language international text [r/o]
-- the current language of the movie
Some examples of how you would use various properties of the movie class:
-- get current time of movie --
set x to current time of movie 1
x / 600 -- in seconds if 600 is movie time scale
set x to duration of first movie
-- get movie rate -- (movie has to be playing)
-- get playing of movie (is movie playing?) --
-- set the playing of movie --
set playing of movie 1 to true
-- get movie data size (in kbytes)
set x to movie data size of front movie
-- get/set movie dimensions --
set dimensions of movie 1 to {320,240}
set looping of movie 1 to true
set palindrome of movie 1 to true
-- set 'Play Selection only' of movie --
set play selection only of movie 1 to true
-- set 'Play all frames' of movie --
set play all frames of movie 1 to true
set scale of movie 1 to double (half, screen)
-- get/set poster frame of movie --
set poster frame of movie 1 to 88
tell first movie to select at 422 duration 800
tell first movie to select all
-- has movie been modified? --
| Previous | Chapter Contents | Chapter Top | Next |