Testimonials  >

ZAO "SK-Teplomontazh" offers the European equipment of autonomous heating systems: gas and electric furnaces, water heaters, liquid fuel furnaces, burners, boilers, regulators and radiators. The company carries out projecting, assembling and...

ZAO "SK-Teplomontazh",
Ryakov A.

Articles  >

Articles  >  Programming  >  Flash and validating HTML-page

W3C logoConformity of HTML-code of pages of a site to standards of organization W3C guarantees correct display of a site in all browsers, supporting these standards, and it is the certificate of the professional approach to development of web-sites. Besides the "correct" HTML-code in the best degree corresponds to a principle of separate of content from its representation. Unfortunately, many developers of web-sites (even known enough) simply ignore any standards, at the best being limited to the indication of the standard in the beginning of HTML-page... the standard which subsequently do not use. However, the question will be not it...

As is known, the HTML-file with an example of using of a published movie is created at the publication of flash movie in Macromedia Flash (there is Macromedia Flash 2004 MX will be used):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

...

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/ shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="550" height="400" id="example" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="example.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="example.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="example" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

...

It is visible from heading of page that Macromedia Flash suggests to use standard XHTML 1.0 Transitional. Together with it, developers Flash have probably forget, that the tag embed is absent in DTD this standard. Thus, the above-stated code never will pass the test for conformity to standard W3C.

Let's try to correct a situation, having removed completely tag embed:

...
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/ shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="550" height="400" id="example" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="example.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
</object>
...

The document successfully passes the test for conformity to the standard, but... flash movie has ceased to be displayed in such browsers, as Mozilla Firefox and Opera as they worked with a tag embed. However, last versions of the named browsers quite can work and with a tag object. It is necessary to change attributes of this tag only:

...
<object type="application/x-shockwave-flash" data="example.swf" width="550" height="400" id="example" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="example.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
</object>
...

The above mentioned code perfectly works, both in Microsoft Internet Explorer, and in browsers Mozilla Firefox, Opera. Besides it became more clear and graceful, well and, the most important, it conform to standards XHTML 1.0 Transitional and XHTML 1.0 Strict.

← To publications list

Nikolay I. Yarovoy,
03/18/2006.

Last projects:  Contact lens, Ekaterinburg

Back to top© 2020 ControlStyle, web site development. All rights reserved.
Web site promotion and advertising.