C H A P T E R 3
Opening and Closing Animation Effects
Another attribute of a view that you can specify is an animation that occurs when
the view is opened or closed on the screen. If an effect is defined for a view, it occurs
whenever the view is sent an
slot to give the view an opening or closing animation.
Alternately, you can perform one-time effects on a view by sending it one of these
methods are described in "Animating Views" (page 3-40).
slot specifies an animation that occurs when a view is shown or
hidden. If this slot is not present, the view will not animate at these times. There
are several predefined animation types. You can also create a custom effect using a
flags from Table 2-7 (page 2-86) in Newton
Programmer's Reference. To use one of the predefined animation types, specify the
number of animation steps, the time per step, and the animation type, with the
In x specify the number of steps you want, from 1 to 15.
In x specify the number of ticks that you want each step to
take, from zero to 15 (there are 60 ticks per second).
Specify one of the following values to select the type of animation effect desired:
--reveals a view using a checkerboard effect, where
adjoining squares move in opposite (up and down) directions.
--reveals a view from center towards left and right
edges, like a barn door opening where the view is the inside of the barn.
--reveals a view from left and right edges towards
the center, like a barn door closing where the view is painted on the doors.
--reveals a view so that it appears behind
venetian blinds that open.
--changes the size of an invisible "aperture" covering the
view, revealing an ever-increasing portion of the full-size view as the aperture
, except that it decreases
the size of an invisible "aperture" covering the view, as the aperture closes.
--reveals a view as it slides down from its top boundary.
--reveals a view as it slides up from its bottom boundary.
--expands the image of the view from a point in the
center until it fills the screen; that is, the entire view appears to grow from a
point in the center of the screen.