VALUES Attribute | values Property (t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION)

HTML (DHTML)

VALUES Attribute | values Property

Internet Development Index

Sets or retrieves a list of semicolon-separated values of an animation.

Syntax

HTML<ELEMENT VALUES = vValues... >
Scriptingobject.values(val) [ = vValues ]

Possible Values

vValues Variant that specifies or receives a list of semicolon-separated values. The values are applied over the course of the animation in the order they appear. This value can include any of the following length unit designators: px, in, cm, mm, pt, pc. For more information about the supported length units, see CSS Length Units Reference.

The property is read/write. The property has no default value.

Remarks

The animation values must be legal values for the specified attributeName property. The values property overrides any specified to, from, or by values set on the animation.

When writing script to dynamically change the properties of an active animation, developers should consider a couple of issues. Because results might be unpredictable or undefined when you change the properties of an active animation, restart the animation with beginElement after you have made the change. For example:

<SCRIPT>
object.endElement();
object.values="50,50;10,10";
object.beginElement();
</SCRIPT>

For the animate, animateMotion, and animateColor objects, the time2 behavior uses the following model to evaluate which properties to animate.

  • The path property overrides any setting for the values, from, to, or by properties.
  • The values property, if specified, overrides any setting for the from, to, or by properties.
  • The from property is used unless the values or path properties are specified.
  • The to property, if specified, overrides any setting for the by property.
  • The by property doesn't override any properties.
To change an active animation from a path to a values list through script:
<SCRIPT>
object.endElement();
object.path=null;
object.values="100,100;0,0";
object.beginElement();
</SCRIPT>

Standards Information

This property is defined in Synchronized Multimedia Integration Language (SMIL) 2.0 Non-Microsoft link.

Applies To

t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION

See Also

Introduction to HTML+TIME