Events
Each layer has a timeline associated with it and on each step of the timeline there can be
a single event which can be one of:
- No event
- A 'show' event
- A 'hide' event
- A 'move' event
- A 'pause' event
Note: By default a layer is inactive and invisible and a layer without events doesn't do anything.
The 'show' event
This event causes the layer to become active. In the case of a sound the sound is played.
In the case of softbuttons, the softbutton text is displayed. In the case of a draw layer with objects, the
layer becomes visible with the offset specified by the show event. The offset is the position
of the layer when the 'show' event is marked on the timeline. The layer does not
have to be hidden for the 'show' event to be used. The 'show' can simply say that you
want the layer to now appear with a different offset so the layer is simply moved from
one position to another. By default the layer offset is (0,0) and the layer is invisible.
The 'show' event also has the effect of creating a starting point in time for a
following 'move' event. This can be useful if you need a pause between two 'move' events.
The 'hide' event
The 'hide' event does not have a offset associated with it. It simply marks a point when
the layer should not appear. Only a 'show' will cause the layer to appear again. It is recommended to
hide any layers if they are not being used any more in a movie as this can help increase movie speed by
making sure the player doesn't try to paint them.
The 'move' event
The 'move' event has a layer offset associated with it and marks a point on the timeline
so that the layer should have moved smoothly to that point from wherever it was previously.
The previous position before the 'move' event might be marked by a 'show' or another
'move' event. If there is no previous event then the implied 'show' at time 0 is taken
as the previous event.
The 'pause' event
A pause event can be of two types
- A pause for a given number of frames
- An indefinate pause. In other words a suspend.
A pause event causes all layers to pause for a given number of steps. Adding or deleting
a pause for one timeline will do the same for all timelines. This is useful in
cutting down the visual length of the timeline when using the editor.
An indefinate pause or suspend event is important when used in conjunction with a hotspot layer or softbutton action layer.
After displaying a number of hotspot layers or enabling a softbutton, the pause event can be
used to halt the movie so the user can take their time in making a selection (it is not necessary to suspend but
can be helpful). In the case of hotspot layers the user can use the arrow keys of a phone to
tab through the menu options before hitting the 'select' button.
Note that a pause event never takes
up more than 3 bytes in the final runnable movie no matter how many timelines you have. Also note that if a pause
appears before a move event then the pause event is taken as the starting time of the move.