The home page is a flash movie for a site i created,when i use the w3c validation tool, it gives errors saying "invalid attribute "embed" ",
"invalid attribute "scr" "; if i take of "embed" it does not work in Netscape. And also when validating shows error for the movie height and width , if i take that off then the movie is not show fully even in IE.
Please help if some one does know ?
thanks,
meena

Dani AI

Generated

A few clarifications that tie the earlier replies together and give a practical, standards-friendly path forward.

The validator errors saw are commonly caused by a misspelled attribute (the message about "scr" usually means src was mistyped) and by using the non-standard <embed> element under a strict DOCTYPE. The HTML5/W3C approach is to prefer object (with a data and type attribute) or the native embed element in HTML5; legacy pages that target XHTML Strict will flag embed. (w3.org)

A robust, standards-aware compromise is to provide a semantic fallback in the source HTML and let a small, unobtrusive script insert the Flash object only when the plugin is present. This avoids invalid markup in strict documents and keeps the page usable when Flash is absent. That is the idea behind tools like SWFObject, which generate W3C-friendly object markup dynamically and handle detection/fallbacks for different browsers. ’s object/embed example works functionally, while ’s pointer to standards-minded techniques is the right direction; SWFObject automates much of that cross-browser plumbing. (github.com)

Minimal SWFObject pattern (keeps source HTML valid and supplies fallback):

<div id="flash-target">Alternative HTML or a link to non-Flash content.</div>

<script src="swfobject.js"></script>
<script>
  var params = { quality: "high", wmode: "opaque" };
  swfobject.embedSWF("sitehome.swf", "flash-target", "800", "600", "9.0.0", null, {}, params);
</script>

Finally, note that Flash is end-of-life and modern browsers now block or remove it. For new projects, replacing SWF content with HTML5 (video/canvas/SVG/WebGL) or providing downloadable media is strongly recommended; for legacy archives, emulators and careful server-side handling are safer options than relying on users to run an unsupported plugin. ’s iframe idea will display SWF in a sandbox, but it does not solve the underlying compatibility and accessibility issues and is not a long-term solution. ()

Recommended Answers

All 3 Replies

Hi,

You can insert a flash file through <embed src>. But, the w3c validator shows that tag as an invalid one.

:mad: We design professionals take the w3c guidelines as guidelines only. If you follow the w3c standards, you can't build up a really good site. Your creativity is fully stopped. You customer cannot be satisfied.

I recommend, dont follow W3C. But, a flash file works in Netscape, cool. You can use Dreamweaver or Homesite to design/test your pages. As far as height, if you embed the flash file in a layer, it shows different height and width in Netscape.

The code may take this form,,,,

<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="32" height="32">
<param name="movie" value="file://test.swf">
<param name="quality" value="high">
<embed src="file://test.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="32" height="32"></embed></object>

:lol: Cheers and Happy Designing

Lovablefool

The home page is a flash movie for a site i created,when i use the w3c validation tool, it gives errors saying "invalid attribute "embed" ",
"invalid attribute "scr" "; if i take of "embed" it does not work in Netscape. And also when validating shows error for the movie height and width , if i take that off then the movie is not show fully even in IE.
Please help if some one does know ?
thanks,
meena

The only "standards compliant" method i have found is to use an iframe:

<iframe src="someflash.swf" width="200" height="100" frameborder="0" scrolling="no"></iframe>

It works OK on IE9, Firefox, Opera, Chrome and Safari

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.