AddTimeMarker Method

Path Control

Adds marker at specified playback position, enabling author to generate an event when that playback position is reached. This method can be used or modified only when the path is stopped.

Syntax

HTML<PARAM NAME="AddTimeMarkerX" VALUE="time, markername,
[ 0 | -1 ]">
ScriptingpathObj.AddTimeMarker ( time, "markername", [fAbsolute] )

Parameters

X
Sequential integer identifying the time marker, starting at 1 (PARAM tag syntax only). If you are adding more than one time marker through PARAM tag syntax, you must make each AddTimeMarker method call distinct by adding an sequential integer at the end of the AddTimeMarker PARAM name.
time
Time at which the onmarker or onplaymarker event fires.
markername
Name of the marker.
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 PARAM tag syntax, use 0 for False and use ­1 or nonzero for True. For script, use the predefined constants True and False.

Remarks

The onmarker event occurs whenever the path is at the specified marker, whether or not the path is playing. The onplaymarker event occurs only when the path is playing.

Example

The following example sets three time markers named MyMark, FrameFour, and FrameZero at 0.0, 4.7, and 8.0 respectively. MyMark and FrameZero are set to occur every time the path reaches that time marker, and FrameFour is set to occur only the first time the path reaches that time marker during uninterrupted playback.

<PARAM name="AddTimeMarker1" value="0.0, MyMark, 0">
<PARAM name="AddTimeMarker2" value="4.7, FrameFour, -1">
<PARAM name="AddTimeMarker3" value="8.0, FrameZero, 0">

AddFrameMarker Method example

Right-click inside the frame and select View Source to see the HTML code for this example.


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