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>
Applies To
animation, audio, img, media, par, seq, time, video
See Also
BEGIN, BEGINAFTER, BEGINWITH, HTML+TIME