w3schools
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
BEST WEB HOSTING JustHosts

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 »


The Creators of XMLSpy are Pleased to Announce

The MOST WANTED features for Developers and
IT Professionals in Version 2010

Collect your handsome reward! Download a free trial and experience more than 70 of the Most Wanted features including:

  • JSON editing & conversion in XMLSpy
  • WSDL 2.0 editing in XMLSpy (adding to WSDL 1.1 support)
  • WSDL 2.0 data mapping in MapForce
  • Numerous data mapping enhancements in MapForce
  • Numerous stylesheet design enhancements in StyleVision
  • XML Schema comparison in DiffDog
  • And much more!
Fully functional 30-day free trial of the Altova MissionKit
Altova XMLSpy


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