t:TIMEACTION Attribute | timeAction Property(deprecated) (t:AUDIO, t:IMG, t:MEDIA, ...)

HTML (DHTML)

t:TIMEACTION Attribute | timeAction Property?deprecated)

Internet Development Index

This page documents a feature of HTML+TIME 1.0, which was released in Microsoft?Internet Explorer 5. We recommend that you migrate your content to the latest version of HTML+TIME, which implements the SMIL 2.0 Working Draft. See the Introduction to HTML+TIME overview for more information.

Sets or retrieves what action is taken on the element while the timeline is active.

Syntax

XML<ELEMENT t:TIMEACTION = sAction... >
Scriptingobject.timeAction [ = sAction ]

Possible Values

sActionString that specifies or receives one of the following values.
class:classname1 [classname2 ...]The specified classname is applied to the element while it is active on the timeline and removed while the element is inactive. The class value is available as of Microsoft?Internet Explorer 5.5.
displayElement displays when the timeline is active and disappears when the timeline is inactive. As the element changes between active and inactive states, the surrounding HTML elements dynamically reflow within the page.
noneElement takes no action. This is useful for time grouping when the parent element should not do anything in response to timing. Media will still play when timeAction is set to none.
onOffElement's on property toggles between true and false over time. The onOff value is invalid if no on property exists for the element, which may produce undesirable results.
styleElement displays with the inline style when the timeline is active, and displays without the inline style when the timeline is inactive. If no inline style is defined for this element, nothing happens.
visibilityDefault. Element's visibility property displays the element when the timeline is active, and makes the element disappear when the timeline is inactive. The surrounding HTML elements do not reflow as a result of the local element changing between active and inactive states.

The property is read/write. The property has a default value of visibility.

Remarks

The default value of the timeAction property depends on the element using it. When this property is used on the body element, the default value is none. When it is used on the t:SEQ element, the default value is display. For all other elements, the default value is visibility.

If you specify a CLASS attribute for the timeAction property that is already present on the element, that class will be removed whenever the element is not active on the timeline. In the following example, the redText class is applied only while the span is active on the timeline; however, the boldFont class is always applied to the span.

<SPAN CLASS="redText boldFont" STYLE="behavior:url(#default#time2)"
BEGIN="5" TIMEACTION="class:redText">The text is red
only while this element is active on the timeline.
</SPAN>

To specify multiple classes for the timeAction property, separate the class names with white space. Specifying an invalid class name is equivalent to specifying a timeAction value of none.

When using an element associated with the time behavior, you must prefix the attribute with the t: namespace.

Example

This example shows text with different timeAction values.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<STYLE>
.time  { behavior: url(#default#time);}
</STYLE>
</HEAD>
<BODY BGCOLOR="white">
<SPAN CLASS="time" STYLE="Color:Red; Font-Weight:bold;" t:BEGIN="0"
t:DUR="5" t:TIMEACTION="style">
<H3>Paragraph 1</H3>
<P>This is paragraph number one. It is displayed in red, bold
typeface for five seconds. After five seconds, the inline style
is no longer applied. The timeAction property is set to
"style."</P>
</SPAN>
<SPAN CLASS="time" STYLE="COLOR:Blue;" t:BEGIN="0" t:DUR="10"
t:TIMEACTION="display">
<H3>Paragraph 2</H3>
<P>This is paragraph number two. It displays for 10
seconds. The timeAction property is set to "display."</P>
</SPAN>
<SPAN>
<H3>Paragraph 3</H3>
<P>This is paragraph number three. When the second
paragraph disappears, this paragraph moves into its place because
the document reflows.</P>
</SPAN>
</BODY>
</HTML>
This feature requires Microsoft?Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

This property is defined in HTML+TIME (Timed Interactive Multimedia Extensions) 1.0 Non-Microsoft link.

Applies To

t:AUDIO, t:IMG, t:MEDIA, t:PAR, t:SEQ, time, t:VIDEO

See Also

Introduction to HTML+TIME