BEGIN Attribute | begin Property

This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.

Sets or gets the delay time before the timeline begins playing on the element.

Syntax

HTML <ELEMENT BEGIN = sTime... >
Scripting [ sTime = ] object.begin

Possible Values

sTime String that specifies or receives one or more of the following values.
clock-value
Clock value, such as h:min:s.f, described in Time Formats.
id.event[+clock-value]
Element begin time is defined relative to the firing of an event. The clock-value is optional.
indefinite
Element begin time is determined by a beginElement method call.

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

Remarks

The begin property exposed by the time2 behavior includes functionality that was previously provided by the beginAfter property and the beginWith property in the time behavior.

The BEGIN attribute can be assigned many BEGIN time values. For example, to make the element begin 12 seconds after element x receives focus, specify BEGIN="x.onfocus+12s". To make the element begin 10 seconds before element x begins, specify BEGIN="x.end-10s". If you want an element to begin four seconds after the page loads or to begin one second after the user clicks an object on the page, use the following syntax: BEGIN="4; oObject.click+1".

You can set the begin property relative to an event by using the syntax begin="element.onevent" or begin="element.event". Both are valid.

For child elements of excl time containers, the default value is indefinite.

In Microsoft Internet Explorer 6, the begin property applies to the transitionFilter element.

Examples

This example uses the BEGIN attribute to make text appear and disappear over time.

<HTML>
<HEAD>
<STYLE>
    .time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>
<BODY BGCOLOR="white">
<SPAN CLASS=time STYLE="COLOR:Red;" BEGIN="0" DUR="3"
    TIMEACTION="display">
    <H3>Paragraph #1</H3>
    <P>This is paragraph number one. It appears for three seconds immediately 
    after the page is loaded.</P>
</SPAN>
<SPAN CLASS=time STYLE="COLOR:Blue;" BEGIN="4" DUR="4" 
    TIMEACTION="display">
    <H3>Paragraph 2</H3>
    <P>This is paragraph number two. It appears one second after the first
    paragraph disappears, and remains displayed for four seconds.</P> 
</SPAN>
<H1 CLASS=time BEGIN="8" DUR="indefinite" TIMEACTION="display">
    The End.
</H1>
</BODY>
</HTML>

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

This example shows how to create timeline dependencies by specifying an event value for the BEGIN attribute.


<HTML>
<HEAD>
<STYLE>
.time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>
<BODY BGCOLOR="white">
<P>Click the following button to display a paragraph two seconds later. 
The paragraph displays for five seconds.</P><BR><BR>
<BUTTON ID="button1">Show Paragraph</BUTTON><BR><BR>
<SPAN ID="span1" CLASS=time STYLE="COLOR:Red;"
    BEGIN="button1.click+2" DUR="5" TIMEACTION="display">
    <H3>Paragraph 1</H3>
    <P>This is paragraph number one. It appears two seconds after 
    the button is clicked and displays for five seconds.</P>
</SPAN>
</BODY>
</HTML>

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

Applies To

t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:REF, t:SEQ, t:SET, time2, t:VIDEO, t:TRANSITIONFILTER

See Also

Introduction to HTML+TIME, end