w3schools
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About

SMIL in Parallel

« Previous Next Chapter »

Objects inside a par element will be played at the same time (in parallel).


The Parallel Element

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 regardless 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.


Displaying Objects in Parallel

Example

<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>

Try it yourself »

« Previous Next Chapter »


Build Your Own Professional, Flash Website with Wix

Start Creating a stunning, Flash website. It's easy and free!

Wix is a revolutionary web design tool that provides you with a free, simple, drag & drop editing platform to create your own professional and beautiful website.

Over 2 Million users have created their website with Wix. Now create yours!



W3Schools Certification

W3Schools' Online Certification Program

The perfect solution for professionals who need to balance work, family, and career building.

More than 4500 certificates already issued!

The HTML Certificate documents your knowledge of HTML, XHTML, and CSS.

The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.

The XML Certificate documents your knowledge of XML, XML DOM and XSLT.

The ASP Certificate documents your knowledge of ASP, SQL, and ADO.

The PHP Certificate documents your knowledge of PHP and SQL (MySQL).

WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
Top Web Hosting
Cheap UK Web Hosting
WEB BUILDING
Download XML Editor
FREE Flash Website
FREE Web Templates
SEO Company
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
SHARE THIS PAGE