BEGIN Attribute | begin Property

Internet Development Index

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

What's New for Microsoft?Internet Explorer 6

The begin property applies to the transitionFilter element.

Syntax

HTML<ELEMENT BEGIN = sTime... >
Scriptingobject.begin [ = sTime ]

Possible Values

sTimeString that specifies or receives one or more of the following values.
clock-valueClock 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.
indefiniteElement 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 and beginWith properties 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" and begin="element.event"; both are valid.

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

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>
This feature requires Microsoft?Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

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>
This feature requires Microsoft?Internet Explorer 5.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 Synchronized Multimedia Integration Language (SMIL) 2.0 Non-Microsoft link.

Applies To

A, ACRONYM, ADDRESS, t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, AREA, t:AUDIO, B, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, CODE, DD, DEL, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, hn, HR, I, IFRAME, IMG, t: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, t:MEDIA, MENU, OL, OPTION, P, PLAINTEXT, playItem, PRE, Q, t:REF, S, SAMP, t:SEQ, t:SET, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, time2, TR, TT, U, UL, VAR, t:VIDEO, XMP, t:TRANSITIONFILTER

See Also

Introduction to HTML+TIME, end