Jump to content

How to embed .swf on a page


Webgirl

Recommended Posts

Hi

 

up to now I didnt bother about how many errors I get thru w3 Validator but I want to change that. This is how I used to embed a flash file

<object data="mytime3.swf" width="418" height="220" type="application/x-shockwave-flash">

		<param name="movie" value="mytime3.swf">
		<param name="quality" value="best">
		<param name="bgcolor" value="#666666">

                       <embed src="mytime3.swf" width="418" height="220">
		</embed>
		</object>

But Im getting all the errors one can think of from the Validator

 

Any help

Link to comment
Share on other sites

embed is not a valid tag. Other attributes could be cleaned up and rid of many errors but even still it's problematice when it comes to validating.

 

You can try this method (a bit dated) Flash Satay or this.

 

Another one you search and try is SWFObject.

 

Some people have had success but not without trial and error. It could take a chunk of your time to get it to work across all browsers.

 

From my perspective as a developer, it's not worth the time.

Link to comment
Share on other sites

You can get a video code to validate if you leave out the embed tag and use the object tag with <object type="application/x-shockwave-flash"........ as item 2 here:-

http://www.wickham43.net/flashvideo.php

 

but computers need Adobe Flash Player already installed so older browsers without Flash will get a popup asking them to install it, causing delay.

 

That's why many major sites still use the object tag with a classid

<div style="width: 500px; margin: auto;">

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0".........

and the nested embed tag which allows older browsers to play the video without waiting.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...