Basic knowledge of SMIL

Source: Internet
Author: User
Tags closing tag

Let's look at a practical example of SMIL (written in Notepad, note: Edit in the English state). That is, do not open the Chinese input method. Because the SMIL player does not know Chinese punctuation. ):
< smil>
< head>
< meta name= "copyright" content= "Your name"/>
< layout>
<!--layout Mark-->
</layout>
< body>
<!-media tag-->
< img src= "image1.jpg"/>
</body>
</smil>
Obviously, the syntax format of SMIL and HTML language is very similar. So, if you're familiar with HTML, SMIL is easy to learn. However, the difference between the two is very large, so if you want to learn very well, we must study hard.
As you can see from the above example:
(1) The SMIL program starts with <smil> and ends with </smil>.
Smil must start with <smil>, end with </smil>, and all other marks are between the two. This is the same as the HTML.
(2) The whole program consists of two parts of body and head
Where the body is necessary. The head section looks at the actual situation. If necessary, we will write. If the entire SMIL program is very simple and does not need to use the Head section, then we can not write. From personal experience, if you want to write a good demo, the head part is essential. J
(3) Properties and tags require lowercase
SMIL requires that its tags and tags have properties that are lowercase.
We don't want to give a definition of attributes and tags here. The Smil language is made up of tags. Each row is a tag, and the tags have essentially attributes. For example:< img src= "image1.jpg"/>, img is a tag, and SRC is a property, and image1.jpg is the attribute value of SRC. Note: Property values can be both uppercase and lowercase. We'll come across some attribute values that require the camel to spell. What is the camel's spelling? Attribute values like Fadetocolor (see, Middle High, low on both sides, not very much like Camel hump.) J) is the camel writing.
(4) Some marks must have a slash as the closing tag
In Smil, if the tag is not a pairing mark (such as:< smil></smil>, < head>(5) Property values must be enclosed in double quotes
For example: src= "Image1.jpg". Note: The filename that appears in the Smil file must be the same as the file name on the server, and the path must be correct. Otherwise, the SMIL Viewer cannot find the file.
(6) The extension of smil file name is *.smil or *.smi
We have to save the Smil file with *.smil or *.smi extensions. In this way, the SMIL player can recognize the Smil file to decode and play the correct decoding method. To prevent conflicts with extensions to other types of files, it is strongly recommended that *.smil be used as the extension name. NOTE: The filename must start with a number, a letter, an underscore in the middle, and no spaces. For example: Test_one.smil can, and test one.smil resolute not. If you like, you can use the camel we said above Testone.smil. Note: The above example can be reproduced in the original, saved as Testone.smil. And find a picture put in the same folder Testone.smil, and change the image1.jpg to your picture name (after if there is no special instructions, you have to do so), you can use a supported player such as: Realone player to open the source program, Look at the effect of our first demo. J
(7) Additional information is written between < head>If we have some information about the source code, such as the copyright, author, title, base address, etc., we can explain it in the < head>(8) Use <!--...--> to annotate
This tag and the HTML inside is a young one. We can comment on our source files. When the SMIL player encounters this tag, it skips over and ignores it. For example, we can write the effect we want to implement in <!--...--> before writing the source code, and then write the source code, and if we forget to delete the paragraph description, it will not affect the execution of the demo.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.