Поделиться через


timeAction property

Sets or gets the action that is taken on the element while the timeline is active.

Syntax

JScript
object.timeAction = sActionsAction = object.timeAction

 

Property values

Type: String

one of the following values.

Remarks

The default value of the timeAction property depends on the element using it. 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.

If the display attribute is set to none through persistence or before the time2 behavior is dynamically added, the element will not display.

If the visibility attribute is set to hidden through persistence or before the time2 behavior is dynamically added, the element will not display.

If the HTML+TIME (Timed Interactive Multimedia Extensions) behavior is applied directly to the A element, by default, the element is always visible but is only a viable hyperlink when it is active on the time line. To make this element appear and disappear, you must specify a value for the TIMEACTION attribute in the a element.

Examples

This example shows text with different timeAction values.

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

<HTML>
<HEAD>
<STYLE>
    .time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>
<BODY BGCOLOR="white">
<SPAN CLASS=time STYLE="Color:Red; Font-Weight:bold;" BEGIN="0"
    DUR="5" 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;" BEGIN="0" DUR="10"
    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>

See also

animation

audio

img

media

par

ref

seq

time2

video

Introduction to HTML+TIME