HTML+TIME: Animation | Internet Development Index |
Introduction to HTML+TIME enables Web authors to animate content on the page by changing the value of particular attributes and properties over time. Without using script, you can animate an element's color; move an element along a specific path or between intervals; cause elements to appear or disappear over time or in response to events; or accelerate, reverse, or loop an animation. Although this animation functionality is available without script, most aspects of Introduction to HTML+TIME are also scriptable.
The following links provide access to the object model exposed by the time2 behavior.
Overviews
Animating with keyTimes and keySplinesUsing the keyTimes and keySplines attributes, you can divide an animation element's simple duration into multiple segments, speed up or slow down the animation at multiple rates during a single duration, and specify values for the animation to reach at particular points in its duration.
Seeking With HTML+TIMEIn HTML+TIME (Timed Interactive Multimedia Extensions) various types of media, animation, and other time elements can be played over a period of time. It is often desirable to be able to jump to any point on this time line. This process of jumping to different points on a time element's time line is called seeking.
Tutorials
Incorporate the time2 BehaviorThis tutorial explains how to incorporate the time2 behavior in your Web pages so you can begin using timelines, multimedia, and animation with HTML elements.
Animation Elements and Objects
animateAnimates a specified attribute of an object.
animateColorChanges the color of an object over time.
animateMotionAnimates the position of an element over time.
currTimeStateContains information about an HTML+TIME timeline.
setSets the value of an object's attribute for a specified duration.
Attributes and Properties
accelerateSets or retrieves a value that applies an acceleration to an element's timeline.
accumulateSets or retrieves a value that indicates whether the animation is cumulative.
activeDurRetrieves the total duration of the timeline.
activeTimeRetrieves the current point in time along the total active timeline, including repeats and time spent in reverse mode.
additiveSets or retrieves a value that indicates whether the animation is additive with other animations.
attributeNameSets or retrieves the name of the element's attribute to be animated.
autoReverseSets or retrieves whether the timeline on an element begins playing in reverse immediately after completing in the forward direction.
beginSets or retrieves the delay time before the timeline begins playing on the element.
bySets or retrieves a relative offset value for an animation.
bySets or retrieves a relative offset value by which to animate a color attribute or property with the t:ANIMATECOLOR element.
calcModeSets or retrieves the interpolation mode for the animation.
calcModeSets or retrieves the interpolation mode for the animateMotion object.
calcModeSets or retrieves the interpolation mode for a t:ANIMATECOLOR element.
decelerateSets or retrieves a value that applies a deceleration to the end of a simple duration.
durSets or retrieves a value indicating the amount of time the element remains active or displayed.
endSets or retrieves a value indicating the end time for the element, or the end of the simple duration when the element is set to repeat.
fillSets or retrieves the action an element takes if its timeline ends before the timeline on its parent element ends.
fromSets or retrieves the starting value of an animation.
fromSets or retrieves the starting value of a color attribute or property animated by t:ANIMATECOLOR.
isActiveRetrieves a value that indicates whether the element is currently active on the timeline.
isOnRetrieves a value that specifies whether the element is active or holding on the timeline in its current state.
isPausedRetrieves a value that specifies whether the element is paused on the timeline.
keySplinesSets or retrieves a set of Bezier control points that define the interval pacing of an animation.
keyTimesSets or retrieves a list of time values used to control the pacing of an animation.
originSets or retrieves the origin of motion for the animation.
parentTimeBeginRetrieves the current element's begin time as an offset from the parent element's begin time.
parentTimeEndRetrieves the current element's end time as an offset from the parent element's begin time.
pathSets or retrieves a set of values that describe a path as a function of time.
progressRetrieves the current progress of the element's timeline.
repeatCountRetrieves the current iteration in the repetition loop.
repeatCountSets or retrieves the number of times an element's timeline repeats.
repeatDurSets or retrieves the number of seconds that an element's timeline repeats.
restartSets or retrieves the conditions under which an element can be restarted on a timeline.
segmentDurRetrieves the duration of an element on a timeline in seconds, including autoReverse.
segmentTimeRetrieves the current point in time along a segment of time.
simpleDurRetrieves the duration of a repeat iteration.
simpleTimeRetrieves an object's current point along its timeline from zero to its dur value.
speedSets or retrieves the playback speed of an element relative to its parent time container.
speedRetrieves the playback speed of an element at run time, which includes the cascading effect of the speed set for the parent time container.
stateRetrieves the current state of the element's timeline.
stateStringRetrieves the current state of the element's timeline.
syncBehaviorSets or retrieves a value that indicates the synchronization rules for the element's timeline.
syncMasterSets or retrieves whether the time container must synchronize playback to this element.
syncToleranceSets or retrieves the time variance allowed on a timeline with locked synchronization.
targetElementSets or retrieves the target element to be animated.
timeActionSets or retrieves what action is taken on the element while the timeline is active.
timeContainerSets or retrieves the type of timeline associated with an element.
timeParentRetrieves the parent time container element of the current element.
toSets or retrieves the ending value of an animation.
toSets or retrieves the ending value of a color attribute or property animated by t:ANIMATECOLOR
valuesSets or retrieves a list of semicolon-separated values of an animation.
valuesSets or retrieves a list of semicolon-delimited RGB color values for a t:ANIMATECOLOR element.
volumeSets or retrieves the volume of the media file.
Methods
activeTimeToParentTimeConverts a value in the element's active timeline to the corresponding point in the parent timeline.
activeTimeToSegmentTimeConverts a value in the element's active timeline to the corresponding point in the segment timeline.
beginElementStarts the element on the timeline.
beginElementAtStarts an element's timeline at the specified time.
documentTimeToParentTimeConverts a value in the document timeline to the corresponding point in the element's parent timeline.
endElementStops the element on the timeline.
endElementAtEnds an element's timeline at the specified time.
parentTimeToActiveTimeConverts a value in the parent timeline to the corresponding point in the element's active timeline.
parentTimeToDocumentTimeConverts a value in the element's parent timeline to the corresponding point in the document timeline.
pauseElementStops playing an element's timeline at the current point.
resetElementRemoves any changes made to the element and returns the element to its original state.
resumeElementRestarts the element's timeline from a paused state.
seekActiveTimeLocates a specified point on the element's active timeline and begins playing from that point.
seekToLocates a specified point on the element's segment timeline, including repetitions, and begins playing from that point.
seekToFrameLocates a specified frame in the object.
segmentTimeToActiveTimeConverts a value in the element's segment timeline to the corresponding point in the element's active timeline.
segmentTimeToSimpleTimeConverts a value in the element's segment timeline to the corresponding point in the element's simple timeline.
simpleTimeToSegmentTimeConverts a value in the element's simple timeline to the corresponding point in the element's segment timeline.
Events
onbeginFires when the timeline starts on an element.
onendFires when the timeline stops on an element.
onmediacompleteFires when the element's associated media finish loading.
onmediaerrorFires when an element's media file causes any error.
onoutofsyncFires when the element loses synchronization with its associated timeline.
onpauseFires when the timeline on an element pauses.
onrepeatFires when the timeline repeats on an element, beginning with the second iteration.
onresetFires when the timeline reaches the value of the BEGIN attribute or when the resetElement method is called on the element.
onresumeFires when an element's timeline resumes from a paused state.
onreverseFires when the timeline on an element begins to play backward.
onseekFires whenever a seek operation is performed on the element.
onsyncrestoredFires when synchronization is resumed between the element and its associated timeline.
ontimeerrorFires whenever a time-specific error occurs, usually as a result of setting a property to an invalid value.