AddTimeMarker Method

Sprite Control

Sets a marker to fire an event when playback reaches the designated time. This method can be used or modified only when the sprite is stopped.

Syntax

HTML<PARAM NAME="AddTimeMarker x" VALUE="time, marker name, [ fAbsolute ]">
ScriptingspriteObj.AddTimeMarker( time, "marker name",
[ fAbsolute ] )

Parameters

x
Sequential integer identifying the time marker, starting at 1 (HTML syntax only). If you are adding more than one time marker through HTML syntax, you must make each AddTimeMarker method call distinct by adding a sequential integer at the end of the AddTimeMarker PARAM name.
time
Time for the onmarker or onplaymarker event to occur.
marker name
Name that identifies the marker, such as MyMark in the example at the end of this section.
fAbsolute
Optional flag that specifies event firing. Default is True. If True (absolute) the event fires at the specified time once and ignores looping. If False (relative) the event fires every time, including in loops. For HTML syntax, use 0 for False and use –1 or nonzero for True. For script, use the predefined constants True and False. For HTML syntax, use zero (False) or nonzero (True); for script use predefined constants True and False.

Remarks

onmarker events occur whether or not the sprite is playing. onplaymarker events occur only when the sprite is playing.

Example

The following examples show how to use this method with the PARAM tag in HTML.

<PARAM NAME="AddTimeMarker1" VALUE="0.0, MyMark, 1">
<PARAM NAME="AddTimeMarker2" VALUE="4.7, FrameFour, 1">
<PARAM NAME="AddTimeMarker3" VALUE="8.0, FrameZero, 1">

Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.