Electric Type

Multimedia

About Us

News

Help

SMIL 2.0: Codeless Animation in HTML

Page 2 — Learning the Basics

How about we start out with a quick primer and a couple of demonstration pages? Remember: You'll need Internet Explorer 5.5 (with animations turned ON) to see the following examples. You probably have animations on in your browser already — if you can see animated GIFs, you have animations on. In case you don't, go to Tools -> Options on the IE 5.5 menu, and then to the Advanced tab. Under the Multimedia section, make sure you have Play Animations enabled (the box should have a check in it).

Before you run off and start SMILing, you need a skeleton which sets up IE to support it. This declaration must appear within the <head> portion of your HTML+SMIL document:

<html xmlns:smil="urn:schemas-microsoft-com:time">

<head>
<style>
 smil\:* { behavior:url(#default#time2) }
 time:*  { behavior:url(#default#time2) }
</style>
</head>

If you study some of Microsoft's SMIL articles, the code samples they provide all include this ...

<?IMPORT namespace="t" implementation="#default#time2">
... in the head block, but it is not required. I don't use it because it doesn't seem to be xHTML/XSL friendly — when I run it through a validator, it returns an error. You can include it if you wish, but remember to change the namespace="t" to namespace='smil' for the examples here. If and when SMIL is adopted by other browsers, it will probably look like the standards-compliant namespace='smil' declaration.

Here are some easy examples that will each open in a separate window. Play with them, then take a look at the code I've provided and view the source to see how the skeleton header fits in.

After you've had your fun clicking and reading about my oh-so-stellar SMIL creations, move on to the next page where we'll discuss the SMIL timeline.

next page»


Dynamic HTML  

Frames  

HTML Basics  

Stylesheets  

Tables  

XML  

Javascript  

Database Connections  

Intro To Perl  

HTML 4.0  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.