How to verify the flash page

Source: Internet
Author: User

1. The embed is invalid.

<Embed> labels are private labels of Netscape. Although <embed> labels are widely used, W3C does not include them from html3.2, html4.0 to xhtml1.0. Pages with the <embed> label cannot pass W3C verification.

2. object should be used

W3C recommends the <Object> label. Even in xhtml2, is replaced by <Object>. Use the <Object> method to insertCodeYes:

<Object type = "application/X-Shockwave-flash" Data = "test.swf" width = "200" Height = "100"> <parm name = "movie" value = "test.swf /> </Object>

But this method is not correctly displayed on the IE5-IE6/WIN (cannot play continuously, You have to download to put), in the lower version can be correctly displayed. Later, we used the method of first tuning a small flash file and then embedding a large flash file to solve the problem of continuous playback. However, in ie5 or a later version, flash cannot be displayed.

3. Current temporary measures

So what should I do if I want to correctly display flash in all browsers while complying with the standards? How does the Macromedia Website pass W3C verification?

Some designers think of using JavaScript to hide illegal <embed> labels,

<SCRIPT type = "text/JavaScript"> If (navegiator. mimetypes & navigator. mimetypes ["application/X-Shockwave-flash"] {document. write ('<embed src = "test. SWF "...

This is a good solution. You must plug in flash and use js to call it. This method can fool W3C ValidationProgramTo make the page pass the verification. But it is only "spoofing", not true compliance with standards.

How does Macromedia work? See this Code:

<! -- $ Rcsfile: flashdetection2k. PM, V $ revision: 1.68 $: your browser's accept header indicates you have flash 6, 0, or better, so you're OK for this flash 6 movie, here it comes. -->

It adopts a compromise method:

    • (1) first, JavaScript is used to determine your browser version and Flash Player version;
    • (2). Generate HTML code dynamically in the background based on different versions.

Simply put, the <Object> method is used by default. If the browser cannot process the object's MIME type "application/X-Shockwave-flash", it inserts the child element <embed>. To put it bluntly, this is similar to hiding the <embed> method with JS, and it is also a "spoofing" method. However, this is the most standard and perfect method that can be achieved at present.

if you really want to discard , you can only wait for IE to provide better support for . Maybe Longhorn will come out.

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.