Media Items (Movie & Audio Clips)

Documents created by any of the iWork applications, Pages, Numbers, or Numbers, can incorporate a common set of elements, including images, shapes, lines, tables, charts, movies, and audio clips. To AppleScript and the built-in scripting support of the iWork applications, these elements are considered iWork Items, and share a common set of properties, detailed in the iWork Item class from the iWork Suite:

The iWork Suite iWork item Class

iWork item  [inh. iWork item ] : An item which supports formatting.

elements

contained by slides, document.

properties

heightinteger ) : The height of the iWork item.

lockedboolean ) : Whether the object is locked.

parentiWork container r/o ) : The iWork container containing this iWork item.

positionpoint ) : The horizontal and vertical coordinates of the top left point of the iWork item.

widthinteger ) : The width of the iWork item.

responds to

delete, exists

The properties in the iWork item class can be accessed and changed for any of the common iWork elements. For example, a script can get or set the position of a movie, or image, or shape, or any of the common elements.

In addition to sharing a common set of properties with the other iWork elements, each iWork element has its own set of properties, particular to that element. For example, the element-specific properties of an audio clip are detailed in its dictionary listing, found in the iWork Suite:  (⬇ see below ) 

The iWork Suite audio clip Class

audio clip  [inh. iWork item ] : An audio clip

elements

contained by slides, document.

properties

clip volumeinteger ) : The volume setting for the audio clip, from 0 (none) to 100 (full volume).

file nametext r/o) : The name of the audio file.

repetition methodnone/‌loop/‌loop back and forth ) : If or how the audio clip repeats.

responds to

delete, exists

NOTE: In the current version of Numbers the audio clip class does not support the use of the make command. See the documentation (linked in sidebar) for details on how to import an audio clip.

The element-specific properties of a movie are detailed in its dictionary listing, found in the iWork Suite:  (⬇ see below ) 

The iWork Suite movie Class

movie  [inh. iWork item ] : A movie on a slide in a document.

elements

contained by slides, document.

properties

file nametext r/o) : The name of the movie file.

movie volumeinteger ) : The volume setting for the movie, from 0 (none) to 100 (full volume).

opacityinteger ) : The opacity of the object, in percent.

reflection showingboolean ) : Is the movie displaying a reflection?

reflection valueinteger ) : The percentage of reflection of the movie, from 0 (none) to 100 (full).

repetition methodnone/‌loop/‌loop back and forth ) : If or how the audio clip repeats.

rotationinteger ) : The rotation of the iWork item, in degrees from 0 to 359.

responds to

delete, exists

NOTE: In the current version of Numbers the movie class does not support the use of the make command. See the documentation (linked in sidebar) for details on how to import a movie.

The pages in this topic explore how to create and manipulate the iWork media items: movie and audio clip.

TOP | CONTINUE