Multimedia
  Home arrow Multimedia arrow Page 3 - Learning To SMILe
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
eWeek
 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? 
MULTIMEDIA

Learning To SMILe
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 7
    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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Virtual Tradeshows by Ziff Davis Enterprise - A Unique Opportunity to Connect with IT Experts, Access Information, and Gain Insight on today's Technology

    Learning To SMILe - Anatomy 101
    (Page 3 of 8 )

    SMIL files are based on XML, and therefore inherit all the attributes (and constraints) of that toolkit. An SMIL document consists of a series of nested elements, or tags, each one controlling some aspect of the final result. As with any XML document, element names are case-sensitive, and must be correctly nested in order for the document to be well-formed.

    Here's a simple SMIL document:

    <smil xmlns="http://www.w3.org/2001/SMIL20/Language"> <head> <layout> <root-layout width="500" height="400" backgroundColor="white" /> <region id="alpha" left="120" top="150" width="250" height="200" /> </layout> </head> <body> <img src="logo.jpg" alt="First image" region="alpha" /> </body> </smil>
    In order to see how this works, save this document with a ".smil" file extension - for example, "simple.smil" - and then pop open your copy of the RealOne player and load this file into it. Once the player parses the file, you should see something like this:



    Not very exciting, huh? Don't worry - we'll jazz it up a little further down. For the moment, let's just dissect the code above and see what each of those elements actually does.

    Every SMIL document must begin and end with a pair of <smil>...</smil> elements; everything contained within these elements forms part of the SMIL presentation. The XML namespace for SMIL should be included in these elements via the "xmlns" attribute.

    <smil xmlns="http://www.w3.org/2001/SMIL20/Language"> ... </smil>
    The remainder of the document can broadly be divided into the <head> and the <body>, in much the same way as a regular HTML document. The <head> contains metadata (a description of the media presentation or a copyright notice) and layout information, while the <body> contains the elements that reference the actual media content or set up timers.

    <smil xmlns="http://www.w3.org/2001/SMIL20/Language"> <head> ... </head> <body> ... </body> </smil>

    More Multimedia Articles
    More By icarus, (c) Melonfire


     

       

    MULTIMEDIA ARTICLES

    - 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-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway