simpleTimeToSegmentTime method
Converts a value in the element's simple timeline to the corresponding point in the element's segment timeline.
Syntax
*object.*simpleTimeToSegmentTime(simpleTime)
Parameters
simpleTime [in]
Type: doubleAn Integer that specifies a point on the element's simple timeline.
Return value
Type: Integer
An Integer that specifies the point in the segment timeline that corresponds to simpleTime.
Examples
This example uses the simpleTimeToSegmentTime method to compare the value of the element's simple timeline to the corresponding point in the element's segment timeline.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/simpleTimeToSegmentTime.htm
<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>simpleTimeToSegmentTime Method</TITLE>
<?IMPORT namespace="t" implementation="#default#time2">
<SCRIPT>
window.onload = fnOnLoad;
function fnOnLoad()
{
// Set up a timer to watch the time values.
window.setInterval(fnUpdateTimes, 100);
}
function fnUpdateTimes()
{
s1.innerHTML = " simpleTimeToSegmentTime: " +
(a1.simpleTimeToSegmentTime(div1.currTimeState.activeTime));
s2.innerHTML = " segmentTime: " +
(a1.currTimeState.segmentTime);}
</SCRIPT>
<STYLE>
.time{behavior: url(#default#time2);}
</STYLE>
</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
LINK="#000000" VLINK="#808080" ALINK="#000000">
<B>Timer:</B>
<SPAN id="Timer1" class="time" dur="1" repeatCount="indefinite"
onrepeat="innerText=parseInt(document.body.currTimeState.activeTime);">
0</SPAN>
<DIV ID="div1" CLASS="time" STYLE="position:relative;top:25px;left:25px;
height:100px;width:100;background-color:yellow;"></DIV>
<t:ANIMATEMOTION ID="a1" targetElement="div1" to="250,0" dur="3"
autoReverse="true" repeatCount="indefinite"/>
<SPAN id="s1" style="position:relative;top:40px;">simpleTimeToSegmentTime:</SPAN>
<BR>
<SPAN id="s2" style="position:relative;top:40px;">segmentTime:</SPAN>
<BR>
</BODY>
</HTML>
See also
Reference
Conceptual