BEGINEVENT Attribute | beginEvent Property

MS Office DHTML, HTML & CSS

BEGINEVENT Attribute | beginEvent Property


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.

Sets or retrieves a value that starts the timeline of an element when the referenced event occurs.

Syntax

HTML <ELEMENT STYLE="behavior:url(#default#time);" t:BEGINEVENT = sEventName... >
Scripting object.beginEvent [ = sEventName ]

Possible Values

sEventName String that specifies a timing event or an event supported by the Dynamic HTML (DHTML) Object Model. Valid values include object.EventName or the string "none". Examples of event names include span1.onBegin and document.onLoad.

The property is read/write with no default value. This property cannot be modified in script after the onload event fires on the document body.

Remarks

This property supports interactive timing, where element timelines can begin in response to events from users, media players, or the presentation. You can offset the start time by specifying a nonzero value for the BEGIN attribute on the element. This indicates that the timeline should start a specified amount of time after the referenced event occurs. If the referenced event doesn't occur, the timeline on the current element does not start. This property cannot be used on the same element as the BEGINAFTER or BEGINWITH attribute.

To start the timeline on the current element, you can specify more than one event setting the BEGINEVENT attribute to a string containing a list of semicolon-separated events. For example, you would use the following code to cause the timeline to begin on the heading when either button is pressed:

<BUTTON ID="btn1">Button #1</BUTTON>
<BUTTON ID="btn2">Button #2</BUTTON>
.
.
.
<H1 CLASS="time" t:BEGINEVENT="btn1.onclick;btn2.onclick" t:DUR="5">
     My Heading
</H1>

The prefix t is used to associate this attribute with an XML namespace.

Example

This example uses the BEGINEVENT attribute to make a paragraph appear one second after the user clicks the button.

Sample Code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<STYLE>
.time        	{ behavior: url(#default#time);}
</STYLE>
</HEAD>
<BODY BGCOLOR="white">
<P>Click the following button to display a paragraph one second 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;"
    t:BEGINEVENT="button1.onclick" t:BEGIN="1" t:DUR="5"
    t:TIMEACTION="display">
    <H3>Paragraph 1</H3>
    <P>This is paragraph number one. It appears one second after 
    the button is clicked.</P>
</SPAN>
</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.
animation, audio, img, media, par, seq, time, video

See Also

BEGIN, BEGINAFTER, BEGINWITH, html+timeInternet 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.