HTML and CSS [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

HTML and CSS [Electronic resources] - نسخه متنی

Molly E. Holzschlag

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Embedding Files Using the

object Element


Another means of providing audio, video, and other multimedia such as Flash animations and Java applets is to embed them directly into the page. This means that the software plug-in automatically loads with the page.

All external files are considered

objects . This includes images as well as multimedia files. In contemporar196 and XHTML specifications, the proper way to include all multimedia is to use the object element to embed a file directly:


<object data="media/video-sample.avi" type="video/avi" />

This results in the player application appearing on the page. The video can then be played (see Figure 3-10).

Figure 3-10. The embedded player loaded into Internet Explorer.

NOTE

Of course, you can do a lot more in terms of providing advanced settings. To learn more about the many available settings for multimedia, see the excellent tutorial at http://www.w3schools.com/media/default.asp.

In instances with Flash files, you use the object element to achieve inline results, as you can see in Example 3-7.

Example 3-7. Embedding a Flash movie file (SWF) into a page using <object>

[View full width]


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="100"
codebase="http://active.macromedia.com/flash6/cabs/ swflash.cab#version=6,0,0,0">
<param name="movie" value="media/ava.swf" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="quality" value="high" />
</object>

In most standards-compliant browsers that also have Flash enabled, the file should play directly upon loading, as shown in Figure 3-11.

Figure 3-11. The Flash animation of the AVA logo plays inline in Internet Explorer.


/ 198