SMIL in Parallel
Objects inside the <par> element will be played at the
same time (in parallel).
The Parallel Element <par>
The <par> element can have a number of attributes. The most common
attributes are:
| Attribute |
Value |
Description |
| begin |
time |
Sets the delay before the element is displayed |
| dur |
time |
Sets the duration for the display |
| endsync |
"first"|"last"|id(clip) |
Synchronizes the stopping of elements |
| repeatCount |
number |
Sets the number of repetitions for the display |
For a full list of SMIL elements and attributes:
W3Schools SMIL Reference.
Synchronization
A parallel group of clips can be stopped at the same time using the
endsync attribute in the <par> tag.
endsync="first" stops all the clips in the <par> group when the shortest
clip are finished regardles of any time parameters set for the other clips.
endsync="last" concludes the <par> group when all clips have finished
playing. This is the default.
endsync="id(ID)" concludes the <par> group when the clip with the
identified (ID) clip are finished. The ID is referring to the value of the clips
id attribute.
Example: Displaying Things Simultaneously
<html xmlns:t="urn:schemas-microsoft-com:time">
<head>
<?import namespace="t" implementation="#default#time2">
<style>.t {behavior: url(#default#time2)}</style>
</head>
<body>
<par>
<t:audio
src="liar.wav"
repeatCount="indefinite"
type="wav" />
<t:seq repeatCount="indefinite">
<h2 class="t" dur="1s">
I will display for one second</h2>
<h2 class="t" dur="2s">
I will display for two seconds</h2>
</t:seq>
</par>
</body>
</html>
|
Click here to try it yourself.
Unlimited Disk and Transfer Hosting - New from Go Daddy!
Go Daddy Unlimited Hosting is the reliable, cost-effective
choice for site owners who want superior speed and reliability.
Available for Linux or Windows, our Unlimited Hosting accounts
come with unlimited disk space and bandwidth, 1,000 email
accounts, 50 MySQL Databases, a FREE SSL Certificate and over
50 FREE downloadable applications and utilities available through
our exclusive Hosting Connections. Count on the world’s largest
hostname provider to keep your site up and running—even when you’re not!
Take the uncertainty out of Web hosting and let GoDaddy.com
put service, performance and value back in. No matter which
hosting type or plan you choose, your site receives 24/7
maintenance and protection in our world-class data center.
Virtual Dedicated, Dedicated Server and unlimited plans also available.
Save 10% on web hosting - Enter code w3tenoff at checkout
 |
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
|
|