[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

WC3 compliant html for embedding flash

Posted on 2006-03-24
10
Medium Priority
?
1,141 Views
Last Modified: 2011-10-03
How can I modify the following html to make it WC3 compliant:

<embed src="img/something.swf" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

Testing at http://validator.w3.org it says "This page is not Valid HTML 4.01 Transitional!" and it says there's no attributes for src, quality, type, pluginspace, and element "EMBED" undefined.


0
Comment
Question by:ncw
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 16279875
ncw,

The problem may be the way you are closing the tag.  "/>" is used to close XHTML tags that don't have closing tags.  Embed does have a closing tag and you should use it in HTML or XHTML.

<embed src="img/something.swf" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>

This may fix the validation error.  The rest of that code looks OK to me.

b0lsc0tt
0
 
LVL 1

Author Comment

by:ncw
ID: 16280018
No difference.

<embed src="img/something.swf" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
0
 
LVL 54

Assisted Solution

by:b0lsc0tt
b0lsc0tt earned 200 total points
ID: 16280245
ncw,

The problem may be that the embed tag was never standardized by W3C.  Who knows why that is the case?! Both of the links below are to articles that discuss this and seem to offer a way get flash to work in non-IE browsers and still use valid code that will meet standards.  If it is important to be compliant then you will probably have to use something like the solution in the articles.

http://www.macromedia.com/devnet/dreamweaver/articles/flash_satay.html

http://www.alistapart.com/articles/flashsatay/
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:ncw
ID: 16280424
The full object code was:

<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="658" height="237" id="something" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="img/something.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="img/something.swf" quality="high" bgcolor="#ffffff" width="658" height="237" name="something" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

which I think matches the 'twice cooked' method in the links.
0
 
LVL 5

Accepted Solution

by:
blacksix earned 900 total points
ID: 16281100
I have a really good solution to this. I've used it on some sites and it validates no problemo (can even validate for XHTML 1.0 strict too!):

http://blog.deconcept.com/flashobject/

Its a script called flashobject. It's got some pretty good capabilities too (such as installing flash for those who do not have it without leaving your site).

Your code would look something like this:

First in your head section you would include the javascript file:
<script type="text/javascript" src="flashobject.js"></script>

Then put this where you want it to display:

<div id="flashcontent">
This text is replaced by the flash movie.
</div>
<script type="text/javascript">
 // <![CDATA[
  var fo = new FlashObject("fo_tester.swf", "fo_tester", "300", "150", 6, "#336699");
  fo.write("flashcontent");
 // ]]>
</script>

Again you can download the JS file and read more about the advantages of using this method here:
http://blog.deconcept.com/flashobject/
0
 

Assisted Solution

by:uhh-ohh
uhh-ohh earned 900 total points
ID: 16286440
I use a similar solution to blacksix's solution. I use Unobtrusive Flash Objects (UFO) V3.0 found here:
<a href="http://www.bobbyvandersluis.com/ufo/">http://www.bobbyvandersluis.com/ufo/</a>

From the site:
"UFO is as standards compliant as it can be. Your (X)HTML pages will pass the W3C validation tests, because UFO generates the Flash object's (X)HTML code with JavaScript."

It's free. It also provides you with the opportunity to put valuable content in place of the Flash when a user chooses not to have Flash installed. It has a lot of great features, the developer keeps up with it and maintains a very informative site, and most of all it's really easy to use.

Hope this helps.

--Susan


0
 

Expert Comment

by:uhh-ohh
ID: 16286453
Oops, sorry about that problem with the link in my comment above. I'm new to posting here. My error.
0
 
LVL 16

Expert Comment

by:sam85281
ID: 16288737
Hi uhh-ohhh

To make a link you just type it out, no code:
http://www.domain.com

-Sam
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 16366776
ncw,

We have not heard you in a while.  Did any of the comments answer your question?  If so, please accept the appropriate comment with an excellent or good grade.  If you still have a question or need additional information then please let us know so that we can help you resolve the problem.

b
0
 
LVL 1

Author Comment

by:ncw
ID: 16368622
Thank you.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question