SMIL in Parallel
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 »
|
Make your web applications look like a million bucks
|
|
Most web applications today use boring methods to present data to their viewers using grids or simple HTML tables. FusionCharts induces "life" into the web applications by converting monotonous data into lively charts, gauges & maps.
FusionCharts works with all technologies like ASP, ASP.NET, PHP, ColdFusion, Ruby on Rails, JSP, HTML pages etc.
and connects to any database to render animated & interactive charts. It takes less than 15 minutes and no expertise
whatsoever to build your first chart and just a glance of it to captivate your audience. This fact is endorsed by our
12,000 customers and 150,000 users which include a majority of the Fortune 500 companies.
And yeah, your applications could look like a million bucks by spending just $69.
So go ahead, download your
copy of FusionCharts and start "wow-ing" your customers now!
|
 |
W3Schools' Online Certification Program
The perfect solution for professionals who need to balance work, family, and career building.
More than 4000 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).
|