Multimedia
  Home arrow Multimedia arrow Page 5 - Learning To SMILe
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
MULTIMEDIA

Learning To SMILe
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 8
    2002-11-21


    Table of Contents:
  • Learning To SMILe
  • Getting The Tools
  • Anatomy 101
  • Laying It Out
  • Spending Time
  • Playing In Sync
  • A Click In Time...
  • Bedtime Reading

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Learning To SMILe - Spending Time
    ( Page 5 of 8 )

    SMIL also includes a fairly sophisticated timing model which allows you to control the timing and synchronization of media objects within the lifetime of the SMIL presentation. Basic timing support is made available via the "begin" and "dur" attributes, which allow you to specify a start time and duration respectively for the media. Values for these attributes may be specified in terms of time values or event notifications. Here's an example:

    ... <img src="logo.jpg" alt="Image" region="alpha" begin="5s" /> ...
    In this case, the media will begin playing (in other words, the image will be displayed) 5 seconds after the SMIL document has been loaded.

    You can also specify a duration for the media:

    ... <img src="logo.jpg" alt="Image" region="alpha" begin="5s" dur="10s" /> ...
    This sets up a clip of total duration 15 seconds, with the image appearing 5 seconds into playback.

    You can repeat an element via the "repeatCount" attribute, as follows:

    ... <img src="logo.jpg" alt="Image" region="alpha" begin="5s" dur="10s" repeatCount="2" /> ...
    This would set up a clip of total duration 25 seconds, with the image appearing 5 seconds into the clip.

    It's also possible to explicitly terminate playback of a media clip before it gets to the end of its normal lifetime with SMIL's "end" attribute. Consider the following example, which demonstrates by ending a 10-second audio clip after 6 seconds.

    ... <audio src="bg.wav" region="alpha" end="6s"/> ...
    It's also possible to begin or end clips on specific events, such as a mouse click or the start of any other media clip within the document. Consider the following example, which plays a video clip; the clip ends when the user clicks the mouse on it.

    ... <video src="video.rm" region="alpha" end="click" /> ...
    A number of other options are available for event-based timing in SMIL – take a look at the specification for a complete list, together with usage examples.

     
     
    >>> More Multimedia Articles          >>> More By icarus, (c) Melonfire
     

       

    MULTIMEDIA ARTICLES

    - Basic Lighting in OpenGL and SDL Game Progra...
    - Working with Colors in OpenGL for Game Progr...
    - Animation in OpenGL for Game Programming usi...
    - Game Programming with SDL: Getting Started w...
    - Using OpenGL with SDL for Game Programming
    - Learning Sound for Game Programming using SDL
    - Game Programming using SDL: Raw Graphics and...
    - Game Programming using SDL: Getting Started
    - Network Radio With Icecast
    - Learning To SMILe





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek