The Path control is a windowless Microsoft® DirectAnimation® control that animates the position of other controls along a defined vector or spline shape-based path. To use the Path control, you must first instantiate it on the HTML page.
See the appropriate topic for syntax details.
This topic contains a list of the Path control properties and the HTML and scripting syntax for them.
Syntax
HTML <OBJECT ID=pathObj CLASSID="CLSID:D7A7D7C3-D47F-11d0-89D3-00A0C90833E6"> <PARAM NAME="PropertyName" VALUE="Value"> </OBJECT> Scripting pathObj.PropertyName=Value
Possible Values
- pathObj
- String identifying the Path control object.
- PropertyName
- One of the Path control properties in the following table.
- Value
- Valid value for the PropertyName property.
Property | Description |
---|---|
AutoStart | Determines whether the Path control starts playback upon loading. |
Bounce | Sets the path behavior to either reverse direction and return to the beginning, or stop at the end of its playback. |
Direction | Sets the direction of the path playback. |
Duration | Sets the duration of the path playback. |
Library | Retrieves the DirectAnimation library reference. |
PlayState | Retrieves the path's current playback state. Can be used from Script only. |
Relative | Determines whether the Path control starts playing from its current position or from the absolute position in the target object's coordinate space. |
Repeat | Sets the number of times the path loops during playback. |
Target | Sets the object that will follow the path. |
Time | Retrieves the elapsed playback time from the start of the path. Can be used from Script only. |
TimerInterval | Sets or retrieves the length of time, in seconds.milliseconds, between path updates. |
This topic contains a list of the Path control methods and the HTML and scripting syntax for them.
Syntax
HTML <OBJECT ID=pathObj CLASSID="CLSID:D7A7D7C3-D47F-11d0-89D3-00A0C90833E6"> <PARAM NAME="MethodName" VALUE="Parameters"> </OBJECT> Scripting pathObj.MethodName(Parameters)
Possible Values
- pathObj
- String identifying the Path control object.
- MethodName
- One of the Path control methods in the following table.
- Parameters
- Valid parameters for the MethodName method. These parameters are separated by commas, as shown in the following HTML example.
<PARAM NAME="AddTimeMarker1" VALUE="0.0, First, 0"> <PARAM NAME="AddTimeMarker2" VALUE="9.0, Fourth, 0">
Method | Description |
---|---|
AddTimeMarker | Sets a marker to fire an event when playback reaches the marker position. |
KeyFrame | Specifies points along the path, in x- and y-coordinates, and a designated time to reach each point. |
Oval | Specifies an oval structured graphics primitive to be used as the path, with starting point at top center (12 o'clock). |
Pause | Stops playback and maintains current elapsed time. |
Play | Begins playback from the current elapsed time. |
Polygon | Specifies a closed series of line segments to use as the path. |
PolyLine | Specifies an open set of line segments to use as the path. |
Rect | Specifies a rectangular structured graphics primitive to use as the path, with starting point at top left. |
Seek | Resets the current playback position to a new, specified position. |
Spline | Specifies a spline to be used as the path. |
Stop | Stops playback at current elapsed time and returns path to the beginning. |
This topic lists the Path control events.
Syntax
Scripting <SCRIPT LANGUAGE="JavaScript" FOR=pathObj EVENT=event
( parameters ) >
<!--script-->
</SCRIPT>
Possible Values
- pathObj
- String identifying the Path control object.
- event
- One of the Path control events in the following table.
- Parameters
- Valid parameters for the event.
Note that <!--script--> in the preceding syntax and in the syntax for each event is the script executed if the event occurs.
Event | Description |
---|---|
onmarker | Occurs when the path playback reaches a marker at the specified playback position, either when the Path control is playing or when it is stopped (and reaches the marker through a Seek call, for example). |
onpause | Occurs when path playback pauses. |
onplay | Occurs when the Path control plays back. |
onplaymarker | Occurs when path playback reaches a marker at the specified playback position. |
onseek | Occurs when the Path control completes a Seek call. |
onstop | Occurs when path playback stops. |
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.