time Behavior

MS Office DHTML, HTML & CSS

time Behavior


This document describes technologies available as an experimental implementation of HTML+TIME within Internet Explorer 5. While we encourage you to evaluate these features and to send us your feedbackInternet Link, please note that these features are subject to change.

Provides an active timeline for an HTML element.

Syntax

XMLN/A
HTML<ELEMENT STYLE="behavior:url('#default#time')" ID=sID>
Scriptingobject.style.behavior = "url('#default#time')"
object.addBehavior ("#default#time")

Possible Values

sID String that specifies a unique identifier for the object.

Members

Remarks

This default behavior adds timing to HTML pages. Using the HTML+TIME extensions, any HTML element can be set to appear at a given time, last for a specified duration, and repeat the behavior if desired. The time behavior supports all time-related attributes, properties, methods, and events. The XML elements associated with this behavior are ANIMATION, AUDIO, IMG, MEDIA, PAR, SEQ, and VIDEO.

The members listed in the preceding table might not be accessible through scripting until the window.onload event fires. Waiting for this event to fire ensures that the page is completely loaded, that all behaviors have been applied to corresponding elements on the page, and that all the behavior's properties, methods, and events are available for scripting. Using any of the behavior-defined members before the window.onload event fires could result in a scripting error, indicating that the object does not support that particular member.

The time behavior is available as of Microsoft® Internet Explorer 5, only in the Microsoft® Win32® platform.

Example

This example uses the time behavior to make text appear for specified intervals of time.

Sample Code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Time Behavior</TITLE>
<XML:NAMESPACE PREFIX="t"/>
<STYLE>
.time            { behavior: url(#default#time);}
</STYLE>
</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF" 
LINK="#000000" VLINK="#808080" ALINK="#000000">
<BLOCKQUOTE>
<P>Images and lines of text should start appearing 2 seconds 
after the page is loaded.</P>
<t:IMG CLASS=time t:BEGIN="2" t:DUR="7" t:TIMEACTION="display" 
    t:SRC="/workshop/graphics/icons/author.gif" />
<t:IMG CLASS=time t:BEGIN="11" t:DUR="indefinite" t:TIMEACTION="display" 
    t:SRC="/workshop/graphics/icons/messaging.gif" />
<UL STYLE="COLOR:Green;">
    <LI CLASS=time t:BEGIN="2" t:DUR="7" t:TIMEACTION="display">
        This line appears with the image.
    </LI>
    <LI CLASS=time t:BEGIN="4" t:DUR="5" t:TIMEACTION="display">
        This line appears two seconds after the image.
    </LI>
    <LI CLASS=time t:BEGIN="6" t:DUR="3" t:TIMEACTION="display">
        This line appears four seconds after the image.
    </LI>
</UL>
<UL STYLE="COLOR:Red;">
    <LI CLASS=time t:BEGIN="11" t:DUR="indefinite" 
    t:TIMEACTION="display">
        This line appears with the image.
    </LI>
    <LI CLASS=time t:BEGIN="13" t:DUR="indefinite" 
    t:TIMEACTION="display">
        This line appears two seconds after the image.
    </LI>
    <LI CLASS=time t:BEGIN="15" t:DUR="indefinite" 
    t:TIMEACTION="display">
        This line appears four seconds after the image.
    </LI>
</UL>
<P CLASS=time t:BEGIN="16" t:DUR="indefinite">The page is now 
finished.</P>
</BLOCKQUOTE>
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
A, ACRONYM, ADDRESS, AREA, B, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, CODE, DD, DEL, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LEGEND, LI, LISTING, MARQUEE, MENU, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See Also

dhtml behaviorsInternet Link, html+timeInternet Link, using dhtml behaviorsInternet Link

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.