What's New in QuickTime 4.1

| Previous | Chapter Contents | Chapter Top | Next |

The export command

The export command can be used in several different ways. For example:

Also, for example, if you need to stream a movie, you can automate the process of exporting a hinted movie using the export command.

export: Export a movie to a file

export reference -- the movie to export

to alias -- the destination file

as AVI/BMP/DV Stream/FLC/hinted movie/image

sequence/picture/QuickTime movie/AIFF/System 7

sound/wave/MuLaw/standard MIDI/text file

-- the desired file type

[using default settings/most recent settings] -- the

export settings to use

[using settings preset string] -- the name of the

export settings preset to use

For example:

tell application "QuickTime Player" activate

-- prompt the user to choose a movie file to open

set this_movie to choose file of type ¬

"MooV" with prompt "Pick a movie to export as hinted:"

-- open the chosen file

open this_movie

-- get the name of the movie

set the movie_name to the name of movie 1

try

-- check to see if the opened movie can be exported

if (can export movie 1 as hinted movie) is true then

-- prompt the user for a name and location

set the new_file to ¬

new file with prompt "Enter a name and choose a¬

location for the new file:" default name ¬

movie_name

-- export the movie as hinted movie

export movie 1 to new_file as hinted movie ¬

with default settings

-- close the movie

close movie 1

else

error "The movie "" & the movie_name & ""¬

cannot be exported as a hinted movie."

end if

on error error_msg

beep

display dialog error_msg buttons {"Cancel"}¬

default button 1

end try

end tell


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |