accelerate property

Sets or gets a value that applies an acceleration to an element timeline.

Syntax

JScript
object.accelerate = iPercent
iPercent = object.accelerate

 

Property values

Type: Integer

A floating-point number that specifies a value between 0 and 1, which represents the portion of the timeline over which the acceleration is applied. The timeline refers to the timeline associated with a particular HTML element, such as a div or a span, instead of the timeline associated with the entire document.

Remarks

If the REPEATCOUNT attribute or the REPEATDUR attribute is set on an element, the acceleration occurs each time the element repeats.

The ACCELERATE attribute is well-suited to animation content and behaviors. Setting this attribute to a nonzero value does not affect the duration of the timeline.

The sum of the values for the ACCELERATE attribute and the DECELERATE attribute must not exceed 1. If the individual values of the ACCELERATE attribute and the DECELERATE attribute are between 0 and 1, and the sum of the attributes is greater than 1; then both attributes are ignored, and the timed element behaves as if neither attribute was specified.

This property is also called "ease-in" in some systems.

Examples

This example uses the accelerate element to demonstrate an accelerated element timeline.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/accelerate.htm


<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>accelerate Property</TITLE>
<STYLE>
    .time { behavior: url(#default#time2) }
</STYLE>

<?IMPORT namespace="t" implementation="#default#time2">
</HEAD>

<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="fixed" BGCOLOR="#FFFFFF"
    LINK="#000000" VLINK="#808080" ALINK="#000000">

<DIV ID="oDIV" CLASS="time" STYLE="position:absolute;top:75px;left:25px;
    height:50px;width:100px;background-color:yellow;text-align:center;
    font-color:black;font-size:large">Accelerating DIV
</DIV>

<t:ANIMATE targetElement="oDIV" attributeName="left" to="400" dur="3" accelerate="1"
    repeatCount="3"/>

</BODY>
</HTML>

See also

transitionFilter
animate
animateColor
animateMotion
animation
audio
excl
img
media
par
ref
seq
time2
video
Reference
decelerate
Conceptual
Introduction to HTML+TIME

 

 

Show: