HTML tools allow you to embed multimedia objects such as audio files, flash clips, Java applets and video on a Web page.
Audio files on Web pages
If your site will have a musical orientation, then without them you will not get along. Audio files can be played directly in the browser. To embed audio in the page code, use the <EMBED> tag, which has the following attributes:
- SRC - indicates the address and file name for playback. (always indicated)
- WIDTH and HEIGHT - dimensions of the control panel. (always indicated)
- ALIGN - alignment of the control panel (value-left, right, center, top, baseline).
- AUTOLOAD - file upload (value - true-auto-load; false - without loading)
- AUTOSTART - playback (value - true-auto; false-by activating the "Play"
- VOLUME - volume in%
- CONTROLS - the type of panel elements (value-console-full, small-console - compact)
- STARTTIME - file start time timer
- ENDTIME - the timer for the end of playback of a file
- CONSOLE - saves the settings of the control panel
All browsers understand audio files of the formats: WAV, AIFF, AU and MIDI. For other files, players are already used, in particular, such a common RAW format is currently playing RealAudio (with good quality, and even in real time).
Embedding Flash Files
Today Flash-technologies dictate fashion in the creation of sites. Yes, yes on the basis of them you can create whole websites. In this case, the page size will be a little larger than the traditional way. The code for such a page is large, which can not be said about individual flash files. Under the word "Flash-files" you should understand not only banners (used more often on Web pages), but also full-fledged clips with sound. By extension, they need to be divided into two types: the first .fla, whose purpose is to create animation and the second type is .swf - designed specifically for the Internet. Since we are talking about sites, we will talk about the second type.
Flash files have this feature - even at the stage of their development includes the possibility of automatic generation in HTML-code, which is enough to invest in the right place of the page. However, when adjusting any parameters of the clip on the page itself, it is more expedient to do this in the code of the page than to redo it in the Flash editor. Therefore, you still need to know this information.
When generating the source Flash file, the HTML tag uses the <OBJECT> tag with the following attributes and values:
- WIDTH and HEIGHT - the width and height of the clip on the page ( px )
- ALIGN - the method of alignment with the usual values for it
- CODEBASE - the Internet address from where the player will be downloaded
- CLASSID - transfer control to Active X components, the values of which are always indicated: clsid: D27CDB6E-AE6D-11cf-96B8-444553540000
Other characteristics of the clip are described in the <EMBER> tags (atrib - src , quaity , type , pluginspace ) and <PARAM> , which are placed in the <OBJECT> container. The <PARAM> tag has the NAME attribute. The latter has the following meanings:
- movie - the address and name of the Flash file (written via "/" )
- quality - the quality of the clip display ( low , autolow , high , autohigh , best )
- bgcolor - the background color of the clip
- wmode - the way the clip is displayed (window-window, transparent and opaque-layers of the page)
- scale - scaling the clip ( exactfit -shows scale, show-all - unchanged)
- salign - alignment relative to the table cell into which the clip is inserted. (l-left, r-right, t-top, b-bottom, tl-top left, b-bottom left, tr-top right, br-bottom right)
- menu - menu view ( true- complete; false -in abbreviated form)
- play - play the clip on the page ( true- automatic, false- compulsory)
- loop - cyclic ( true- infinite loop; false- one cycle)
The code for the Flash clip on the page may look something like this:
<OBJECT classid = "clsid: D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase = "http://download.macromedia.com/pub/shockwave/ cabs / flash / swflash." cab # version = 6,0,29,0 "width =" 468 "height =" 60 ">
<PARAM name = "movie" value = " address / name of the clip ">
<PARAM name = "quality" value = "high">
<EMBED src = " address / name of the clip "
QUALITY = "high" PLUGINSPAGE = "http://www.macromedia.com/go/getflashplayer"
TYPE = "application / x-shockwave-flash" width = "468" height = "60"> </ EMBED>
Knowing every parameter of the HTML code of the clip can easily change its display on the screen.
Java applet applications on Web pages
Java applets are called small applications written in the Java programming language, which consist of two parts - an applet file with a .class extension and a HTML-code placed on the page. Place the Java applets on the page using the same principle as the flash files, with the difference that instead of the <OBJECT> and <EMBER> tags, the <APPLET> tag is applied, which has a number of common ( CODEBASE , WIDTH , HEIGHT , ALIGN and NAME ) and other attributes:
- CODE - specifies the name of the applet file ( .class )
- HSPACE and VSPACE - indent from adjacent page elements
- ALT - comments to the applet
Publish videos online
Putting video files on the page is very rarely used because of their large volumes, but still if it's done by the principle of Flash-files . The most common method is when a normal link is made to a video file on the server. The video file is then downloaded to the clipboard, and then played back in the player if there is an appropriate codec in it. To solve the problem of their compatibility, use the most common formats to date: AVI , MOV , MPEG-4 .