Now that you have seen AMODs in action, let's take a closer look at the code. Every AMOD file contains three sections: document declaration, header, and body. Each section is defined by a set of tags and can contain specific markup (see Figure 5).

Figure 5. AMOD section syntax options
The document
declaration section essentially defines the file as a SMIL-based document. The
section begins with a <smil> tag and ends with a </smil> tag. The opening <smil> contains the xmlns attribute that is used to select the appropriate SMIL version for the entire
document. In the case of AMOD in Adobe Media Player,
it should always reference SMIL version 2.1. As such, the AMOD document
declaration should be identical to Listing 3.
<smil xmlns="http://www.w3.org/2005/SMIL21/Language"> ... </smil>
Listing 3. AMOD document declaration
The header
section is used to provide Adobe Media Player with presentation information and
custom-defined values. The section begins with a <head> tag and ends with a </head> tag.
In SMIL, the header section is optional, but in AMOD it is required. The header
section in every AMOD defines the four different layout regions required for
advertising in Adobe Media Player. It can also be optionally used to define
values for conditionally branching when in online/offline states. Both of these
topics will be discussed a bit later. For now, the typical AMOD header will
resemble Listing 4.
...
<head>
<layout>
<region id="banner" />
<region id="content" />
<region id="logo" />
<region id="overlayAd" />
</layout>
</head>
...
Listing 4. Typical AMOD header
The body section is the meat-and-potatoes of the AMOD. It
contains all of the video and rich media content as well as constructs for
sequencing the content. The section begins with a <body> tag and ends with a </body> tag, making it similar to HTML. Instances of the <video> and <img> elements—collectively, rich media content—are targeted at different regions of
the player and grouped into blocks that control their sequence of appearance
during the Episode playback. Listing 5 provides an example of a simple
AMOD body.
... <body> <par> <img region="banner" src="http://www.mysite.com/banner.swf" dur="120s" /> <video region="content" src="http://www.mysite.com/content.flv" dur="120s" /> </par> </body> ...
Listing 5. Sample AMOD body